jprinet commented on code in PR #45217:
URL: https://github.com/apache/superset/pull/45217#discussion_r4443829369
##########
.github/actions/setup-develocity-npm/action.yml:
##########
@@ -0,0 +1,34 @@
+name: "Setup Develocity for npm"
+description: "Installs the Develocity npm agent so that npm runs publish Build
Scans to develocity.apache.org"
+inputs:
+ develocity-access-key:
+ description: "Access key for develocity.apache.org; the action exchanges
it for a short-lived token"
+ required: true
+outputs:
+ agent-installed:
+ description: "'true' when the agent is present under /tmp/develocity-npm,
so jobs can safely preload it"
+ value: ${{ steps.check-agent.outputs.installed }}
+runs:
+ using: "composite"
+ steps:
+ - name: Setup Develocity for npm
+ uses:
gradle/develocity-actions/setup-npm@9d8792ab22712b19790c2abce53e9ebb2694c312 #
v2.5
+ with:
+ develocity-url: https://develocity.apache.org
+ develocity-access-key: ${{ inputs.develocity-access-key }}
+ develocity-injection-enabled: true
+ develocity-npm-agent-version: 4.1.1
+ # Fixed location, so the frontend container jobs can mount the agent
+ develocity-npm-agent-install-location: /tmp/develocity-npm
+ # The setup above only logs a warning when the agent download fails, so
+ # check the agent is actually there before callers preload it
+ - name: Check Develocity npm agent
Review Comment:
Yes. The npm agent is what produces the Build Scans for npm runs; it doesn't
do any caching. `gradle/develocity-actions/setup-npm` (like `setup-python` and
`setup-docker`) is on the ASF allowlist at the pinned SHA (9d8792ab, v2.5) in
apache/infrastructure-actions `actions.yml`. This step only checks that the
agent files are on disk before the container jobs preload it.
##########
.github/workflows/tech-debt.yml:
##########
@@ -6,6 +6,12 @@ on:
- master
- "[0-9].[0-9]*"
+env:
Review Comment:
Agreed, removed in 5629c0c1.
##########
.github/actions/setup-backend/action.yml:
##########
@@ -9,6 +9,10 @@ inputs:
description: 'Type of requirements to install. Options: base, development,
default'
required: false
default: 'dev'
+ develocity-access-key:
Review Comment:
`setup-backend` is a composite action, and those can't declare `secrets:`;
only reusable `workflow_call` workflows can. An input is the only way to pass
it in, and the value comes from `secrets.DEVELOCITY_ACCESS_KEY`, so GitHub
still masks it in logs.
##########
.github/workflows/chromatic.yml:
##########
@@ -72,6 +82,8 @@ jobs:
permissions:
contents: read
pull-requests: write
+ env:
+ DEVELOCITY_ENABLED: ${{ secrets.DEVELOCITY_ACCESS_KEY != '' }}
Review Comment:
Good idea. Applied in 5629c0c1 to every workflow, not just this one:
`DEVELOCITY_ENABLED` and the `setup-backend` key now also require
`github.repository == 'apache/superset'`, alongside the secret check. I gated
the Develocity steps rather than the whole job, so the jobs themselves still
run on forks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]