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

Use 'dev' sentry environment for airbyte-ci pipx installs in PRs #33920

Merged
merged 10 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
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
18 changes: 15 additions & 3 deletions .github/actions/run-dagger-pipeline/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ runs:
pipelines:
- 'airbyte-ci/connectors/pipelines/**'
- name: Determine how Airbyte CI should be installed
Copy link
Contributor

Choose a reason for hiding this comment

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

Love this addition 😍

shell: bash
id: determine-install-mode
run: |
if [[ "${{ github.ref }}" != "refs/heads/master" ]] && [[ "${{ steps.changes.outputs.pipelines_any_changed }}" == "true" ]]; then
echo "Making changes to Airbyte CI on a non-master branch. Airbyte-CI will be installed from source."
echo "install-mode=dev" >> $GITHUB_OUTPUT
else
echo "install-mode=production" >> $GITHUB_OUTPUT
fi
- name: Docker login
uses: docker/login-action@v1
with:
Expand All @@ -114,7 +125,7 @@ runs:

- name: Install airbyte-ci binary
id: install-airbyte-ci
if: github.ref == 'refs/heads/master' || steps.changes.outputs.pipelines_any_changed == 'false'
if: steps.determine-install-mode.outputs.install-mode == 'production'
shell: bash
run: |
curl -sSL ${{ inputs.airbyte_ci_binary_url }} --output airbyte-ci-bin
Expand All @@ -123,13 +134,13 @@ runs:
- name: Install Python 3.10
uses: actions/setup-python@v4
if: github.ref != 'refs/heads/master' && steps.changes.outputs.pipelines_any_changed == 'true'
if: steps.determine-install-mode.outputs.install-mode == 'dev'
with:
python-version: "3.10"
token: ${{ inputs.github_token }}

- name: Install ci-connector-ops package
if: github.ref != 'refs/heads/master' && steps.changes.outputs.pipelines_any_changed == 'true'
if: steps.determine-install-mode.outputs.install-mode == 'dev'
shell: bash
run: |
pip install pipx
Expand Down Expand Up @@ -157,6 +168,7 @@ runs:
PRODUCTION: ${{ inputs.production }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
SENTRY_DSN: ${{ inputs.sentry_dsn }}
SENTRY_ENVIRONMENT: ${{ steps.determine-install-mode.outputs.install-mode }}
SLACK_WEBHOOK: ${{ inputs.slack_webhook_url }}
SPEC_CACHE_BUCKET_NAME: ${{ inputs.spec_cache_bucket_name }}
SPEC_CACHE_GCS_CREDENTIALS: ${{ inputs.spec_cache_gcs_credentials }}
Expand Down
1 change: 1 addition & 0 deletions airbyte-ci/connectors/pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ E.G.: running `pytest` on a specific test folder:

| Version | PR | Description |
| ------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| 2.13.1 | [#33920](https://github.com/airbytehq/airbyte/pull/33920) | Report different sentry environments
| 2.13.0 | [#33784](https://github.com/airbytehq/airbyte/pull/33784) | Make `airbyte-ci test` able to run any poetry command |
| 2.12.0 | [#33313](https://github.com/airbytehq/airbyte/pull/33313) | Add upgrade CDK command |
| 2.11.0 | [#32188](https://github.com/airbytehq/airbyte/pull/32188) | Add -x option to connector test to allow for skipping steps |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def initialize():
if "SENTRY_DSN" in os.environ:
sentry_sdk.init(
dsn=os.environ.get("SENTRY_DSN"),
environment=os.environ.get("SENTRY_ENVIRONMENT") or "production",
before_send=before_send,
release=f"pipelines@{importlib.metadata.version('pipelines')}",
)
Expand Down
2 changes: 1 addition & 1 deletion airbyte-ci/connectors/pipelines/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "pipelines"
version = "2.13.0"
version = "2.13.1"
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
authors = ["Airbyte <contact@airbyte.io>"]

Expand Down
Loading