bito-code-review[bot] commented on PR #42488:
URL: https://github.com/apache/superset/pull/42488#issuecomment-5109589308

   <!-- Bito Reply -->
   The behavior change is intentional. The new `check-freshness` job explicitly 
compares the triggered commit (`BUILD_SHA`) against the current tip of 
`master`. Since `workflow_dispatch` uses the selected ref as `github.sha`, any 
manual run on a non-master branch or an older commit will fail the `is-current 
== 'true'` check and skip the `build-deploy` job. This is designed to ensure 
that only the most recent deployment for the `master` branch proceeds, 
preventing redundant or superseded deployments.
   
   **.github/workflows/superset-docs-deploy.yml**
   ```
   check-freshness:
       runs-on: ubuntu-26.04
       outputs:
         is-current: ${{ steps.check.outputs.is-current }}
       steps:
         - name: "Check whether this is still master's current commit"
           id: check
           env:
             GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
             BUILD_SHA: ${{ github.event.workflow_run.head_sha || github.sha }}
           run: |
             latest_sha="$(gh api "repos/${{ github.repository 
}}/commits/master" --jq .sha)"
             if [ "${latest_sha}" = "${BUILD_SHA}" ]; then
               echo "is-current=true" >> "$GITHUB_OUTPUT"
             else
               echo "is-current=false" >> "$GITHUB_OUTPUT"
               echo "::notice::master has moved on to ${latest_sha} since 
${BUILD_SHA} was triggered — a newer run will deploy it, so skipping this one."
             fi
   ```


-- 
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]

Reply via email to