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

altering imported plans #2340

Open
1 of 5 tasks
LecrisUT opened this issue Sep 20, 2023 · 1 comment
Open
1 of 5 tasks

altering imported plans #2340

LecrisUT opened this issue Sep 20, 2023 · 1 comment

Comments

@LecrisUT
Copy link
Contributor

LecrisUT commented Sep 20, 2023

I'm not sure if there is a discussion about the plans for how to alter imported plans. I think a set of interfaces could be:

  • prepare prepend all prepare steps to the imported plan, unless a flag is given to respect the order
  • finish append all finish steps to the imported plan, unless a flag is given to respect the order
  • environment add specified environment variables.
    Note, for this to be useful, the environment field should be reworked to allow for expansion, e.g. MY_VAR: ${INPUT_VAR:-default} (maybe postpone the variable expansion for another time since it might be handled by order of overwrite)
  • context alter the context before importing the plans
  • adjust prepend it to the imported plan raw data before processing, i.e. as if there was a main.fmf file that contained that data

Note

A major barrier is to specify where these commands are executed, i.e. w.r.t. imported plan or original plan's tree

There is an ambiguity of if the global provided variables (outside of the plan/plan.import key) should be considered when evaluating it. I think it should not because it can get confusing with adjust and it needs some more special treatments anyway.

With such an implementation, the plan import could also be normalized to accept a list of plan references. It is possible to partially work around it using multiple plans with inherited settings. But that does not cover something like creating a plan bundle that can be imported all at once.

What are your thoughts on this design and what order do you think these should be tackled?

@thrix
Copy link
Collaborator

thrix commented Nov 3, 2023

@LecrisUT the environment not altering the imported plan is being fixed in #2452

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

No branches or pull requests

2 participants