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: Introduce --only-step option for connector tests #34276

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Jan 15, 2024

What

This introduces an option on connectors test to only run a specific test suite.
E.G: Only running acceptance tests
airbyte-ci connectors --name=source-faker test --only-step=acceptance

How

  • Pass a new --only-step/-k option to `test``
  • Propagate the steps to "keep" to a RunStepOptions attribute
  • Traverse the step dependency graph in run_steps to only run the only-step and its dependencies - and skip the others.
Screenshot 2024-01-15 at 21 17 44

Copy link

vercel bot commented Jan 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 Jan 16, 2024 2:30pm

Copy link
Contributor Author

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

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

Copy link

sweep-ai bot commented Jan 15, 2024

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

This is an automated message generated by Sweep AI.

@alafanechere alafanechere force-pushed the augustin/01-15-airbyte-ci_Introduce_--only-step_option_for_connector_tests branch from 6d77c61 to e7cd07b Compare January 15, 2024 20:12
@alafanechere alafanechere marked this pull request as ready for review January 15, 2024 20:15
@alafanechere alafanechere requested a review from a team January 15, 2024 20:15
Copy link

sweep-ai bot commented Jan 15, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:



[!CAUTION]

An error has occurred: Cmd('git') failed due to: exit code(128)
cmdline: git clone -v --branch=augustin/01-15-airbyte-ci_Introduce_--only-step_option_for_connector_tests -- https://:@github.com/airbytehq/airbyte.git /tmp/cache/repos/airbytehq/airbyte/base/augustin--01-15-airbyte-ci_Introduce_--only-step_option_for_con
stderr: 'fatal: could not create work tree dir '/tmp/cache/repos/airbytehq/airbyte/base/augustin--01-15-airbyte-ci_Introduce_--only-step_option_for_con': No space left on device
' (tracking ID: 41a28e5dec)

Copy link

sweep-ai bot commented Jan 15, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:



[!CAUTION]

An error has occurred: Cmd('git') failed due to: exit code(128)
cmdline: git clone -v --branch=augustin/01-15-airbyte-ci_Introduce_--only-step_option_for_connector_tests -- https://:@github.com/airbytehq/airbyte.git /tmp/cache/repos/airbytehq/airbyte/base/augustin--01-15-airbyte-ci_Introduce_--only-step_option_for_con
stderr: 'fatal: could not create work tree dir '/tmp/cache/repos/airbytehq/airbyte/base/augustin--01-15-airbyte-ci_Introduce_--only-step_option_for_con': No space left on device
' (tracking ID: ca7fbc42bc)

@alafanechere alafanechere force-pushed the augustin/01-15-airbyte-ci_Introduce_--only-step_option_for_connector_tests branch from e7cd07b to 75541e9 Compare January 15, 2024 20:17
Copy link

sweep-ai bot commented Jan 15, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:



[!CAUTION]

An error has occurred: Cmd('git') failed due to: exit code(128)
cmdline: git clone -v --branch=augustin/01-15-airbyte-ci_Introduce_--only-step_option_for_connector_tests -- https://:@github.com/airbytehq/airbyte.git /tmp/cache/repos/airbytehq/airbyte/base/augustin--01-15-airbyte-ci_Introduce_--only-step_option_for_con
stderr: 'fatal: could not create work tree dir '/tmp/cache/repos/airbytehq/airbyte/base/augustin--01-15-airbyte-ci_Introduce_--only-step_option_for_con': No space left on device
' (tracking ID: 146ac3694a)

Copy link
Contributor

@bnchrch bnchrch left a comment

Choose a reason for hiding this comment

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

Just needs a test or two.

But otherwise im fine preapproving!

Nice work.

log_step_tree: bool = True
concurrency: int = 10
step_params: Dict[CONNECTOR_TEST_STEP_ID, STEP_PARAMS] = field(default_factory=dict)

def __post_init__(self) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

😍

@@ -232,7 +295,7 @@ async def run_steps(
steps_to_evaluate, remaining_steps = _get_next_step_group(runnables)

# Remove any skipped steps
steps_to_run, results = _filter_skipped_steps(steps_to_evaluate, options.skip_steps, results)
steps_to_run, results = _filter_skipped_steps(steps_to_evaluate, step_ids_to_skip, results)
Copy link
Contributor

Choose a reason for hiding this comment

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

😍

if self.skip_steps and self.keep_steps:
raise ValueError("Cannot use both skip_steps and keep_steps at the same time")

def get_step_ids_to_skip(self, runnables: STEP_TREE) -> List[str]:
Copy link
Contributor

Choose a reason for hiding this comment

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

❗This is all great. Only thing thats missing is some tests to ensure weve got the traversal correct

@alafanechere alafanechere force-pushed the augustin/01-15-airbyte-ci_Introduce_--only-step_option_for_connector_tests branch from a4ec1e5 to 21af651 Compare January 16, 2024 14:30
@alafanechere alafanechere enabled auto-merge (squash) January 16, 2024 14:30
@alafanechere alafanechere merged commit 446eae3 into master Jan 16, 2024
24 checks passed
@alafanechere alafanechere deleted the augustin/01-15-airbyte-ci_Introduce_--only-step_option_for_connector_tests branch January 16, 2024 14:44
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
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.

None yet

2 participants