Skip to content

Adds valid PAT testing to existing ec2 pipes #11486

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

Merged
merged 2 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
24 changes: 22 additions & 2 deletions .github/workflows/gke-kube-test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,29 @@ on:
required: false

jobs:
find_valid_pat:
name: "Find a PAT with room for actions"
timeout-minutes: 10
runs-on: ubuntu-latest
outputs:
pat: ${{ steps.variables.outputs.pat }}
steps:
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Check PAT rate limits
id: variables
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.SUPERTOPHER_PAT }} \
Copy link
Contributor

@davinchia davinchia Mar 29, 2022

Choose a reason for hiding this comment

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

we should update this to the token list we spoke about before merging this in.

Copy link
Contributor

Choose a reason for hiding this comment

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

same for the rest of the jobs.

${{ secrets.AIRBYTEIO_PAT }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} \
${{ secrets.OCTAVIA_PAT }}
start-gke-kube-acceptance-test-runner:
timeout-minutes: 10
name: Start GKE Kube Acceptance Test EC2 Runner
runs-on: ubuntu-latest
needs: find_valid_pat
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
Expand All @@ -34,7 +53,7 @@ jobs:
with:
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
github-token: ${{ needs.find_valid_pat.outputs.pat }}
gke-kube-acceptance-test:
# In case of self-hosted EC2 errors, removed the `needs` line and switch back to running on ubuntu-latest.
needs: start-gke-kube-acceptance-test-runner # required to start the main job when the runner is ready
Expand Down Expand Up @@ -124,6 +143,7 @@ jobs:
needs:
- start-gke-kube-acceptance-test-runner # required to get output from the start-runner job
- gke-kube-acceptance-test # required to wait when the main job is done
- find_valid_pat
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
Expand All @@ -137,6 +157,6 @@ jobs:
uses: supertopher/[email protected]
with:
mode: stop
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
github-token: ${{ needs.find_valid_pat.outputs.pat }}
label: ${{ needs.start-gke-kube-acceptance-test-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-gke-kube-acceptance-test-runner.outputs.ec2-instance-id }}
24 changes: 22 additions & 2 deletions .github/workflows/publish-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,30 @@ on:
required: false

jobs:
find_valid_pat:
name: "Find a PAT with room for actions"
timeout-minutes: 10
runs-on: ubuntu-latest
outputs:
pat: ${{ steps.variables.outputs.pat }}
steps:
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Check PAT rate limits
id: variables
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.SUPERTOPHER_PAT }} \
${{ secrets.AIRBYTEIO_PAT }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} \
${{ secrets.OCTAVIA_PAT }}
## Gradle Build
# In case of self-hosted EC2 errors, remove this block.
start-publish-image-runner:
name: Start Build EC2 Runner
runs-on: ubuntu-latest
needs: find_valid_pat
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
Expand All @@ -42,7 +61,7 @@ jobs:
with:
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
github-token: ${{ needs.find_valid_pat.outputs.pat }}
# 80 gb disk
ec2-image-id: ami-0d648081937c75a73
publish-image:
Expand Down Expand Up @@ -165,6 +184,7 @@ jobs:
needs:
- start-publish-image-runner # required to get output from the start-runner job
- publish-image # required to wait when the main job is done
- find_valid_pat
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
Expand All @@ -178,6 +198,6 @@ jobs:
uses: supertopher/[email protected]
with:
mode: stop
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
github-token: ${{ needs.find_valid_pat.outputs.pat }}
label: ${{ needs.start-publish-image-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-publish-image-runner.outputs.ec2-instance-id }}
21 changes: 20 additions & 1 deletion .github/workflows/publish-external-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ on:
default: master

