Skip to content

Conversation

@skycastlelily
Copy link
Collaborator

@skycastlelily skycastlelily commented Dec 1, 2025

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

  • implement the feature
  • write the documentation
  • extend the test coverage
  • update the specification
  • adjust plugin docstring
  • modify the json schema
  • mention the version
  • include a release note

@therazix therazix added this to planning Dec 3, 2025
@github-project-automation github-project-automation bot moved this to backlog in planning Dec 3, 2025
@therazix therazix added the status | discuss Needs more discussion before closing label Dec 3, 2025
@therazix
Copy link
Contributor

therazix commented Dec 3, 2025

We need to discuss this first and decide on the overall direction before diving into implementation.

@mcasquer
Copy link
Contributor

From the hacking session, we need to decide what to do with this PR, either merge it or overwrite it

@mcasquer
Copy link
Contributor

Lili is also going to take a look to the adjust test as it should be similar

skycastlelily added a commit that referenced this pull request Dec 17, 2025
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

adjust-discover:
type: string
enum: ["+", "append", "=", "replace"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now we use

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.

Copy link
Collaborator Author

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: "="
Copy link
Contributor

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: dmesg

So 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"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed: cc9d557 :)

skycastlelily added a commit that referenced this pull request Dec 22, 2025
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
Copy link
Contributor

@LecrisUT LecrisUT left a 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

@skycastlelily
Copy link
Collaborator Author

Awesome work on this looks neat. Just a few minor comments

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status | discuss Needs more discussion before closing

Projects

Status: backlog

Development

Successfully merging this pull request may close these issues.

Inherit (some) phases from the importing plan

6 participants