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

airbyte-ci: fix extra steps running when selected commands are provided #38549

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -318,5 +318,7 @@ def _skip_metadata_disabled_test_suites(self, run_step_options: RunStepOptions)
RunStepOptions: Updated run step options.
"""
run_step_options = deepcopy(run_step_options)
run_step_options.skip_steps += self._get_step_id_to_skip_according_to_metadata()
# If any `skip_steps` are present, we will run everything except the skipped steps, instead of just `keep_steps`.
if not run_step_options.keep_steps:
run_step_options.skip_steps += self._get_step_id_to_skip_according_to_metadata()
Comment on lines +321 to +323
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for catching this interesting edge case.
We should normally be protected from this issue as the __post__init__ of RunStepOptions raises an error if we both use skip_steps and keeped_steps.
The problem appeared because I my change set skips_steps post instantiation.

Your if introductions looks good and straightforward to me: if the users passed specific step to only run (via keep steps) the test skipping logic is bypassed.

return run_step_options
Loading