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

WX-1307 Azure E2E test #7239

Merged
merged 84 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
fdca4a2
WX-983 initial skeleton of workflow, checking if test call works and …
JVThomas Aug 14, 2023
27b4031
WX-983 fully commented out github context action
JVThomas Aug 14, 2023
5445798
WX-983 updated branch ref to point to testing/ticket branch
JVThomas Aug 14, 2023
69914ca
WX-983 swapping workflow_dispatch for push just to test workflow skel…
JVThomas Aug 14, 2023
474f485
WX-983 additional workflow updates
JVThomas Aug 22, 2023
cca2f44
WX-983 added basic e2e script, updated workflow script, need to test
JVThomas Aug 28, 2023
3cfd3ad
WX-983 adjusted print statement
JVThomas Aug 28, 2023
98031a3
WX-983 added branches attribute to workflow file
JVThomas Aug 28, 2023
ce6a0e9
WX-983 removed old comments, added push attribute
JVThomas Aug 28, 2023
98b9786
WX-983 added needs attribute to create-bee step, input reference update
JVThomas Aug 28, 2023
49ced65
WX-983 removed push attribute, changed needs and if conditions on som…
JVThomas Aug 29, 2023
82f6904
WX-983 syntax corrections, removed invalid branches attribute
JVThomas Aug 29, 2023
06596c1
WX-983 updates to env and action input variables
JVThomas Aug 29, 2023
d9b135f
WX-983 masked echoed token, step rearrangement, gitignore update
JVThomas Aug 29, 2023
1987a6f
WX-983 adjustments to variable assignment, sleep calls in workflow an…
JVThomas Sep 6, 2023
fd98f28
WX-983 minor updates
JVThomas Sep 11, 2023
a111fa9
WX-983 ref updates, use dev for bee template testing
JVThomas Sep 11, 2023
3dbd77f
WX-983 json correction, env variable renaming, still debugging workflow
JVThomas Sep 12, 2023
e5bb442
WX-983 added if conditional to attach step to check on access_token
JVThomas Sep 12, 2023
4ea80f6
WX-983 updated workflow to match new expectations from terra-github-w…
JVThomas Sep 12, 2023
e5f0b10
WX-983 adding always() condition to see if cleanup jobs still run on …
JVThomas Sep 15, 2023
970d24d
WX-983 going to just use always() just to test if condition
JVThomas Sep 15, 2023
b1f0276
WX-983 added missing comma
JVThomas Sep 15, 2023
06f7724
WX-983 path correction on workflow
JVThomas Sep 18, 2023
fcf95d3
WX-983 workflow updates, test script corrections
JVThomas Sep 20, 2023
c29520a
WX-1306 workflow submission working against static workspace, need to…
JVThomas Oct 3, 2023
2a020bd
WX-1306 submission and retrieval working, however workflow is failing…
JVThomas Oct 3, 2023
d66a859
WX-1306 script now runs basic workflow successfully
JVThomas Oct 3, 2023
77bc1f6
WX-1306 added notes on commented out code
JVThomas Oct 3, 2023
052cbb1
WX-1306 grouped env variables together
JVThomas Oct 3, 2023
30f972f
WX-1306 additional comments
JVThomas Oct 3, 2023
cf02d48
WX-1306 restored hello.inputs, removed hello.options
JVThomas Oct 3, 2023
642cec6
WX-1307 uncommented out provisioning function calls, added workflow c…
JVThomas Oct 4, 2023
7c7fa2d
WX-1307 added additional methods to handle workspace cleanup
JVThomas Oct 5, 2023
a79f958
WX-1307 adjustements to workflow status conditionals
JVThomas Oct 6, 2023
98babd2
WX-1307 updated workflow to use target-branch instead of hardcoded value
JVThomas Oct 6, 2023
f345cb0
WX-1307 defined workflow_id outside of try block, added comments to G…
JVThomas Oct 6, 2023
92b0f2a
WX-1307 adding print statements to debug
JVThomas Oct 6, 2023
5f8dd88
WX-1307 confirmed workflow submission erroring, moving print statemen…
JVThomas Oct 6, 2023
2a2964a
WX-1307 added missing 'Bearer' in Authorization header
JVThomas Oct 6, 2023
44a8cf8
WX-1307 using with to handle opening files, variables for sleep_timer…
JVThomas Oct 10, 2023
50d6a0d
WX-1307 print exception rather than re-raising for better logs
JVThomas Oct 10, 2023
ff83308
WX-1307 trimmed white spaces and newlines from inputs, output excepti…
JVThomas Oct 10, 2023
4703ed9
WX-1307 added exit code to trigger failure on GHA job report
JVThomas Oct 10, 2023
0039523
WX-1307 attempt to delete workspace with rawls v2 endpoint, added sle…
JVThomas Oct 11, 2023
c07be2f
WX-1307 added debugging statements and deletion polling logic, gha wo…
JVThomas Oct 11, 2023
2ecbd53
WX-1307 swapped out List for deque
JVThomas Oct 12, 2023
4ac1c03
WX-1307 removed debug print statements
JVThomas Oct 12, 2023
40690b6
WX-1307 removed old comments, added more logging statements for works…
JVThomas Oct 12, 2023
f2ddfc2
WX-1307 added exception handling to seperate workflow submission from…
JVThomas Oct 12, 2023
6d9be20
WX-1307 pass in max_retry value in method call
JVThomas Oct 12, 2023
9672bee
WX-1307 typo correction, added response logging for initial DELETE re…
JVThomas Oct 12, 2023
857f3b7
WX-1307 corrected casing on appendleft method call
JVThomas Oct 12, 2023
360b819
WX-1307 increased retry count for workspace deletion, outputting init…
JVThomas Oct 13, 2023
7fe4cab
WX-1307 changed logging in workspace provisioning method
JVThomas Oct 13, 2023
e59b352
WX-1307 removed extra response output
JVThomas Oct 13, 2023
ec43d25
WX-1307 correction to failed cleanup message
JVThomas Oct 13, 2023
d30c61d
Merge branch 'develop' into WX-1307
JVThomas Oct 13, 2023
21d8898
Merge branch 'develop' into WX-1307
JVThomas Oct 16, 2023
1525d9e
WX-1307 added schedule to workflow (with variable adjustments since s…
JVThomas Oct 16, 2023
0d2db59
WX-1307 corrected copy-paste error with init param assignments
JVThomas Oct 16, 2023
428517d
WX-1307 removed unused files, PR feedback
JVThomas Oct 16, 2023
25da780
WX-1307 switched contact email to broadinstitute
JVThomas Oct 16, 2023
72fcd8a
WX-1307-port updated repo to use test workflow in dsp-reusable-workflows
JVThomas Oct 17, 2023
74ed4cb
Generate auth token in child workflow
jgainerdewar Oct 20, 2023
b2e6c63
Temporarily keep BEE
jgainerdewar Oct 20, 2023
8ae75a4
Temporarily use existing BEE
jgainerdewar Oct 20, 2023
e1e0c2f
Different way to set ref
jgainerdewar Oct 20, 2023
131b541
Try direct dispatch
jgainerdewar Oct 20, 2023
ac62878
Fix
jgainerdewar Oct 20, 2023
987fd3a
Hardcode branch for now
jgainerdewar Oct 20, 2023
23817c0
Roll toward final BEE handling
jgainerdewar Oct 22, 2023
6cd34e2
Return to normal BEE handling
jgainerdewar Oct 22, 2023
f2f12a0
Remove migrated Python script
jgainerdewar Oct 22, 2023
44ab50d
Fix BEE name
jgainerdewar Oct 22, 2023
e537275
Rename github workflow
jgainerdewar Oct 23, 2023
9df8f80
Revert rename for testing
jgainerdewar Oct 23, 2023
9fffafc
Alert on Slack
jgainerdewar Oct 23, 2023
abd7372
Clean up inputs
jgainerdewar Oct 25, 2023
1ead0b9
Undo hard-coded branch
jgainerdewar Oct 26, 2023
86771d7
Parameterize dsp-reusable-workflows branch
jgainerdewar Oct 26, 2023
2190700
Don't do that
jgainerdewar Oct 26, 2023
a756df2
Remove obsolete comment
jgainerdewar Oct 26, 2023
1b6f5b2
Rename e2e test file
jgainerdewar Oct 26, 2023
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
136 changes: 136 additions & 0 deletions .github/workflows/azure_e2e_run_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: 'Azure e2e - Run Workflow'
on:
schedule:
- cron: '0 16 * * *' # UTC 4pm, EST 11am, EDT 12pm
workflow_dispatch:
inputs:
target-branch:
description: 'Branch name of dsp-reusable-workflows repo to run tests on'
required: true
default: 'main'
type: string
owner-subject:
description: 'Owner of billing project'
required: true
default: '[email protected]'
type: string
service-account:
description: 'Email address or unique identifier of the Google Cloud service account for which to generate credentials'
required: true
default: '[email protected]'
type: string

env:
BROADBOT_TOKEN: '${{ secrets.BROADBOT_GITHUB_TOKEN }}' # github token for access to kick off a job in the private repo
RUN_NAME_SUFFIX: '${{ github.event.repository.name }}-${{ github.run_id }}-${{ github.run_attempt }}'

jobs:

# This job provisions useful parameters for e2e tests
params-gen:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
outputs:
project-name: ${{ steps.gen.outputs.project_name }}
bee-name: '${{ github.event.repository.name }}-${{ github.run_id }}-${{ github.run_attempt}}-dev'
steps:
- name: Generate a random billing project name
id: 'gen'
run: |
project_name=$(echo "tmp-billing-project-$(uuidgen)" | cut -c -30)
echo "project_name=${project_name}" >> $GITHUB_OUTPUT

create-bee-workflow:
runs-on: ubuntu-latest
needs: [params-gen]
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Dispatch to terra-github-workflows
uses: broadinstitute/workflow-dispatch@v3
with:
workflow: bee-create
repo: broadinstitute/terra-github-workflows
ref: refs/heads/main
token: ${{ env.BROADBOT_TOKEN }}
# NOTE: Opting to use "prod" instead of custom tag since I specifically want to test against the current prod state
# NOTE: For testing/development purposes I'm using dev
inputs: '{ "bee-name": "${{ needs.params-gen.outputs.bee-name }}", "version-template": "dev", "bee-template-name": "rawls-e2e-azure-tests"}'

create-and-attach-billing-project-to-landing-zone-workflow:
runs-on: ubuntu-latest
needs: [create-bee-workflow, params-gen]
steps:
- name: dispatch to terra-github-workflows
uses: broadinstitute/workflow-dispatch@v3
with:
workflow: attach-billing-project-to-landing-zone.yaml
repo: broadinstitute/terra-github-workflows
ref: refs/heads/main
token: ${{ env.BROADBOT_TOKEN }}
inputs: '{
"run-name": "attach-billing-project-to-landing-zone-${{ env.RUN_NAME_SUFFIX }}",
"bee-name": "${{ needs.params-gen.outputs.bee-name }}",
"billing-project": "${{ needs.params-gen.outputs.project-name }}",
"billing-project-creator": "${{ inputs.owner-subject }}",
"service-account": "${{inputs.service-account}}" }'

