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

RFE: Introduce the --include --exclude command line parameter for scenario filtering #4003

Closed
cidrblock opened this issue Aug 12, 2023 · 3 comments
Milestone

Comments

@cidrblock
Copy link
Contributor

cidrblock commented Aug 12, 2023

As a user I want to specify a subset of molecule scenarios to run.

Use cases:

  • This would allow for one scenario to be dedicated to the creation, preparation, verification, and distruction of infrastructure

Example:

Assume we have introduced the ability to share state and invetory between scenarios.
Assume the default scenario is responsible for provisioning.

# create the infrstructure, shared state, shared inventory and verify it is viable using the default scneario
molecule create
molecule preprare
molecule verify

# run all other scenarios (their destroy is removed from test)
molecule test --exclude default

# destroy the shared infrastructure and invetory
molecule destroy

Long term there may be a way to offer these steps (canned) with a higher level construct above the scenario level at the collleciton level
@Qalthos
Copy link
Collaborator

Qalthos commented Aug 13, 2024

We already have the --all parameter, which sets the scenario name to None which Scenarios interprets as all. An additional filter list could flow through to Scenarios to limit that list beyond allowing a single name.

@Qalthos
Copy link
Collaborator

Qalthos commented Sep 10, 2024

Do we potentially want more nuanced scenario filtering, say as in molecule --include scenario1 --include scenario2 or molecule --all --exclude scenario4 --exclude scenario5?

@cidrblock cidrblock changed the title RFE: Introduce the --all-except command line parameter RFE: Introduce the --include --exclude command line parameter for scenario filtering Sep 19, 2024
@Qalthos
Copy link
Collaborator

Qalthos commented Feb 26, 2025

Fixed by #4388

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

No branches or pull requests

2 participants