-
Notifications
You must be signed in to change notification settings - Fork 361
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
WX-1307 Azure E2E test #7239
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 27b4031
WX-983 fully commented out github context action
JVThomas 5445798
WX-983 updated branch ref to point to testing/ticket branch
JVThomas 69914ca
WX-983 swapping workflow_dispatch for push just to test workflow skel…
JVThomas 474f485
WX-983 additional workflow updates
JVThomas cca2f44
WX-983 added basic e2e script, updated workflow script, need to test
JVThomas 3cfd3ad
WX-983 adjusted print statement
JVThomas 98031a3
WX-983 added branches attribute to workflow file
JVThomas ce6a0e9
WX-983 removed old comments, added push attribute
JVThomas 98b9786
WX-983 added needs attribute to create-bee step, input reference update
JVThomas 49ced65
WX-983 removed push attribute, changed needs and if conditions on som…
JVThomas 82f6904
WX-983 syntax corrections, removed invalid branches attribute
JVThomas 06596c1
WX-983 updates to env and action input variables
JVThomas d9b135f
WX-983 masked echoed token, step rearrangement, gitignore update
JVThomas 1987a6f
WX-983 adjustments to variable assignment, sleep calls in workflow an…
JVThomas fd98f28
WX-983 minor updates
JVThomas a111fa9
WX-983 ref updates, use dev for bee template testing
JVThomas 3dbd77f
WX-983 json correction, env variable renaming, still debugging workflow
JVThomas e5bb442
WX-983 added if conditional to attach step to check on access_token
JVThomas 4ea80f6
WX-983 updated workflow to match new expectations from terra-github-w…
JVThomas e5f0b10
WX-983 adding always() condition to see if cleanup jobs still run on …
JVThomas 970d24d
WX-983 going to just use always() just to test if condition
JVThomas b1f0276
WX-983 added missing comma
JVThomas 06f7724
WX-983 path correction on workflow
JVThomas fcf95d3
WX-983 workflow updates, test script corrections
JVThomas c29520a
WX-1306 workflow submission working against static workspace, need to…
JVThomas 2a020bd
WX-1306 submission and retrieval working, however workflow is failing…
JVThomas d66a859
WX-1306 script now runs basic workflow successfully
JVThomas 77bc1f6
WX-1306 added notes on commented out code
JVThomas 052cbb1
WX-1306 grouped env variables together
JVThomas 30f972f
WX-1306 additional comments
JVThomas cf02d48
WX-1306 restored hello.inputs, removed hello.options
JVThomas 642cec6
WX-1307 uncommented out provisioning function calls, added workflow c…
JVThomas 7c7fa2d
WX-1307 added additional methods to handle workspace cleanup
JVThomas a79f958
WX-1307 adjustements to workflow status conditionals
JVThomas 98babd2
WX-1307 updated workflow to use target-branch instead of hardcoded value
JVThomas f345cb0
WX-1307 defined workflow_id outside of try block, added comments to G…
JVThomas 92b0f2a
WX-1307 adding print statements to debug
JVThomas 5f8dd88
WX-1307 confirmed workflow submission erroring, moving print statemen…
JVThomas 2a2964a
WX-1307 added missing 'Bearer' in Authorization header
JVThomas 44a8cf8
WX-1307 using with to handle opening files, variables for sleep_timer…
JVThomas 50d6a0d
WX-1307 print exception rather than re-raising for better logs
JVThomas ff83308
WX-1307 trimmed white spaces and newlines from inputs, output excepti…
JVThomas 4703ed9
WX-1307 added exit code to trigger failure on GHA job report
JVThomas 0039523
WX-1307 attempt to delete workspace with rawls v2 endpoint, added sle…
JVThomas c07be2f
WX-1307 added debugging statements and deletion polling logic, gha wo…
JVThomas 2ecbd53
WX-1307 swapped out List for deque
JVThomas 4ac1c03
WX-1307 removed debug print statements
JVThomas 40690b6
WX-1307 removed old comments, added more logging statements for works…
JVThomas f2ddfc2
WX-1307 added exception handling to seperate workflow submission from…
JVThomas 6d9be20
WX-1307 pass in max_retry value in method call
JVThomas 9672bee
WX-1307 typo correction, added response logging for initial DELETE re…
JVThomas 857f3b7
WX-1307 corrected casing on appendleft method call
JVThomas 360b819
WX-1307 increased retry count for workspace deletion, outputting init…
JVThomas 7fe4cab
WX-1307 changed logging in workspace provisioning method
JVThomas e59b352
WX-1307 removed extra response output
JVThomas ec43d25
WX-1307 correction to failed cleanup message
JVThomas d30c61d
Merge branch 'develop' into WX-1307
JVThomas 21d8898
Merge branch 'develop' into WX-1307
JVThomas 1525d9e
WX-1307 added schedule to workflow (with variable adjustments since s…
JVThomas 0d2db59
WX-1307 corrected copy-paste error with init param assignments
JVThomas 428517d
WX-1307 removed unused files, PR feedback
JVThomas 25da780
WX-1307 switched contact email to broadinstitute
JVThomas 72fcd8a
WX-1307-port updated repo to use test workflow in dsp-reusable-workflows
JVThomas 74ed4cb
Generate auth token in child workflow
jgainerdewar b2e6c63
Temporarily keep BEE
jgainerdewar 8ae75a4
Temporarily use existing BEE
jgainerdewar e1e0c2f
Different way to set ref
jgainerdewar 131b541
Try direct dispatch
jgainerdewar ac62878
Fix
jgainerdewar 987fd3a
Hardcode branch for now
jgainerdewar 23817c0
Roll toward final BEE handling
jgainerdewar 6cd34e2
Return to normal BEE handling
jgainerdewar f2f12a0
Remove migrated Python script
jgainerdewar 44ab50d
Fix BEE name
jgainerdewar e537275
Rename github workflow
jgainerdewar 9df8f80
Revert rename for testing
jgainerdewar 9fffafc
Alert on Slack
jgainerdewar abd7372
Clean up inputs
jgainerdewar 1ead0b9
Undo hard-coded branch
jgainerdewar 86771d7
Parameterize dsp-reusable-workflows branch
jgainerdewar 2190700
Don't do that
jgainerdewar a756df2
Remove obsolete comment
jgainerdewar 1b6f5b2
Rename e2e test file
jgainerdewar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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? 🤔There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.