Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-67963] Add option to save bandwidth and resources, which are wasted unnecessarily #245

Merged
merged 7 commits into from
Jun 2, 2022

Conversation

parvit
Copy link
Contributor

@parvit parvit commented May 23, 2022

[fixes #65]

It introduces the requested feature by which it is now possible to activate a configuration item under the SSH Host page (disabled by default) that will track the selected files for upload and check if it is really necessary to upload it again.

The tracking is done in a json file in job-specific folder and two values are tracked for every file:

  • Last modified timestamp
  • MD5 hash

The files are uploaded only if either:

  • The file was not previously uploaded
  • The new file timestamp is newer AND the MD5 hash has changed

As an optimization if the timestamp is not newer than the MD5 hash is not recomputed (which could be slow for big files).

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@parvit
Copy link
Contributor Author

parvit commented May 29, 2022

For reference the job configuration i have used is attached also:
remote-deploy-test.xml.txt

Following are the same tests but with feature disabled, in all cases the file is uploaded correctly.

@gmcdonald
Copy link
Contributor

Thanks, tests look ok, except the output of each log shows 'SSH:Transferred 1 file(s)' - even when the file was skipped - a bug ?

@parvit
Copy link
Contributor Author

parvit commented May 30, 2022

@gmcdonald Hi, no that seems to be a behavior in BPTransfer class of the parent plugin publish-over. To me there does not seem to a way to influence that count from the ssh plugin.
To change that would have been a bit out of scope for this change so i've opted to add the warning.

@ttodua
Copy link

ttodua commented Jun 1, 2022

@parvit in the top post of this PR, include such phrase in the bottom (or anywhere):

[fixes #65]

and it will link this PR to that issue's closure.

@parvit
Copy link
Contributor Author

parvit commented Jun 1, 2022

Changed, I thought however that i did already link it with my first message.

@gmcdonald
Copy link
Contributor

Merging this, though to note here as in the Issue that it would be much more useful if this was configurable at the job level rather than one big switch on/off for every job that only an Admin can configure - a possible future feature request,

@gmcdonald gmcdonald merged commit bb57d76 into jenkinsci:master Jun 2, 2022
@ttodua
Copy link

ttodua commented Nov 14, 2022

@gmcdonald can you tell, when the updated version (which would have this merged PR) will be released? the official page https://plugins.jenkins.io/publish-over-ssh/#documentation still shown 1.24 (which was "9 months ago")

@gmcdonald
Copy link
Contributor

Hi @ttodua yes I am planning on doing a new release soon, just have a few bits to tidy up.

@ttodua
Copy link

ttodua commented Nov 14, 2022

@gmcdonald thanks for quick reply, how long it would take? passed several months and I have been hoping to get that released. any approximates?
thank you !

@ttodua
Copy link

ttodua commented Nov 15, 2022

@parvit would you be able to make a new PR (I would make a small bounty for that too), so the plugin can have option to check/grab only those files which are presented as "changed/added" from github push action? i.e. from payload it's visible which files are changed on the last commit https://pastebin.com/raw/u8u0B4PB so plugin could download only affected files. what do you think (also @gmcdonald), maybe it will speed up the process, or not that much?

@parvit
Copy link
Contributor Author

parvit commented Nov 15, 2022 via email

@ttodua
Copy link

ttodua commented Dec 8, 2022

@gmcdonald sorry for bothering, may I ask if there is any way we could help you to push forward the release?

1 similar comment
@ttodua
Copy link

ttodua commented Jan 22, 2023

@gmcdonald sorry for bothering, may I ask if there is any way we could help you to push forward the release?

@ttodua
Copy link

ttodua commented Jun 3, 2023

@gmcdonald
can you please respond, say at least two words? thanks.

@gmcdonald
Copy link
Contributor

Hey @ttodua , and others, apologies, I have fallen behind on releases. Currently there is a bit of a lift to get back upto date on being compatible with current Jenkins versions and release practices. I will get back on this and let you know a timeline asap

@ttodua
Copy link

ttodua commented Jun 11, 2023

Hey @ttodua , and others, apologies, I have fallen behind on releases. Currently there is a bit of a lift to get back upto date on being compatible with current Jenkins versions and release practices. I will get back on this and let you know a timeline asap

thanks for the heads up !

@ttodua
Copy link

ttodua commented Jun 18, 2023

@gmcdonald if you have some thoughts on this.

@ttodua
Copy link

ttodua commented Jun 27, 2023

Hey @parvit,
is it possible that you published this extension to Jenkins repo?

@parvit
Copy link
Contributor Author

parvit commented Jun 27, 2023

Hey @parvit, is it possible that you published this extension to Jenkins repo?

No i haven't, i was still waiting for your response to the comment of Nov 15 of last year.

@NicolasSanchez80
Copy link

Hi @parvit , can you test it in pipeline? In my case, it's doesn't works. No md5 reference inside logs. Thanks,

@ttodua
Copy link

ttodua commented Oct 22, 2023

@parvit please drop me your mail (or contact me at toduatt@ gmail). I want you to open "issues" functionality on your fork: https://github.com/parvit/publish-over-ssh-plugin/
and then there I would submit a new issue with bounty.
so, development continued on your fork and possibly you published the plugin on jenkins repo, as current plugin development seems abandoned by author.

@parvit
Copy link
Contributor Author

parvit commented Oct 22, 2023 via email

@ttodua
Copy link

ttodua commented Oct 22, 2023

@parvit

ok, i've opened here: #327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[JENKINS-67963] Add option to save bandwidth and resources, which are wasted unnecessarily
4 participants