-
Notifications
You must be signed in to change notification settings - Fork 162
Add support for step inheritance in plan imports #4379
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
base: main
Are you sure you want to change the base?
Conversation
d0f7990 to
6c408c8
Compare
|
We need to discuss this first and decide on the overall direction before diving into implementation. |
|
From the hacking session, we need to decide what to do with this PR, either merge it or overwrite it |
|
Lili is also going to take a look to the |
Introduces step inheritance functionality for plan imports, allowing plans to inherit step configurations from imported plans while maintaining the ability to override specific settings. Fixes: #4377
6c408c8 to
640d577
Compare
tmt/schemas/plan.yaml
Outdated
|
|
||
| adjust-discover: | ||
| type: string | ||
| enum: ["+", "append", "=", "replace"] |
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.
Right now we use
tmt/tmt/schemas/discover/fmf.yaml
Lines 116 to 117 in e35ba6d
| adjust-tests: | |
| $ref: "/schemas/core#/definitions/adjust" |
I don't think we have a good way to do the schema validation for fmf patterns, so I think it would be better to skip it like in the part above. The explicit
Step inheritance operators should also not be needed.
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.
Sorry for the late response, was on year-end party,and addressed: cc9d557 :)
| inherit-context: false | ||
| inherit-environment: false | ||
| adjust-prepare: "+" | ||
| adjust-finish: "=" |
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.
The interface in adjust-tests is like
/plan:
discover:
how: fmf
adjust-tests:
- check+:
- how: avc
/test:
test: /usr/bin/true
check: dmesgSo translating the interface to the plan.import feature for the case above it should look like:
plan:
import:
url: https://github.com/teemtee/tests
name: /plans/remote
adjust-prepare:
prepare+:
- how: shell
script: echo "Local prepare"
adjust-finish:
finish:
how: shell
script: echo "Local finish"I am realizing that the adjust-* is excessive in this case, so it should probably instead be merged into a single key like:
plan:
import:
url: https://github.com/teemtee/tests
name: /plans/remote
adjust-plans:
prepare+:
- how: shell
script: echo "Local prepare"
finish:
how: shell
script: echo "Local finish"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.
Addressed: cc9d557 :)
Introduces step inheritance functionality for plan imports, allowing plans to inherit step configurations from imported plans while maintaining the ability to override specific settings. Fixes: #4377
640d577 to
cc9d557
Compare
LecrisUT
left a comment
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.
Awesome work on this looks neat. Just a few minor comments
28f71c4 to
b196760
Compare
Thanks for your review,you are supposed to be enjoying your holidays 🎄 ⭐ ,btw:) |
Introduces step inheritance functionality for plan imports, allowing plans to inherit step configurations from imported plans while maintaining the ability to override specific settings. Fixes: #4377
b196760 to
25208c4
Compare
Fixes: #4377
Introduces step inheritance functionality for plan imports, allowing plans to
inherit step configurations from imported plans while maintaining the ability
to override specific settings.
replace(=),append(+) are all supported.
Pull Request Checklist