-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update the worker to make it more generic #67
Conversation
The idea behind this commit is to make the worker even more generic, not only being able to execute bash scripts, but, let the user decide which type of script it will be executed, by defining a `interpreter` key in the partial yaml playbook, which will tell the worker what to execute. Changes included in this commit: * Rename every reference from rhc-worker-bash to rhc-worker * Added the `interpreter` key to be parsed in the incoming playbook ** Use the `interpreter` key instead of hardcoding the /bin/bash path for the command execution * Updated the references in the project to build using the new name Signed-off-by: Rodolfo Olivieri <[email protected]>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
=======================================
Coverage 66.47% 66.47%
=======================================
Files 5 5
Lines 343 343
=======================================
Hits 228 228
Misses 97 97
Partials 18 18
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also thinking if the rhc-worker
name is okay from insights POV, are they okay with it? I would expect something like rhc-worker-multipurpose
or rhc-worker-generic
because of the existence of rhc-worker-playbook
, I mean .. the specific name just implies better what is the purpose of the package I think.
Apart from the few questions, the changes looks good to me!
Co-authored-by: Andrea Waltlová <[email protected]>
Signed-off-by: Rodolfo Olivieri <[email protected]>
Alright |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server.go
docstring forSend
method needs update (still mentions executing bash script)runner.go
L92 docstring as well- CONTRIBUTING file also mentions bash
- Summary in specfile still mentions bash
README.md
Outdated
|
||
- [RHC Worker Bash](#rhc-worker-bash) | ||
- [RHC Worker Bash](#rhc-worker-script) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [RHC Worker Bash](#rhc-worker-script) | |
- [RHC Worker Script](#rhc-worker-script) |
No builds for https://copr.fedorainfracloud.org/coprs/g/oamg/rhc-worker-script/builds/ yet, I don't know enough about github actions to know if it will be triggered in this PR or only after we merge it - I don't think it should block the merge :) |
Signed-off-by: Rodolfo Olivieri <[email protected]>
We have requested the Please confirm the request on the @oamg/rhc-worker-script Copr project permissions page and retrigger the build by a |
2 similar comments
We have requested the Please confirm the request on the @oamg/rhc-worker-script Copr project permissions page and retrigger the build by a |
We have requested the Please confirm the request on the @oamg/rhc-worker-script Copr project permissions page and retrigger the build by a |
/packit build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now!
The idea behind this commit is to make the worker even more generic, not only being able to execute bash scripts, but, let the user decide which type of script it will be executed, by defining a
interpreter
key in the partial yaml playbook, which will tell the worker what to execute.Changes included in this commit:
interpreter
key to be parsed in the incoming playbook** Use the
interpreter
key instead of hardcoding the /bin/bash pathfor the command execution