jobs:
find_valid_pat:
name: "Find a PAT with room for actions"
timeout-minutes: 10
runs-on: ubuntu-latest
outputs:
pat: ${{ steps.variables.outputs.pat }}
steps:
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Check PAT rate limits
id: variables
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.SUPERTOPHER_PAT }} \
${{ secrets.AIRBYTEIO_PAT }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} \
${{ secrets.OCTAVIA_PAT }}
## Gradle Build
# In case of self-hosted EC2 errors, remove this block.
start-publish-image-runner:
Expand Down Expand Up @@ -105,6 +123,7 @@ jobs:
needs:
- start-publish-image-runner # required to get output from the start-runner job
- publish-image # required to wait when the main job is done
- find_valid_pat
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
Expand All @@ -118,6 +137,6 @@ jobs:
uses: supertopher/[email protected]
with:
mode: stop
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
github-token: ${{ needs.find_valid_pat.outputs.pat }}
label: ${{ needs.start-publish-image-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-publish-image-runner.outputs.ec2-instance-id }}
21 changes: 20 additions & 1 deletion .github/workflows/release-airbyte-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@ on:
required: true
default: "patch"
jobs:
find_valid_pat:
name: "Find a PAT with room for actions"
timeout-minutes: 10
runs-on: ubuntu-latest
outputs:
pat: ${{ steps.variables.outputs.pat }}
steps:
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Check PAT rate limits
id: variables
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.SUPERTOPHER_PAT }} \
${{ secrets.AIRBYTEIO_PAT }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} \
${{ secrets.OCTAVIA_PAT }}
# In case of self-hosted EC2 errors, remove this block.
start-release-airbyte-runner:
name: "Release Airbyte: Start EC2 Runner"
Expand Down Expand Up @@ -99,6 +117,7 @@ jobs:
needs:
- start-release-airbyte-runner # required to get output from the start-runner job
- releaseAirbyte # required to wait when the main job is done
- find_valid_pat
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
Expand All @@ -112,6 +131,6 @@ jobs:
uses: supertopher/[email protected]
with:
mode: stop
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
github-token: ${{ needs.find_valid_pat.outputs.pat }}
label: ${{ needs.start-release-airbyte-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-release-airbyte-runner.outputs.ec2-instance-id }}
21 changes: 20 additions & 1 deletion .github/workflows/test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@ on:
required: false

jobs:
find_valid_pat:
name: "Find a PAT with room for actions"
timeout-minutes: 10
runs-on: ubuntu-latest
outputs:
pat: ${{ steps.variables.outputs.pat }}
steps:
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Check PAT rate limits
id: variables
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.SUPERTOPHER_PAT }} \
${{ secrets.AIRBYTEIO_PAT }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} \
${{ secrets.OCTAVIA_PAT }}
start-test-runner:
name: Start Build EC2 Runner
timeout-minutes: 10
Expand Down Expand Up @@ -155,6 +173,7 @@ jobs:
needs:
- start-test-runner # required to get output from the start-runner job
- integration-test # required to wait when the main job is done
- find_valid_pat
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
Expand All @@ -168,6 +187,6 @@ jobs:
uses: supertopher/[email protected]
with:
mode: stop
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
github-token: ${{ needs.find_valid_pat.outputs.pat }}
label: ${{ needs.start-test-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-test-runner.outputs.ec2-instance-id }}
21 changes: 20 additions & 1 deletion .github/workflows/test-performance-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ on:
required: false

jobs:
find_valid_pat:
name: "Find a PAT with room for actions"
timeout-minutes: 10
runs-on: ubuntu-latest
outputs:
pat: ${{ steps.variables.outputs.pat }}
steps:
- name: Checkout Airbyte
uses: actions/checkout@v2
- name: Check PAT rate limits
id: variables
run: |
./tools/bin/find_non_rate_limited_PAT \
${{ secrets.SUPERTOPHER_PAT }} \
${{ secrets.AIRBYTEIO_PAT }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} \
${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} \
${{ secrets.OCTAVIA_PAT }}
start-test-runner:
name: Start Build EC2 Runner
timeout-minutes: 10
Expand Down Expand Up @@ -158,6 +176,7 @@ jobs:
needs:
- start-test-runner # required to get output from the start-runner job
- performance-test # required to wait when the main job is done
- find_valid_pat
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
Expand All @@ -171,6 +190,6 @@ jobs:
uses: supertopher/[email protected]
with:
mode: stop
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
github-token: ${{ needs.find_valid_pat.outputs.pat }}
label: ${{ needs.start-test-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-test-runner.outputs.ec2-instance-id }}