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

broker: only set parent-uri when instance is a job #5663

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

garlick
Copy link
Member

@garlick garlick commented Jan 8, 2024

This ensures that the parent-uri broker attribute is only set when Flux was lauched as a Flux job, as discussed in #5622.

Copy link
Contributor

@grondo grondo left a 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)

Comment on lines 42 to 43
id=$(flux batch -n1 --wrap \
flux run ${ARGS} flux --parent --parent kvs put test=ok) &&
Copy link
Contributor

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)

Copy link
Member Author

@garlick garlick Jan 8, 2024

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?

Copy link
Contributor

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...)

Copy link
Member Author

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!

flux start ${ARGS} \
flux start ${ARGS} flux --parent --parent kvs put test=ok) &&
id=$(flux batch -n1 --wrap \
flux run ${ARGS} flux start \
Copy link
Contributor

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?

Copy link
Member Author

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.
Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Merging #5663 (94c8388) into master (18b0d09) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

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     
Files Coverage Δ
src/broker/broker.c 78.33% <100.00%> (+0.02%) ⬆️

... and 11 files with indirect coverage changes

@mergify mergify bot merged commit 4d9da79 into flux-framework:master Jan 9, 2024
34 checks passed
@garlick garlick deleted the issue#5622 branch March 1, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants