Skip to content

Commit 0015590

Browse files
committed
Only use one token
1 parent 61b66a6 commit 0015590

File tree

7 files changed

+3
-15
lines changed

7 files changed

+3
-15
lines changed

.github/actions/run-airbyte-ci/action.yml

-4
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ inputs:
1010
github_token:
1111
description: "GitHub token"
1212
required: false
13-
github_maintenance_token:
14-
description: "GitHub maintenance token"
15-
required: false
1613
dagger_cloud_token:
1714
description: "Dagger Cloud token"
1815
required: false
@@ -124,7 +121,6 @@ runs:
124121
CI_GIT_REPO_URL: ${{ inputs.git_repo_url }}
125122
CI_GIT_REVISION: ${{ inputs.git_revision || github.sha }}
126123
CI_GITHUB_ACCESS_TOKEN: ${{ inputs.github_token }}
127-
CI_GITHUB_MAINTENANCE_TOKEN: ${{ inputs.github_maintenance_token }}
128124
CI_JOB_KEY: ${{ inputs.ci_job_key }}
129125
CI_REPORT_BUCKET_NAME: ${{ inputs.report_bucket_name }}
130126
DAGGER_CLOUD_TOKEN: "${{ inputs.dagger_cloud_token }}"

.github/workflows/connectors_tests.yml

-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ jobs:
131131
git_branch: ${{ github.head_ref }}
132132
git_revision: ${{ steps.fetch_last_commit_id_pr.outputs.commit_id }}
133133
github_token: ${{ env.PAT }}
134-
github_maintenance_token: ${{ secrets.GH_PAT_MAINTENANCE_OSS }}
135134
s3_build_cache_access_key_id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
136135
s3_build_cache_secret_key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
137136
# A connector test can't take more than 5 hours to run (5 * 60 * 60 = 18000 seconds)

airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/context.py

-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def __init__(
5050
ci_gcp_credentials: Optional[Secret] = None,
5151
ci_git_user: Optional[str] = None,
5252
ci_github_access_token: Optional[Secret] = None,
53-
ci_github_maintenance_token: Optional[Secret] = None,
5453
connector_acceptance_test_image: str = DEFAULT_CONNECTOR_ACCEPTANCE_TEST_IMAGE,
5554
gha_workflow_run_url: Optional[str] = None,
5655
dagger_logs_url: Optional[str] = None,
@@ -135,7 +134,6 @@ def __init__(
135134
ci_gcp_credentials=ci_gcp_credentials,
136135
ci_git_user=ci_git_user,
137136
ci_github_access_token=ci_github_access_token,
138-
ci_github_maintenance_token=ci_github_maintenance_token,
139137
run_step_options=run_step_options,
140138
enable_report_auto_open=enable_report_auto_open,
141139
secret_stores=secret_stores,

airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/test/commands.py

-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ async def test(
146146
git_repo_url=ctx.obj["git_repo_url"],
147147
ci_git_user=ctx.obj["ci_git_user"],
148148
ci_github_access_token=ctx.obj["ci_github_access_token"],
149-
ci_github_maintenance_token=ctx.obj["ci_github_maintenance_token"],
150149
ci_report_bucket=ctx.obj["ci_report_bucket_name"],
151150
report_output_prefix=ctx.obj["report_output_prefix"],
152151
gha_workflow_run_url=ctx.obj.get("gha_workflow_run_url"),

airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/test/steps/common.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -714,17 +714,16 @@ async def _build_test_container(self, target_container_id: str) -> Container:
714714
]
715715
)
716716
.with_secret_variable(
717-
"CI_GITHUB_MAINTENANCE_TOKEN",
717+
"CI_GITHUB_ACCESS_TOKEN",
718718
self.context.dagger_client.set_secret(
719-
"CI_GITHUB_MAINTENANCE_TOKEN",
720-
self.context.ci_github_maintenance_token.value if self.context.ci_github_maintenance_token else "",
719+
"CI_GITHUB_ACCESS_TOKEN", self.context.ci_github_access_token.value if self.context.ci_github_access_token else ""
721720
),
722721
)
723722
.with_exec(
724723
[
725724
"/bin/sh",
726725
"-c",
727-
f"poetry config http-basic.airbyte-platform-internal-source {self.github_user} $CI_GITHUB_MAINTENANCE_TOKEN",
726+
f"poetry config http-basic.airbyte-platform-internal-source {self.github_user} $CI_GITHUB_ACCESS_TOKEN",
728727
]
729728
)
730729
# Add GCP credentials from the environment and point google to their location (also required for connection-retriever)

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

-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ def is_current_process_wrapped_by_dagger_run() -> bool:
164164
@click.option("--pull-request-number", envvar="PULL_REQUEST_NUMBER", type=int)
165165
@click.option("--ci-git-user", default="octavia-squidington-iii", envvar="CI_GIT_USER", type=str)
166166
@click.option("--ci-github-access-token", envvar="CI_GITHUB_ACCESS_TOKEN", type=str, callback=wrap_in_secret)
167-
@click.option("--ci-github-maintenance-token", envvar="CI_GITHUB_MAINTENANCE_TOKEN", type=str, callback=wrap_in_secret)
168167
@click.option("--ci-report-bucket-name", envvar="CI_REPORT_BUCKET_NAME", type=str)
169168
@click.option("--ci-artifact-bucket-name", envvar="CI_ARTIFACT_BUCKET_NAME", type=str)
170169
@click.option(

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

-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def __init__(
8383
ci_gcp_credentials: Optional[Secret] = None,
8484
ci_git_user: Optional[str] = None,
8585
ci_github_access_token: Optional[Secret] = None,
86-
ci_github_maintenance_token: Optional[Secret] = None,
8786
run_step_options: RunStepOptions = RunStepOptions(),
8887
enable_report_auto_open: bool = True,
8988
secret_stores: Dict[str, SecretStore] | None = None,
@@ -130,7 +129,6 @@ def __init__(
130129
self.ci_report_bucket = ci_report_bucket
131130
self.ci_git_user = ci_git_user
132131
self.ci_github_access_token = ci_github_access_token
133-
self.ci_github_maintenance_token = ci_github_maintenance_token
134132
self.started_at = None
135133
self.stopped_at = None
136134
self.secrets_to_mask = []

0 commit comments

Comments
 (0)