run-cromwell-az-e2e:
needs: [params-gen, create-and-attach-billing-project-to-landing-zone-workflow]
permissions:
contents: read
id-token: write
uses: "broadinstitute/dsp-reusable-workflows/.github/workflows/cromwell-az-e2e-test.yaml@main"
with:
branch: "${{ inputs.target-branch }}"
bee-name: "${{ needs.params-gen.outputs.bee-name }}"
billing-project-name: "${{ needs.params-gen.outputs.project-name }}"

delete-billing-project-v2-from-bee-workflow:
continue-on-error: true
runs-on: ubuntu-latest
needs: [run-cromwell-az-e2e, create-and-attach-billing-project-to-landing-zone-workflow, params-gen]
if: always()
steps:
- name: dispatch to terra-github-workflows
uses: broadinstitute/workflow-dispatch@v3
with:
workflow: .github/workflows/delete-billing-project-v2-from-bee.yaml
repo: broadinstitute/terra-github-workflows
ref: refs/heads/main
token: ${{ env.BROADBOT_TOKEN }}
inputs: '{
"run-name": "delete-billing-project-v2-from-bee-${{ env.RUN_NAME_SUFFIX }}",
"bee-name": "${{ needs.params-gen.outputs.bee-name }}",
"billing-project": "${{ needs.params-gen.outputs.project-name }}",
"billing-project-owner": "${{ inputs.owner-subject }}",
"service-account": "${{ inputs.service-account }}",
"silent-on-failure": "false" }'

