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

Debug daily metrics GHA #167

Merged
merged 5 commits into from
Sep 17, 2024
Merged
Changes from all commits
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
10 changes: 4 additions & 6 deletions .github/workflows/save_daily_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- cron: "0 20 * * *"

jobs:
build:
save-daily-metrics:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -22,7 +22,7 @@ jobs:
with:
environment-file: environment.yml
cache-environment: true
ondarc: |
Copy link
Member

Choose a reason for hiding this comment

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

-_- my eyes completely glazed over this during the first review

condarc: |
channels:
- conda-forge
- defaults
Expand All @@ -41,9 +41,7 @@ jobs:
continue-on-error: true
uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: "projects/345950277072/locations/global/workloadIdentityPools/gh-actions-pool/providers/gh-actions-provider"
service_account: "pudl-usage-metrics-etl@catalyst-cooperative-pudl.iam.gserviceaccount.com"
create_credentials_file: true
credentials_json: "${{ secrets.GCP_USAGE_METRICS_ARCHIVER_KEY }}"
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, sure, but what was the issue with WIF?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was done to give this archiver write access and to keep the ETL account as having read-only access to the archived files.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense! Do you have a new service account now? Is it in Terraform / if not, do you want help putting it in Terraform?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me move this question into the living terraform PR (catalyst-cooperative/pudl#3841), as @bendnorman set up the account and would know better.


- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
Expand All @@ -53,7 +51,7 @@ jobs:
- shell: bash -l {0}
name: Save Github Metrics
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
API_TOKEN_GITHUB: ${{ secrets.USAGE_STATS_ACCESS_TOKEN }}
jdangerx marked this conversation as resolved.
Show resolved Hide resolved
run: |
python src/usage_metrics/scripts/save_github_metrics.py

Expand Down
Loading