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

Improve patchComponent script #11685

Open
todor-ivanov opened this issue Aug 10, 2023 · 5 comments · May be fixed by #12207
Open

Improve patchComponent script #11685

todor-ivanov opened this issue Aug 10, 2023 · 5 comments · May be fixed by #12207
Assignees

Comments

@todor-ivanov
Copy link
Contributor

todor-ivanov commented Aug 10, 2023

Impact of the new feature
Operations

Is your feature request related to a problem? Please describe.
While working with this issue: #11157 I had to patch my WMAgent back and forth multiple times with several patches, in order to test the newly provided changes. In general for such purpouses I use the following script: https://github.com/dmwm/WMCore/blob/master/bin/patchComponent.sh But this script

  • Works unidirectional - does not provide an option to revert an already applied patch
  • Does not account for the version of the currently installed agent/component so that it may assist in fetching the proper original files from source
  • Cannot deal with partially applied changes - meaning if a PR gets a further update ( a new Commit) and the patch needs to be re-aplied it cannot reflect only the new changes and then apply only them (i.e. does not work on Commit basis, but rather on PR basis only) instead the original file needs to be fetched from source and put on the right place and only then the patch to be re-aplied from scratch.

All this requires a lot of operational effort especially when it needs to be done on the agent multiple times and it is extremely error prone an difficult to keep track of what is patched at what moment.

Describe the solution you'd like
Add the above described features

Describe alternatives you've considered
Manually do the work every time and risk to break the component during development or loose track and not being aware of what exactly is currently under test

Additional context
none

@amaltaro
Copy link
Contributor

@todor-ivanov I think you have worked on this script this quarter, didn't you? Should we close this issue out? If your changes to patchComponent.sh already closed an issue, then please close this one as "Not Planned"

@todor-ivanov
Copy link
Contributor Author

hi @amaltaro , yes I have it all fixed.... and in addition I have one more script to deliver - one which would allow a full K8 cluster patch on the fly - either by service name or by pod or by deployment .... I'll make the PR later tonight

@todor-ivanov todor-ivanov self-assigned this Dec 11, 2024
@todor-ivanov
Copy link
Contributor Author

todor-ivanov commented Dec 11, 2024

BTW thanks for digging this out - I have forgotten this was materialized as an issue, but I'd let you or Andrea do the issue classification, such that I do not get this wrong this time.

@amaltaro
Copy link
Contributor

Perhaps these scripts should be placed under https://gitlab.cern.ch/amaltaro/wmcore-tools ??

@todor-ivanov
Copy link
Contributor Author

todor-ivanov commented Dec 11, 2024

only now I realize the wmcore-tools repo is in gitlab. Alan, is there any particular reason for that?

BTW, those are under bin - because it is helpful to have them in the WMCore auxiliary code and the environment which we are working in rather than constantly downloading the scripts from some repository before patching.

and also with the virtual environment - anything that is in WMCore/bin is accessible as a normal executable command

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

Successfully merging a pull request may close this issue.

2 participants