laskoviymishka commented on code in PR #2912:
URL: https://github.com/apache/iceberg-rust/pull/2912#discussion_r3680742515


##########
.github/workflows/release_python.yml:
##########
@@ -61,11 +61,18 @@ jobs:
             exit 1
           fi
           echo "✅ Release tag format is valid: $RELEASE_TAG"
-          
+
+          # Verify that the workflow is being run on the same version as the 
release tag
+          DESIRED_REF="refs/tags/${RELEASE_TAG}"
+          if [[ "${GITHUB_REF}" != "${DESIRED_REF}" ]]; then

Review Comment:
   worth confirming: this makes dispatching from the tag ref mandatory — on a 
`workflow_dispatch` the guard only passes if the run was started from the tag 
itself (selected in the Run-workflow dropdown), not from a branch. That's 
exactly the behavior we want, but it's a little surprising if someone 
dispatches from `main` and hits the failure. Could we drop a one-line comment 
here pointing at the intended procedure? wdyt?



##########
.github/workflows/release_python.yml:
##########
@@ -61,11 +61,18 @@ jobs:
             exit 1
           fi
           echo "✅ Release tag format is valid: $RELEASE_TAG"
-          
+
+          # Verify that the workflow is being run on the same version as the 
release tag
+          DESIRED_REF="refs/tags/${RELEASE_TAG}"
+          if [[ "${GITHUB_REF}" != "${DESIRED_REF}" ]]; then
+            echo "Error: expected workflow execution on ref ${DESIRED_REF}, 
got ref: ${GITHUB_REF}"

Review Comment:
   tiny thing — the two sibling error echos in this step both lead with ❌ (the 
format check just above, the Cargo.toml one below), and this one drops it. I'd 
match them:
   
   ```suggestion
               echo "❌ Error: expected workflow execution on ref 
${DESIRED_REF}, got ref: ${GITHUB_REF}"
   ```



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