destroy-bee-workflow:
runs-on: ubuntu-latest
needs: [params-gen, create-bee-workflow, delete-billing-project-v2-from-bee-workflow]
if: always()
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: dispatch to terra-github-workflows
uses: broadinstitute/workflow-dispatch@v3
with:
workflow: bee-destroy.yaml
repo: broadinstitute/terra-github-workflows
ref: refs/heads/main
token: ${{ env.BROADBOT_TOKEN }}
inputs: '{ "bee-name": "${{ needs.params-gen.outputs.bee-name }}" }'
wait-for-completion: true

report-workflow:
uses: broadinstitute/sherlock/.github/workflows/client-report-workflow.yaml@main
with:
notify-slack-channels-upon-workflow-failure: "#cromwell_jenkins_ci_errors"
permissions:
id-token: write
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ console_output.txt
expected.json
run_mode_metadata.json

#bloop files
/.bloop

# custom config
cromwell-executions
cromwell-test-executions
Expand Down Expand Up @@ -55,3 +58,6 @@ tesk_application.conf
**/venv/
exome_germline_single_sample_v1.3/
**/*.pyc

# GHA credentials
gha-creds-*.json
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this and bloop being used anywhere? 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think some folks on the team use bloop for Scala builds. I assume gha-creds is for being able to test things locally?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not used in this PR directly, I assume Justin added these during his development work.

Loading