Skip to content

Commit a4fb5ab

Browse files
authored
airbyte-ci: fix dagger log upload attempt when no gcp creds are available (#37778)
1 parent 195845f commit a4fb5ab

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

airbyte-ci/connectors/pipelines/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,7 @@ E.G.: running Poe tasks on the modified internal packages of the current branch:
676676

677677
| Version | PR | Description |
678678
|---------| ---------------------------------------------------------- |----------------------------------------------------------------------------------------------------------------------------|
679+
| 4.12.2 | [#37778](https://github.com/airbytehq/airbyte/pull/37778) | Do not upload dagger log to GCP when no credentials are available. |
679680
| 4.12.1 | [#37765](https://github.com/airbytehq/airbyte/pull/37765) | Relax the required env var to run in CI and handle their absence gracefully. |
680681
| 4.12.0 | [#37690](https://github.com/airbytehq/airbyte/pull/37690) | Pass custom CI status name in `connectors test` |
681682
| 4.11.0 | [#37641](https://github.com/airbytehq/airbyte/pull/37641) | Updates to run regression tests in GitHub Actions. |

airbyte-ci/connectors/pipelines/pipelines/cli/dagger_pipeline_command.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ async def invoke(self, ctx: click.Context) -> None:
5353
sys.exit(1)
5454
finally:
5555
if ctx.obj.get("dagger_logs_path"):
56-
if ctx.obj["is_local"]:
57-
main_logger.info(f"Dagger logs saved to {ctx.obj['dagger_logs_path']}")
58-
if ctx.obj["is_ci"]:
56+
main_logger.info(f"Dagger logs saved to {ctx.obj['dagger_logs_path']}")
57+
if ctx.obj["is_ci"] and ctx.obj["ci_gcs_credentials"] and ctx.obj["ci_report_bucket_name"]:
5958
gcs_uri, public_url = upload_to_gcs(
6059
ctx.obj["dagger_logs_path"], ctx.obj["ci_report_bucket_name"], dagger_logs_gcs_key, ctx.obj["ci_gcs_credentials"]
6160
)

airbyte-ci/connectors/pipelines/pipelines/models/contexts/pipeline_context.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ def github_commit_status(self) -> dict:
181181
"""Build a dictionary used as kwargs to the update_commit_status_check function."""
182182
target_url: Optional[str] = self.gha_workflow_run_url
183183

184-
if self.state not in [ContextState.RUNNING, ContextState.INITIALIZED] and isinstance(self.report, ConnectorReport):
184+
if (
185+
self.remote_storage_enabled
186+
and self.state not in [ContextState.RUNNING, ContextState.INITIALIZED]
187+
and isinstance(self.report, ConnectorReport)
188+
):
185189
target_url = self.report.html_report_url
186190

187191
return {

airbyte-ci/connectors/pipelines/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "pipelines"
7-
version = "4.12.1"
7+
version = "4.12.2"
88
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
99
authors = ["Airbyte <[email protected]>"]
1010

0 commit comments

Comments
 (0)