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

fix: remove invalid steps from airbyte-ci test options #38246

Merged
merged 4 commits into from
May 17, 2024

Conversation

erohmensing
Copy link
Contributor

@erohmensing erohmensing commented May 15, 2024

What

  • Fix an issue where you can try to run a test step id that doesn't exist (e.g. -k metadata_validation) and see it silently succeed with no steps run.

How

  • Remove unused test step options

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented May 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview May 17, 2024 3:48pm

Copy link
Contributor Author

erohmensing commented May 15, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @erohmensing and the rest of your teammates on Graphite Graphite

@erohmensing erohmensing marked this pull request as ready for review May 16, 2024 15:05
@erohmensing erohmensing requested a review from a team as a code owner May 16, 2024 15:05
@erohmensing erohmensing requested a review from alafanechere May 16, 2024 15:05
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 cleaning this out. It's something I should have done while migrating these checks inside the connectors_qa package.

@@ -208,7 +208,10 @@ def _filter_skipped_steps(steps_to_evaluate: STEP_TREE, skip_steps: List[str], r

else:
steps_to_run.append(step_to_eval)

if not steps_to_run:
raise InvalidStepConfiguration(
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I'm not sure we shall raise an exception here.
steps_to_run are currently static: they apply to all connectors selected by airbyte-ci connectors.

In #38281 I'm slightly changing this logic, some connectors might run different steps according to the state of their metadata file.

It might conceptually mean that it's fine to have empty steps_to_run.
In any case that's not too problematic to raise ATM as step trees still always contains static steps to run by default (e.g. build, qa checks etc.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might conceptually mean that it's fine to have empty steps_to_run.

I'm sure y'all have had the discussion about if that's actually okay to run no tests, so I won't get into that :D

Thanks for the context, makes sense! I'll keep the exception for now, feel free to remove it in that PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm. Actually, after trying to fix a unit test, I realized that the recursive looping makes this more complicated. We could check that the results_dict actually has step results in it after everything has executed, but there are many places where we'd have to update, and then decide if its okay if steps are skipped in different places (e.g. maybe migrate-to-poetry is a no-op if all steps are skipped for some valid reason, while i'd always expect test to have steps)

Since you're actively playing with this logic, i'll just remove it

@erohmensing erohmensing enabled auto-merge (squash) May 17, 2024 15:48
@erohmensing erohmensing merged commit 8cc9106 into master May 17, 2024
28 checks passed
@erohmensing erohmensing deleted the ella/invalidsteps branch May 17, 2024 16:08
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