-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Regression tests: run in GitHub Actions #37659
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have anything blocking to raise.
I'd be curious to have more details about the need of a Google Cloud SQL proxy.
I'd also like to understand why you removed the --auto-select-connection
flag. (does it require a README.md update?)
And as usual: please bump packages version and update changelogs :D
id: fetch_last_commit_id_wd | ||
run: echo "commit_id=$(git rev-parse origin/${{ steps.extract_branch.outputs.branch }})" >> $GITHUB_OUTPUT | ||
|
||
- name: Run Regression Tests [WORKFLOW DISPATCH] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might get a very cheap "run on multiple connections" feature if you'd use a matrix strategy here:
- Make the
connection_id
inputs a comma separated list - Parse this list into an array
- Run this job for each connection id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I'm going to add this as a TODO in a comment since it requires a little bit of extra testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you make sure this refacto works locally too? 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep I did, and am going to do a bit more manual testing before merge. Might be time to start thinking about adding more unit tests 😄 .
@@ -118,7 +116,8 @@ def pytest_configure(config: Config) -> None: | |||
dagger_log_path.touch() | |||
config.stash[stash_keys.DAGGER_LOG_PATH] = dagger_log_path | |||
config.stash[stash_keys.PR_URL] = get_option_or_fail(config, "--pr-url") | |||
config.stash[stash_keys.AUTO_SELECT_CONNECTION] = config.getoption("--auto-select-connection") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you getting rid of this explicit flag and decided the go implicit with connection_id == 'auto'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we should only have one of auto-select or connection ID, we don't really need both flags and it creates more surface area for bugs or unexpected behavior. For example, when I passed in a connection ID via gha I couldn't find a way to turn off auto-select since pytest doesn't parse falsey values. I could have changed auto-select to default to false, but then we'd still end up in a situation where users could provide inputs that don't make sense when combined. So I decided to remove the degree of freedom.
|
||
We need to explicitly kill the proxy in order to allow the GitHub Action to exit. | ||
|
||
An alternative that we can consider is to run the proxy as a separate service. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running it with Dagger would prevent you from managing the service lifecycle, it would shutdown if it's not used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it the perfect use case for dagger services :D google distributes a docker image for it:
https://cloud.google.com/sql/docs/postgres/sql-proxy#cloud-sql-auth-proxy-docker-image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I've added that link. Since the existing code is working I'm going to leave it as-is for now but will circle back to try this out if time permits.
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/test/steps/common.py
Outdated
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/test/steps/common.py
Outdated
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/test/steps/common.py
Outdated
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/test/steps/common.py
Outdated
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/test/steps/common.py
Outdated
Show resolved
Hide resolved
d6bd7b4
to
6c86451
Compare
5b1a2f1
to
51f61fa
Compare
What
Adds the ability to run regression tests manually in GitHub Actions.
How
auto_select_connection
as an input option. Instead, we auto-select if the connection ID is "auto". This removes one degree of freedom which was complicating the connection retrieval logic.Note -
Using the
connection-retriever
required some setup that isn't entirely obvious in this PR. This includesairbyte-platform-internal
repo during the build time of the regression test container. Locally we can use ssh to give authorized users the ability to download it, but in CI we need to use https and therefore had to modify live tests' pyproject.toml and configure the pyproject.toml with the appropriate credentials at build time.gcloud
involved creating a new service account and key,GCP_INTEGRATION_TESTER_CREDENTIALS
, stored in github secrets.prod-ab-cloud-proj
andab-analytics
).Depends on https://github.com/airbytehq/airbyte-platform-internal/pull/12286.