Skip to content

Commit

Permalink
Use 'dev' sentry environment for airbyte-ci pipx installs in PRs (#33920
Browse files Browse the repository at this point in the history
)
  • Loading branch information
erohmensing authored Jan 4, 2024
1 parent b69c955 commit 14af598
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
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
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 @@ -21,6 +21,7 @@ def initialize() -> None:
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

0 comments on commit 14af598

Please sign in to comment.