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

hivesim: add --sim.limit.exact hive flag #929

Conversation

spencer-tb
Copy link
Contributor

Description

On occasion we may use a regex pattern that will run more tests than intended.

The intention behind the sim.limit below may be to solely run a single test in isolation:

... --sim.limit engine-cancun/"InvalidPayloadAttributes: Missing BeaconRoot" --docker.output

Due to the increasing number of tests within the engine simulator alongside its programtic naming of tests, the above sim.limit will run and additional test using regex matching:

InvalidPayloadAttributes: Missing BeaconRoot
InvalidPayloadAttributes: Missing BeaconRoot (Syncing)

Proposed Change

Add an additional flag: --sim.limit.exact that can be used to specify the exact test to be ran (not using regex). This somewhat acts as an alternatice solution to #914.

Work in progress...

@fjl
Copy link
Collaborator

fjl commented Oct 24, 2023

Note you can run a single test by anchoring the regular expression, e.g. --sim.limit 'engine-cancun/InvalidPayloadAttributes: Missing BeaconRoot$'

@spencer-tb
Copy link
Contributor Author

Perfect! Closing in favor of anchoring with regex :D

@spencer-tb spencer-tb closed this Oct 24, 2023
@spencer-tb
Copy link
Contributor Author

spencer-tb commented Oct 24, 2023

Ah, we have to use the following:

--sim.limit 'engine-cancun/...nRoot \(Cancun\) \(nethermind_cancun-git\)$'

Going to re-open and try to make the usage slightly easier without the escaped characters

@spencer-tb spencer-tb reopened this Oct 24, 2023
@holgerd77
Copy link
Contributor

Can we see that we try to properly integrate something like this in the Hive documentation (might need some overhaul in general to some extend)? That would be really helpful! 🙂 🙏

@fjl
Copy link
Collaborator

fjl commented Oct 25, 2023

The docs are here: https://github.com/ethereum/hive/blob/master/docs/commandline.md#simulation-options

We can definitely add more info about --sim.limit if needed.

@holgerd77
Copy link
Contributor

We can definitely add more info about --sim.limit if needed.

Yes, that would be nice. I am not tech-savvy enough to side-read out of the current docs how to run a single test e.g. with this $ addition.

@fjl
Copy link
Collaborator

fjl commented Jan 14, 2024

Is this still a wanted feature?

@spencer-tb
Copy link
Contributor Author

Will look into adding the relavant information in a future docs overhaul.

@spencer-tb spencer-tb closed this Jan 15, 2024
@fjl
Copy link
Collaborator

fjl commented Jan 15, 2024

I think we could also add this in the hive command only. The 'exact' flag could just escape the regexp and also anchor it. My question was really if you still want this feature at all.

@spencer-tb
Copy link
Contributor Author

Ah okay, personally yes I do think it is useful to have.

I created a new PR here: #969 as I didn't realize force pushing to a branch meant you could not re-open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants