codeant-ai-for-open-source[bot] commented on code in PR #44248:
URL: https://github.com/apache/superset/pull/44248#discussion_r4015335712


##########
.github/workflows/scheduled-docker-image-refresh.yml:
##########
@@ -151,20 +151,46 @@ jobs:
           LATEST_RELEASE: ${{ needs.config.outputs.latest-release }}
           FORCE_LATEST_FLAG: ${{ needs.config.outputs.force-latest == '1' && 
'--force-latest' || '' }}
         run: |
+          set -euo pipefail
+
           # Reuses the same supersetbot invocation as the release
           # publisher (`tag-release.yml`), so the resulting tags are
           # identical to what a manual release dispatch would produce โ€”
           # just with a freshly-pulled base image layer underneath.
           # `--force-latest` is only passed when the config job confirmed the
           # fetched release is the newest one (see FORCE_LATEST_FLAG above).
+          #
+          # supersetbot's preset -> Dockerfile-target mapping tracks current
+          # master, but this job builds an arbitrary *historical* release ref
+          # (checked out above), which can predate a preset's target stage โ€”
+          # see #44220. Ask supersetbot what it would actually run (--dry-run)
+          # and hand that, plus the Dockerfile actually checked out for this
+          # release, to scripts/docker_release_target.py, which knows the one
+          # verified compatibility substitution (see its module docstring)
+          # and refuses to guess at anything else. Factored out of this YAML
+          # so it has direct pytest coverage instead of only ever being
+          # exercised by a real scheduled run.
+          DRY_RUN_CMD="$(supersetbot docker \
+            --preset "$BUILD_PRESET" \
+            --context release \
+            --context-ref "$LATEST_RELEASE" \
+            $FORCE_LATEST_FLAG \
+            --platform linux/amd64 \
+            --dry-run)"
+          EXTRA_FLAGS="$(
+            printf '%s\n' "$DRY_RUN_CMD" |
+              python3 scripts/docker_release_target.py "$BUILD_PRESET"

Review Comment:
   **Suggestion:** The release checkout replaces the triggering revision, while 
the sparse `workflow-source` checkout excludes `scripts/`; this command 
therefore cannot find the newly added helper. [stale reference]
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Often`
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=63b8e3965fb3488bbd836da487ec5a5d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=63b8e3965fb3488bbd836da487ec5a5d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent ๐Ÿค– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** .github/workflows/scheduled-docker-image-refresh.yml
   **Line:** 182:182
   **Comment:**
        *Stale Reference: The release checkout replaces the triggering 
revision, while the sparse `workflow-source` checkout excludes `scripts/`; this 
command therefore cannot find the newly added helper.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44248&comment_hash=77c0dce8e2ba171a204cdb5df449d98cd83754454b3aea4670469afe6e2e068c&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44248&comment_hash=77c0dce8e2ba171a204cdb5df449d98cd83754454b3aea4670469afe6e2e068c&reaction=dislike'>๐Ÿ‘Ž</a>



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