DEVX-158: Fix build-images workflow: delete existing manifest before push #293

Closed
emil wants to merge 2 commits from DEVX-158-fix-build-images into master
Owner

Summary

Add delete_remote_manifest function that deletes the existing Docker manifest via the registry v2 API before pushing. Works around Gitea bug #31964 where pushing an existing tag fails with HTTP 500.

  • REQ-1: delete_remote_manifest function using Docker registry v2 API
  • REQ-2: Called before each docker push in push_image
  • REQ-3: Credentials passed from main to push_image
  • REQ-4: Errors don't block the push (returns True on failure)
  • REQ-5: 100% test coverage

Closes DEVX-158

## Summary Add `delete_remote_manifest` function that deletes the existing Docker manifest via the registry v2 API before pushing. Works around Gitea bug #31964 where pushing an existing tag fails with HTTP 500. - REQ-1: `delete_remote_manifest` function using Docker registry v2 API - REQ-2: Called before each `docker push` in `push_image` - REQ-3: Credentials passed from `main` to `push_image` - REQ-4: Errors don't block the push (returns True on failure) - REQ-5: 100% test coverage Closes DEVX-158
emil added 2 commits 2026-08-25 21:28:00 +00:00
fix: delete existing manifest before push (Gitea #31964 workaround)
CI / validate (pull_request) Failing after 50s
CI / auto-merge (pull_request) Skipped
84fc223327
Gitea 1.27 fails with HTTP 500 when pushing a tag that already exists.
Add delete_remote_manifest() to delete the existing manifest via the
Docker registry v2 API before each push.

Implements: REQ-1, REQ-2, REQ-3, REQ-4, REQ-5

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
fix: vale prose lint in DEVX-158 spec
CI / validate (pull_request) Successful in 1m17s
CI / auto-merge (pull_request) Failing after 12s
ca41f3025c
Member

Closing — superseded by master. The push-first strategy with HTTP 500 retry (tenacity) and conditional delete-on-"already exists" was implemented directly on master (commit DEVX-164 + follow-ups). This PR's preemptive-delete-before-push approach is actually a regression — it deletes manifests unnecessarily on every push. Master now has:

  • PushHTTP500Error + _run_push with 500 detection
  • Tenacity retry (5 attempts, exponential backoff)
  • Push-first: only calls delete_remote_manifest when push fails with "already exists"
  • Comprehensive tests (test_no_delete_on_success_with_creds, test_delete_and_retry_on_already_exists, test_retry_also_fails, etc.)

The delete_remote_manifest function from this PR was kept and is used by the push-first strategy.

Closing — superseded by master. The push-first strategy with HTTP 500 retry (tenacity) and conditional delete-on-"already exists" was implemented directly on master (commit DEVX-164 + follow-ups). This PR's preemptive-delete-before-push approach is actually a regression — it deletes manifests unnecessarily on every push. Master now has: - `PushHTTP500Error` + `_run_push` with 500 detection - Tenacity retry (5 attempts, exponential backoff) - Push-first: only calls `delete_remote_manifest` when push fails with "already exists" - Comprehensive tests (`test_no_delete_on_success_with_creds`, `test_delete_and_retry_on_already_exists`, `test_retry_also_fails`, etc.) The `delete_remote_manifest` function from this PR was kept and is used by the push-first strategy.
kireto closed this pull request 2026-08-28 15:48:24 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.