-
Notifications
You must be signed in to change notification settings - Fork 24
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
Environment variable handling #174
Conversation
Thanks for the contribution, I would also be interested in having this merged. I tried this PR and unfortunately it fails for executors which have no
Then after being bitten by this I would make:
the default, possibly even the only option! And a detail: I would allow for keys to be numbers so one does not have to quote them. |
Hi, I saw your other issue indeed. Thanks for catching that bug, that's an easy fix - I'll need to add that check to the tests as well.
Yeah, I did run into issues regarding environment passing when I wrote my PR, which is where that suggestion spurred from. That's something I need to discuss with @smarr in the future, but judging by your recent issue, it should at the very least be an option.
Noted. I remember struggling to make pykwalify work like I wanted it to, so I'm not sure I can implement this easily. I can certainly try, though, although that probably won't be anytime soon FYI. |
ok, after some experimentation I found out that this PR actually suffers from #189 too. if rebench-denoise is used the specified environment variables are not passed to the benchmarkee. |
@o- yes, the sudo flag will be needed to pass things on, otherwise it prevents env vars to be visible. Sorry, a little overloaded at the moment. |
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
… library Signed-off-by: Stefan Marr <git@stefan-marr.de>
…ailing in forks Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
- adapt documentation to reflect that Signed-off-by: Stefan Marr <git@stefan-marr.de>
…ment Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
… yet Signed-off-by: Stefan Marr <git@stefan-marr.de>
I did some more work here, mostly to complete testing but also to always pass an empty environment. I won't add support for expanding variables yet, since this requires careful work around This means, at the moment, env var support is limited in usefulness since different env vars do not mean different run ids. Thus, if runs only differ by the env var, we won't be able to distinguish them. But that's for later. Before this can be merged though, it still needs a test that the env vars are actually passed on across denoise.
|
Not sure how to test this with a unit test. It requires sudo rights, which we don’t usually have in CI. Signed-off-by: Stefan Marr <git@stefan-marr.de>
Allows specifying environment variables. Related to #42.
The test module is
rebench.tests.features.issue_42_env
, it's not exactly very elaborate or elegant though.The syntax looks like this:
A few notes:
rebench_schema.yml
(i.e it being specified inEXP_RUN_DETAILS
). Considering adding it to benchmark suites as well, not sure where they'd be most relevant ; as far as I can tell, it should be an easy implementation, though. Let me know where they're needed.%(input)
in env variable values, and that's not implemented there.no_env
flag as well to run subprocesses with the bare minimum env instead of passing on the parent process' full environment variables, which it currently does and did even before I added those changes. Doesn't sound useful to me personally, though.