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

[5/n][pipeline-gen] Helper method to determine whether test should automatically run #41

Closed
wants to merge 2 commits into from

Conversation

khluu
Copy link
Collaborator

@khluu khluu commented Oct 8, 2024

Determine if test should automatically run based on these logic:

  • If specified as optional, test never run automatically (even when run_all is true)
  • If there is no source file dependencies, test runs
  • If run_all is specified, test runs
  • If one of the files in list_file_diff match with source file dependencies, test runs

khluu added 2 commits October 7, 2024 22:44
p
Signed-off-by: kevin <[email protected]>
p
Signed-off-by: kevin <[email protected]>
@khluu khluu requested a review from aslonnie October 8, 2024 00:01

from .step import TestStep

def step_should_run(step: TestStep, run_all: bool, list_file_diff: List[str]) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

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

where do these input args come from? I feel that without the context, this function (and the test) does not really serve much purpose.

you should put a more meaningful TestSteps into context, and test with that.

like there are many other fields in TestStep? why does this function need to send the entire TestStep in together? why is this not a member function of TestStep but a standalone function? why run_all does not really "run all", but will skip the optional ones?

Copy link
Collaborator

@aslonnie aslonnie left a comment

Choose a reason for hiding this comment

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

do you have a PR that has everything together that I can have a look first?

@khluu
Copy link
Collaborator Author

khluu commented Oct 8, 2024

do you have a PR that has everything together that I can have a look first?

This is the PR with everything together: #36

@khluu khluu requested a review from aslonnie October 8, 2024 06:43
Copy link
Collaborator

@aslonnie aslonnie left a comment

Choose a reason for hiding this comment

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

talked offline. next step:

  • could we have a basic setup of running the high-level thing e2e? like with an example dir with the input files and make it clear that these files are the input files?
  • and then, maybe in the same PR, have code that parses the input files into TestStep?

by having that first, we set up the context for the test step filtering logic in this PR.

@khluu khluu closed this Oct 9, 2024
@khluu khluu deleted the khluu/pipeline_gen_helper_1 branch October 9, 2024 20:41
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.

2 participants