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: improve QA checks for airbyte-enterprise #45393

Merged

Conversation

postamar
Copy link
Contributor

@postamar postamar commented Sep 11, 2024

What

This PR makes it possible for airbyte-ci to run in airbyte-enterprise with symlinks instead of actual docs.

This is a companion to https://github.com/airbytehq/airbyte-enterprise/pull/43 and is required by it for it to pass CI. See its description for context.

How

Improves symlink support in airbyte-ci.

Review guide

n/a

User Impact

None

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented Sep 11, 2024

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Sep 11, 2024 6:14pm

@postamar postamar changed the title airbyte-ci: improve QA checks for airbyte-enterprise [WIP] airbyte-ci: improve QA checks for airbyte-enterprise Sep 11, 2024
@postamar postamar changed the title [WIP] airbyte-ci: improve QA checks for airbyte-enterprise airbyte-ci: improve QA checks for airbyte-enterprise Sep 11, 2024
@@ -163,6 +164,8 @@ def __init__(self, context: ConnectorContext) -> None:
context=context,
paths_to_mount=[
MountPath(code_directory),
# Support airbyte-enterprise docs.
MountPath(SUBMODULE_ENTERPRISE_DOCS_PATH),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is just a handful of markdown files so this should be quite cheap

@postamar postamar force-pushed the postamar/airbyte-ci-improve-qa-checks-for-airbyte-enterprise branch from f8ea69e to efdb757 Compare September 11, 2024 14:33
@postamar postamar marked this pull request as ready for review September 11, 2024 14:33
@postamar postamar requested a review from a team as a code owner September 11, 2024 14:33
@@ -163,6 +164,8 @@ def __init__(self, context: ConnectorContext) -> None:
context=context,
paths_to_mount=[
MountPath(code_directory),
# Support airbyte-enterprise docs.
MountPath(SUBMODULE_ENTERPRISE_DOCS_PATH),
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure how/if this mount path is symlinked to the main doc path.
The way we define the connector.documentation_file_path attribute is by:

  • Keeping the path portion after https//docs.airbyte.com/<the path relative to .docs>
  • Appending it to ./docs

If the symlink works I think we're good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the symlink works in dagger if both the symlink and its target are mounted

@alafanechere
Copy link
Contributor

Running a simple connector test suite on this branch to check if QA checks continue to work normally:
https://github.com/airbytehq/airbyte/actions/runs/10816377710

@postamar postamar force-pushed the postamar/airbyte-ci-improve-qa-checks-for-airbyte-enterprise branch 2 times, most recently from 56a6b38 to ceebfe0 Compare September 11, 2024 17:48
@postamar postamar marked this pull request as draft September 11, 2024 17:53
@postamar postamar force-pushed the postamar/airbyte-ci-improve-qa-checks-for-airbyte-enterprise branch from ceebfe0 to e416af2 Compare September 11, 2024 17:57
@postamar
Copy link
Contributor Author

This is ready for another look @alafanechere . I tested it in both repos and it works beautifully.

@postamar postamar marked this pull request as ready for review September 11, 2024 18:04
container = container.with_mounted_directory(destination_path, self.context.get_repo_dir(path_string))
if path_to_mount.get_path().is_symlink():
container = self._mount_path(container, path_to_mount.get_path().readlink())

Copy link
Contributor

Choose a reason for hiding this comment

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

isn't an else missing there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, if it's not a symlink, then line 61 is enough

Copy link
Contributor

Choose a reason for hiding this comment

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

But line 61 will remount the path without resolution if the path is a symlink, you mean we want to mount both in any case right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

L61 mounts the symlink itself. It's one of the quirks of buildkit that it doesn't resolve the symlink before mounting it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we're not the only people to be annoyed by this: moby/moby#1676

@alafanechere
Copy link
Contributor

@postamar I'm not seeing the change you originally made to the QA checks step to mount the submodule

@postamar
Copy link
Contributor Author

@postamar I'm not seeing the change you originally made to the QA checks step to mount the submodule

I removed it deliberately, because it's no longer needed. Mounting a MountPath now does the right thing, i.e. the same as before + now if it's a symlink also mounting the symlink target

@alafanechere
Copy link
Contributor

@postamar I'm not seeing the change you originally made to the QA checks step to mount the submodule

I removed it deliberately, because it's no longer needed. Mounting a MountPath now does the right thing, i.e. the same as before + now if it's a symlink also mounting the symlink target

Beautiful!!!

@alafanechere
Copy link
Contributor

Running the test on a light connector again. https://github.com/airbytehq/airbyte/actions/runs/10817241987

Co-authored-by: Augustin <augustin@airbyte.io>
@postamar
Copy link
Contributor Author

postamar commented Sep 11, 2024

I'd also kicked off a run here: https://github.com/airbytehq/airbyte/actions/runs/10817143202/job/30009903241

edit: success

Copy link
Contributor

@alafanechere alafanechere left a comment

Choose a reason for hiding this comment

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

Thanks for the elegant addition! The tests passed on the connector.

@postamar
Copy link
Contributor Author

Thanks for the speedy review!

@postamar postamar enabled auto-merge (squash) September 11, 2024 18:19
@postamar
Copy link
Contributor Author

Our friend the pull rate limit is back! I'll re-run and merge tomorrow morning.

@postamar postamar merged commit 5dbce81 into master Sep 11, 2024
36 checks passed
@postamar postamar deleted the postamar/airbyte-ci-improve-qa-checks-for-airbyte-enterprise branch September 11, 2024 20:24
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