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

[Merged by Bors] - require http and metrics for respective flags #4674

Closed
wants to merge 6 commits into from

Conversation

jxs
Copy link
Member

@jxs jxs commented Aug 28, 2023

Issue Addressed

following discussion on #4639 (comment) this PR makes the http and metrics sub-flags to require those main flags enabled

@jimmygchen jimmygchen added the ready-for-review The code is ready for review label Aug 31, 2023
@jxs jxs requested a review from jimmygchen August 31, 2023 11:16
Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jimmygchen jimmygchen removed the ready-for-review The code is ready for review label Aug 31, 2023
Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, just realized we should probably make the same changes to beacon_node/src/cli.rs?

@jimmygchen jimmygchen added the waiting-on-author The reviewer has suggested changes and awaits thier implementation. label Aug 31, 2023
@jxs
Copy link
Member Author

jxs commented Sep 1, 2023

Oh sorry, just realized we should probably make the same changes to beacon_node/src/cli.rs?

yup makes sense Jimmy, updated!

@jimmygchen jimmygchen added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Sep 4, 2023
@@ -316,22 +316,25 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.arg(
Arg::with_name("http-address")
.long("http-address")
.requires("http")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey sorry @jxs, I've just realized that http api can be enabled via --staking or --gui as well, so --http is not strictly necessary, so this may be a breaking change for the beacon node, and we might want to leave this unchnaged?

if cli_args.is_present("staking") {
client_config.http_api.enabled = true;
client_config.sync_eth1_chain = true;
}

if cli_args.is_present("gui") {
client_config.http_api.enabled = true;
client_config.validator_monitor_auto = true;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw I discovered this from the failing doppelganger tests, it uses --staking instead of --http

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for digging it Jimmy! I updated with a ArgGroup for http, gui and staking, when one of them is missing the following error is displayed:

error: The following required arguments were not provided:
    <--http|--gui|--staking>

Do you think it's clear enough? If not I can revert, meanwhile the doppelganger tests are still failing, can you access the logs? I am able to run the beacon_node for them locally but get a jwt validation error instead

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok managed to fix the doppelganger protection tests and it seems to me it's mo longer a breaking change since all the flags still work as only one of the three is required, but ptal Jimmy

@michaelsproul michaelsproul added the backwards-incompat Backwards-incompatible API change label Sep 4, 2023
@michaelsproul
Copy link
Member

Marking this as backwards-incompat. We shouldn't merge this for v4.4.2, and should wait for v4.5.0.

@michaelsproul michaelsproul added the v4.5.0 ETA Q4 2023 label Sep 4, 2023
to both add default values and then require them, fixes doppelganger protection test
Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Let's merge

@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Sep 22, 2023
@paulhauner
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Sep 22, 2023
## Issue Addressed

following discussion on #4639 (comment) this PR makes the `http` and `metrics` sub-flags to require those main flags enabled
@bors
Copy link

bors bot commented Sep 22, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Sep 22, 2023
## Issue Addressed

following discussion on #4639 (comment) this PR makes the `http` and `metrics` sub-flags to require those main flags enabled
@bors
Copy link

bors bot commented Sep 22, 2023

Build failed (retrying...):

@michaelsproul
Copy link
Member

bors r-
bors r+

@bors
Copy link

bors bot commented Sep 22, 2023

Canceled.

bors bot pushed a commit that referenced this pull request Sep 22, 2023
## Issue Addressed

following discussion on #4639 (comment) this PR makes the `http` and `metrics` sub-flags to require those main flags enabled
@bors
Copy link

bors bot commented Sep 22, 2023

This PR was included in a batch that was canceled, it will be automatically retried

bors bot pushed a commit that referenced this pull request Sep 22, 2023
## Issue Addressed

following discussion on #4639 (comment) this PR makes the `http` and `metrics` sub-flags to require those main flags enabled
@bors
Copy link

bors bot commented Sep 22, 2023

Pull request successfully merged into unstable.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title require http and metrics for respective flags [Merged by Bors] - require http and metrics for respective flags Sep 22, 2023
@bors bors bot closed this Sep 22, 2023
bors bot pushed a commit that referenced this pull request Sep 22, 2023
## Issue Addressed

Fixes breaking change introduced on #4674  that doesn't allow multiple `http_enabled` `ArgGroup` flags
bors bot pushed a commit that referenced this pull request Sep 22, 2023
## Issue Addressed

Fixes breaking change introduced on #4674  that doesn't allow multiple `http_enabled` `ArgGroup` flags
bors bot pushed a commit that referenced this pull request Sep 22, 2023
## Issue Addressed

Fixes breaking change introduced on #4674  that doesn't allow multiple `http_enabled` `ArgGroup` flags
@jxs jxs deleted the require-http-metrics-flags branch September 24, 2023 12:24
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

following discussion on sigp#4639 (comment) this PR makes the `http` and `metrics` sub-flags to require those main flags enabled
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

Fixes breaking change introduced on sigp#4674  that doesn't allow multiple `http_enabled` `ArgGroup` flags
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

following discussion on sigp#4639 (comment) this PR makes the `http` and `metrics` sub-flags to require those main flags enabled
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

Fixes breaking change introduced on sigp#4674  that doesn't allow multiple `http_enabled` `ArgGroup` flags
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

following discussion on sigp#4639 (comment) this PR makes the `http` and `metrics` sub-flags to require those main flags enabled
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

Fixes breaking change introduced on sigp#4674  that doesn't allow multiple `http_enabled` `ArgGroup` flags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-incompat Backwards-incompatible API change ready-for-merge This PR is ready to merge. v4.5.0 ETA Q4 2023
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants