-
Notifications
You must be signed in to change notification settings - Fork 49
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
broker: only set parent-uri when instance is a job #5663
Conversation
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.
LGTM! Just one question about the test (inline)
t/t3100-flux-in-flux.t
Outdated
id=$(flux batch -n1 --wrap \ | ||
flux run ${ARGS} flux --parent --parent kvs put test=ok) && |
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.
Is a flux start
missing here. That is to simulate a depth of 2 for the flux kvs put
, should this be:
id=$(flux batch -n1 --wrap \
flux run ${ARGS} flux start flux --parent --parent kvs put test=ok)
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.
There's the outer test instance from test_under_flux
(level 0), then the flux batch
instance (level1), then the flux start
instance (level2). So I think it's right?
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.
I just see flux run ${ARGS} flux --parent --parent kvs put test=ok
-- where am I missing the flux start
?
(In the diff I see two flux start
calls removed, replaced with one flux batch
and one flux run
) Sorry if I'm missing something obvious, sometimes hard to see via a diff...)
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.
Oh I do apologize - I was reading your "shouldn't it be" code snippet thinking it was the original. You are quite right!
t/t3100-flux-in-flux.t
Outdated
flux start ${ARGS} \ | ||
flux start ${ARGS} flux --parent --parent kvs put test=ok) && | ||
id=$(flux batch -n1 --wrap \ | ||
flux run ${ARGS} flux start \ |
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.
One other comment sorry! Are ${ARGS}
meant for flux start
and not flux run
here?
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.
Oh duh. Fix coming.
Problem: the parent-uri attribute is set whenever FLUX_URI is set in the broker environment, but this does not necessarily indicate that the instance has a "parent" in the resource hierarchy sense. Suppress setting parent-uri when the broker is not running as a Flux job, determined by checking for FLUX_JOB_ID. Fixes flux-framework#5622
Problem: the description of parent-uri describes the previous behavior of unconditionally setting it to the value of FLUX_URI in the broker environment. Update description.
Problem: one of the flux-in-flux tests assumes that a flux instance run as the initial program of another flux instance will have the parent-uri attribute set, but it no longer does. Update test.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #5663 +/- ##
==========================================
- Coverage 83.48% 83.46% -0.03%
==========================================
Files 487 487
Lines 82954 82955 +1
==========================================
- Hits 69257 69239 -18
- Misses 13697 13716 +19
|
This ensures that the
parent-uri
broker attribute is only set when Flux was lauched as a Flux job, as discussed in #5622.