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

Np kill jobs from previous commits #1485

5 changes: 0 additions & 5 deletions .github/workflows/test_cram_to_unmapped_bams.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestCramToUnmappedBams:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_exome_germline_single_sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestExomeGermlineSingleSample:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_exome_reprocessing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestExomeReprocessing:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
95 changes: 63 additions & 32 deletions .github/workflows/test_illumina_genotyping_array.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestIlluminaGenotypingArray:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down Expand Up @@ -98,6 +93,17 @@ jobs:
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
fi

- name: Cancel Previous Runs
run: |
python3 scripts/firecloud_api/firecloud_api.py \
--workspace-namespace "${{ env.WORKSPACE_NAMESPACE }}" \
--workspace-name "${{ env.TESTING_WORKSPACE }}" \
--pipeline_name "${{ env.PIPELINE_NAME }}" \
--branch_name "${{ env.BRANCH_NAME }}" \
--sa-json-b64 "${{ secrets.PDT_TESTER_SA_B64 }}" \
--user "${{ env.USER }}" \
cancel_old_submissions

- name: Determine Github Commit Hash
id: determine_github_commit_hash
run: |
Expand All @@ -112,42 +118,67 @@ jobs:
exit 1
fi

- name: Fetch Dockstore Workflow Commit Hash
# - name: Fetch Dockstore Workflow Commit Hash
# run: |
# # Wait 5.5 minutes for Dockstore to update
# sleep 3
#
# DOCKSTORE_COMMIT_HASH_FROM_FETCH=$(python scripts/dockstore_api/fetch_dockstore_commit.py \
# $DOCKSTORE_TOKEN \
# $DOCKSTORE_PIPELINE_NAME \
# $BRANCH_NAME)
#
# # Export the commit hash as an environment variable
# echo "DOCKSTORE_COMMIT_HASH=$DOCKSTORE_COMMIT_HASH_FROM_FETCH" >> $GITHUB_ENV
# echo "Dockstore Commit Hash: $DOCKSTORE_COMMIT_HASH_FROM_FETCH"
#
# env:
# ## TODO NEED TO ADD DOCKSTORE_TOKEN FOR SERVICE ACCOUNT ##
# DOCKSTORE_TOKEN: ${{ secrets.DOCKSTORE_TOKEN }}
# DOCKSTORE_PIPELINE_NAME: ${{ env.DOCKSTORE_PIPELINE_NAME }}
# BRANCH_NAME: ${{ env.BRANCH_NAME }}


- name: Compare Dockstore and Commit Hashes with Retry
id: compare_hashes
run: |

# Wait 5.5 minutes for Dockstore to update
sleep 330

DOCKSTORE_COMMIT_HASH_FROM_FETCH=$(python scripts/dockstore_api/fetch_dockstore_commit.py \
$DOCKSTORE_TOKEN \
$DOCKSTORE_PIPELINE_NAME \
$BRANCH_NAME)

# Export the commit hash as an environment variable
echo "DOCKSTORE_COMMIT_HASH=$DOCKSTORE_COMMIT_HASH_FROM_FETCH" >> $GITHUB_ENV
echo "Dockstore Commit Hash: $DOCKSTORE_COMMIT_HASH_FROM_FETCH"
MAX_WAIT_TIME=$((15 * 60)) # 15 minutes in seconds
WAIT_INTERVAL=60 # 1 minute in seconds
TOTAL_WAITED=0

echo "Starting hash comparison with retry mechanism..."

while [ $TOTAL_WAITED -lt $MAX_WAIT_TIME ]; do
echo "Fetching Dockstore Commit Hash..."
DOCKSTORE_COMMIT_HASH=$(python scripts/dockstore_api/fetch_dockstore_commit.py \
$DOCKSTORE_TOKEN \
$DOCKSTORE_PIPELINE_NAME \
$BRANCH_NAME)
echo "Fetched Dockstore Commit Hash: $DOCKSTORE_COMMIT_HASH"

echo "GitHub Commit Hash: $GITHUB_COMMIT_HASH"

if [ "$DOCKSTORE_COMMIT_HASH" == "$GITHUB_COMMIT_HASH" ]; then
echo "Success: The Dockstore Commit Hash matches the GitHub Commit Hash."
exit 0
else
echo "Mismatch found: $DOCKSTORE_COMMIT_HASH != $GITHUB_COMMIT_HASH"
echo "Retrying in $WAIT_INTERVAL seconds..."
sleep $WAIT_INTERVAL
TOTAL_WAITED=$((TOTAL_WAITED + WAIT_INTERVAL))
fi
done

echo "Error: The Dockstore Commit Hash does not match the GitHub Commit Hash after 15 minutes of retries!"
exit 1
env:
## TODO NEED TO ADD DOCKSTORE_TOKEN FOR SERVICE ACCOUNT ##
DOCKSTORE_TOKEN: ${{ secrets.DOCKSTORE_TOKEN }}
DOCKSTORE_PIPELINE_NAME: ${{ env.DOCKSTORE_PIPELINE_NAME }}
BRANCH_NAME: ${{ env.BRANCH_NAME }}

- name: Compare Dockstore and Commit Hashes
id: compare_hashes
run: |
echo "Comparing hashes..."
echo "Dockstore Commit Hash: $DOCKSTORE_COMMIT_HASH"
echo "GitHub Commit Hash: $GITHUB_COMMIT_HASH"

if [ "$DOCKSTORE_COMMIT_HASH" != "$GITHUB_COMMIT_HASH" ]; then
echo "Error: The Dockstore Commit Hash does not match the GitHub Commit Hash!"
echo "Mismatch found: $DOCKSTORE_COMMIT_HASH != $GITHUB_COMMIT_HASH"
exit 1
else
echo "Success: The Dockstore Commit Hash matches the GitHub Commit Hash."
fi
env:
DOCKSTORE_COMMIT_HASH: ${{ env.DOCKSTORE_COMMIT_HASH }}
GITHUB_COMMIT_HASH: ${{ env.GITHUB_COMMIT_HASH }}

- name: Set Test Type
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_imputation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestImputation:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_joint_genotyping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestJointGenotyping:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_multisamplesmartseq2singlenucleus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestMultiSampleSmartSeq2SingleNucleus:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_optimus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestOptimus:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_pairedtag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestPairedTag:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_reblockGVCF.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestReblockGVCF:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_rna_with_umis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestRNAWithUMIsPipeline:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_slideseq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestSlideSeq:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_snm3c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

Testsnm3C:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_ultima_genomics_joint_genotyping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestUltimaGenomicsJointGenotyping:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestUltimaGenomicsWholeGenomeCramOnly:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestUltimaGenomicsWholeGenomeGermline:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test_variant_calling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ env:


jobs:
check-authorization:
uses: ./.github/workflows/authorized_users.yml

TestVariantCalling:
needs: check-authorization
if: ${{ needs.check-authorization.outputs.approved == 'true' }}
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
Expand Down
Loading
Loading