From 9bdcf672b8db2d7debc37504350dd04cd93d4504 Mon Sep 17 00:00:00 2001 From: Jose Soto Date: Mon, 17 Jun 2024 12:29:38 -0400 Subject: [PATCH] first pass at renaming things from tsps to teaspoons for non cosmetic changes --- .github/actions/create-bee/action.yml | 2 +- .github/workflows/build-and-test.yml | 2 +- .github/workflows/run-e2e-tests.yaml | 6 +++--- .github/workflows/tag-publish.yml | 6 +++--- .github/workflows/workflow-tester.yml | 2 +- README.md | 14 +++++++------- scripts/write-config.sh | 2 +- service/build.gradle | 2 +- .../dependencies/stairway/JobService.java | 6 ++---- service/src/main/resources/application.yml | 4 ++-- 10 files changed, 22 insertions(+), 24 deletions(-) diff --git a/.github/actions/create-bee/action.yml b/.github/actions/create-bee/action.yml index d79abb6a..5843c54a 100644 --- a/.github/actions/create-bee/action.yml +++ b/.github/actions/create-bee/action.yml @@ -14,7 +14,7 @@ inputs: required: false type: string custom_version_json: - description: 'json containing custom versions to push. e.g. {"tsps":{"appVersion":"0.0.81-66ceced"}}' + description: 'json containing custom versions to push. e.g. {"teaspoons":{"appVersion":"0.0.81-66ceced"}}' required: false type: string diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index fd62cd72..7aeee8e1 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -136,7 +136,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} with: status: failure - channel: "#terra-tsps-alerts" + channel: "#terra-teaspoons-alerts" username: "Teaspoons push to main branch" author_name: "build-and-test" icon_emoji: ":triangular_ruler:" diff --git a/.github/workflows/run-e2e-tests.yaml b/.github/workflows/run-e2e-tests.yaml index 50e0cbaa..525530ca 100644 --- a/.github/workflows/run-e2e-tests.yaml +++ b/.github/workflows/run-e2e-tests.yaml @@ -42,7 +42,7 @@ jobs: if [ -z ${{ inputs.custom-app-version }} ]; then echo "custom-app-version-formatted={}" >> $GITHUB_OUTPUT else - echo "custom-app-version-formatted={\\\"tsps\\\": {\\\"appVersion\\\":\\\"${{ inputs.custom-app-version }}\\\"} }" >> $GITHUB_OUTPUT + echo "custom-app-version-formatted={\\\"teaspoons\\\": {\\\"appVersion\\\":\\\"${{ inputs.custom-app-version }}\\\"} }" >> $GITHUB_OUTPUT fi project_name=$(echo "tmp-billing-project-$(uuidgen)" | cut -c -30) echo "project_name=${project_name}" >> $GITHUB_OUTPUT @@ -89,7 +89,7 @@ jobs: permissions: contents: read id-token: write - uses: broadinstitute/dsp-reusable-workflows/.github/workflows/run_tsps_e2e_tests.yaml@main + uses: broadinstitute/dsp-reusable-workflows/.github/workflows/run_teaspoons_e2e_tests.yaml@main with: billing-project-name: '${{ needs.init-github-context-and-params-gen.outputs.project-name }}' bee-name: '${{ needs.init-github-context-and-params-gen.outputs.bee-name }}' @@ -116,6 +116,6 @@ jobs: uses: broadinstitute/sherlock/.github/workflows/client-report-workflow.yaml@main if: github.ref == 'refs/heads/main' with: - notify-slack-channels-upon-workflow-completion: "#terra-tsps-alerts" + notify-slack-channels-upon-workflow-completion: "#terra-teaspoons-alerts" permissions: id-token: write diff --git a/.github/workflows/tag-publish.yml b/.github/workflows/tag-publish.yml index fcaf40ec..e52f2ac1 100644 --- a/.github/workflows/tag-publish.yml +++ b/.github/workflows/tag-publish.yml @@ -216,7 +216,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} with: - channel: '#terra-tsps-alerts' + channel: '#terra-teaspoons-alerts' status: failure author_name: Publish image fields: job @@ -230,7 +230,7 @@ jobs: if: ${{ needs.bump-check.outputs.is-bump == 'no' }} with: new-version: ${{ needs.tag-job.outputs.tag }} - chart-name: 'tsps' + chart-name: 'teaspoons' permissions: contents: 'read' id-token: 'write' @@ -242,7 +242,7 @@ jobs: if: ${{ needs.bump-check.outputs.is-bump == 'no' && github.event_name != 'pull_request' }} with: new-version: ${{ needs.tag-job.outputs.tag }} - chart-name: 'tsps' + chart-name: 'teaspoons' environment-name: 'dev' secrets: sync-git-token: ${{ secrets.BROADBOT_TOKEN }} diff --git a/.github/workflows/workflow-tester.yml b/.github/workflows/workflow-tester.yml index 7a947fd9..f6b42ff5 100644 --- a/.github/workflows/workflow-tester.yml +++ b/.github/workflows/workflow-tester.yml @@ -100,7 +100,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} with: status: ${{ job.status }} - channel: "#terra-tsps-alerts" + channel: "#terra-teaspoons-alerts" username: "Teaspoons push to main branch" author_name: "build-and-test" icon_emoji: ":triangular_ruler:" diff --git a/README.md b/README.md index 53af7a02..11e7a231 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Overview -Terra Scientific Pipelines Service, or teaspoons, facilitates running a number of defined scientific pipelines +Terra Scientific Pipelines Service, or Teaspoons, facilitates running a number of defined scientific pipelines on behalf of users that users can't run themselves in Terra. The most common reason for this is that the pipeline accesses proprietary data that users are not allowed to access directly, but that may be used as e.g. a reference panel for imputation. @@ -62,7 +62,7 @@ To run locally: If using Intellij (only IDE we use on the team), you can run the server with a debugger. Follow the steps above but instead of running `./gradlew bootRun` to spin up the server, you can run (debug) the App.java class through intellij and set breakpoints in the code. Be sure to set the -GOOGLE_APPLICATION_CREDENTIALS=config/tsps-sa.json in the Run/Debug configuration Environment Variables. +GOOGLE_APPLICATION_CREDENTIALS=config/teaspoons-sa.json in the Run/Debug configuration Environment Variables. ### Running Tests/Linter Locally - Testing @@ -88,7 +88,7 @@ SonarQube and want to debug the problem locally, you need to get the sonar token before running the gradle task. ```shell -export SONAR_TOKEN=$(vault read -field=sonar_token secret/secops/ci/sonarcloud/tsps) +export SONAR_TOKEN=$(vault read -field=sonar_token secret/secops/ci/sonarcloud/teaspoons) ./gradlew sonarqube ``` @@ -106,7 +106,7 @@ does all the setup for you. Clone that repo and make sure you're either on Broad to the VPN. Then run the following command: ```shell -./db/psql-connect.sh dev tsps +./db/psql-connect.sh dev teaspoons ``` ### Deploying to dev @@ -115,8 +115,8 @@ Upon merging to main, the dev environment will be automatically deployed via the (that workflow is defined [here](https://github.com/DataBiosphere/terra-scientific-pipelines-service/blob/main/.github/workflows/tag-publish.yml)). The two tasks `report-to-sherlock` and `set-version-in-dev` will prompt Sherlock to deploy the new version to dev. -You can check the status of the deployment in [Beehive](https://beehive.dsp-devops.broadinstitute.org/apps/tsps) and in -[ArgoCD](https://ap-argocd.dsp-devops.broadinstitute.org/applications/ap-argocd/tsps-dev). +You can check the status of the deployment in [Beehive](https://beehive.dsp-devops.broadinstitute.org/apps/teaspoons) and in +[ArgoCD](https://ap-argocd.dsp-devops.broadinstitute.org/applications/ap-argocd/teaspoons-dev). For more information about deployment to dev, check out DevOps' [excellent documentation](https://docs.google.com/document/d/1lkUkN2KOpHKWufaqw_RIE7EN3vN4G2xMnYBU83gi8VA/). @@ -129,7 +129,7 @@ See [this DSP blog post](https://broadworkbench.atlassian.net/wiki/x/AoGlrg) for ### Running the end-to-end tests The end-to-end test is specified in `.github/workflows/run-e2e-tests.yaml`. It calls [the test script defined -in the dsp-reusable-workflows repo](https://github.com/broadinstitute/dsp-reusable-workflows/blob/main/e2e-test/tsps_e2e_test.py). +in the dsp-reusable-workflows repo](https://github.com/broadinstitute/dsp-reusable-workflows/blob/main/e2e-test/teaspoons_e2e_test.py). The end-to-end test is automatically run nightly on the dev environment. diff --git a/scripts/write-config.sh b/scripts/write-config.sh index 31b08b36..1e62ec24 100755 --- a/scripts/write-config.sh +++ b/scripts/write-config.sh @@ -181,7 +181,7 @@ function vaultgetdb { } # grab teaspoons service account json from vault -vaultget "secret/dsde/firecloud/${fcenv}/tsps/tsps-account.json" "${outputdir}/tsps-sa.json" +vaultget "secret/dsde/firecloud/${fcenv}/teaspoons/teaspoons-account.json" "${outputdir}/teaspoons-sa.json" # We made it to the end, so record the target and avoid redos echo "$target" > "${outputdir}/target.txt" diff --git a/service/build.gradle b/service/build.gradle index 05369a65..47ad118c 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -119,7 +119,7 @@ dependencies { // set GOOGLE_APPLICATION_CREDENTIALS if this file exists - should only exist when // write-config.sh is run. // GOOGLE_APPLICATION_CREDENTIALS is set for us when running in a deployed environment -def googleCredentialsFile = "${rootDir}/config/tsps-sa.json" +def googleCredentialsFile = "${rootDir}/config/teaspoons-sa.json" bootRun { if(project.file(googleCredentialsFile).exists()) { environment.put("GOOGLE_APPLICATION_CREDENTIALS", "${googleCredentialsFile}") diff --git a/service/src/main/java/bio/terra/pipelines/dependencies/stairway/JobService.java b/service/src/main/java/bio/terra/pipelines/dependencies/stairway/JobService.java index f2639dcb..76ca289a 100644 --- a/service/src/main/java/bio/terra/pipelines/dependencies/stairway/JobService.java +++ b/service/src/main/java/bio/terra/pipelines/dependencies/stairway/JobService.java @@ -156,8 +156,7 @@ public JobResultOrException retrieveJobResult( switch (flightState.getFlightStatus()) { case FATAL: - logAlert( - "Teaspoons Stairway flight {} encountered dismal failure", flightState.getFlightId()); + logAlert("Stairway flight {} encountered dismal failure", flightState.getFlightId()); return handleFailedFlight(flightState); case ERROR: return handleFailedFlight(flightState); @@ -264,8 +263,7 @@ private JobResultOrException handleFailedFlight(FlightState flightState) .exception(new InternalServerErrorException("wrap non-runtime exception", exception)); } } - logAlert( - "Teaspoons Stairway flight {} failed with no exception given", flightState.getFlightId()); + logAlert("Stairway flight {} failed with no exception given", flightState.getFlightId()); throw new InvalidResultStateException("Failed operation with no exception reported."); } diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml index 245e2c50..1f34c91a 100644 --- a/service/src/main/resources/application.yml +++ b/service/src/main/resources/application.yml @@ -25,7 +25,7 @@ env: authorityEndpoint: ${OIDC_AUTHORITY_ENDPOINT:https://terradevb2c.b2clogin.com/terradevb2c.onmicrosoft.com/oauth2/v2.0/authorize?p=b2c_1a_signup_signin_dev} tokenEndpoint: ${OIDC_TOKEN_ENDPOINT:https://terradevb2c.b2clogin.com/terradevb2c.onmicrosoft.com/oauth2/v2.0/token?p=b2c_1a_signup_signin_dev} ingress: - domainName: ${TSPS_INGRESS_DOMAIN_NAME:localhost:8080} + domainName: ${TEAPSOONS_INGRESS_DOMAIN_NAME:localhost:8080} kubernetes: in-kubernetes: ${TERRA_COMMON_KUBERNETES_IN_KUBERNETES:false} pod-name: ${TERRA_COMMON_KUBERNETES_POD_NAME:} @@ -159,7 +159,7 @@ terra.common: # these values are used by TCL stairway: - cluster-name-suffix: tsps-stairway + cluster-name-suffix: teaspoons-stairway force-clean-start: false # ${env.db.init} max-parallel-flights: 50 migrate-upgrade: true