-
Notifications
You must be signed in to change notification settings - Fork 125
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
RFE: prepare part for each step in plan #588
Comments
This is similar to issue #585 which I reported yesterday. This issue is a bit more general, so I suppose pick which proposal you like better, and then close one or the other. Thanks! |
I like this solution but I don't think it should be part of the discover step. I would be more inclined to have something like |
I think this goes against I'd really love keeping Note: I know that the " |
@pvalena : Agreed that this should really not modify anything in the current repository. I also don't think that this was the proposal. All of these scripts should run in /var/tmp/tmp/run-*/discover/ only. But I do see the concern about running too much free-form code in the metadata, that is both brittle and unsafe. So maybe this should be dialed back to more specific use cases, and support them in a declarative way. |
@martinpitt when the arbitrary script runs on the host it has access into E.g. not running make but rather the end command itself |
Running it in container or such (same method as provision) would be an option, and maybe a better one, as it would support the free-form. I'm not sure how this would be implemented in CI though. @thrix WDYT? |
One idea to consider for this: #701 (comment) |
Could you please explain how it should help here? If I understand it correctly you would be able to do a provisioning before discover step by grouping plans? Am I correct? |
Well, it doesn't solve the If running Having the two plans- one that does the tests generation, and second one that does the actual tests execution (they would share the Note that tere are several implementations proposed (at least from the tmt config POV), see others here: #694 (comment) |
One more thing to note is that the Ugly hack (bellow the line) would be to manually create / modify the generated The second (a bit less ugly) hack would be to simply run |
The second hack could be used but I believe that this is issue significant enough to have it supported by TMT. |
From the security PoV even the git clone (CVE-2021-21300) can be a problem. |
In that case we probably want |
Couldn't you use |
as discussed on todays meeting. probably it would be easier, to have provisioned system, so that do these commands on target system, to improve security. |
I had trouble with order of commands that
prepare
is done afterdiscovery
. (Or better to say, it is clear, thatprepare
is executed on target machine but not so clean thatdiscovery
not and order of these commands ). It would good to do some steps before discovery.My usecase is, that I have no FMF data for tests, just plan, and tests metadata are automatically generated from python decorators. So that I had to run my tool what generates them, and discovery is done before it tries to do that. and do not want to store these automatically generated fmf files inside git, as potentialy of out of sync.
as we've discussed with @lukaszachy it probably makes sense that each
step
could have some possibility to run some setup before running the rest, somesetup
orassemble
attribute with same syntax like currentprepare
(or maybe allow just script?)syntax could be like
My current plan
It expected that prepare is before discovery (and expected that discovery is also done on target machine)
I've tried to use some ughly hack like:
But it does not work, or better to say, unable to find output of the first discovery step, script output is not in log.txt not anywhere, so it is possible that something is bad in my syntax, but cannot see what`s wrong.
But this is surely separate issue.
The text was updated successfully, but these errors were encountered: