Skip to content

fix(chartvalidator): manifest retrieval retry mechanism#20

Merged
bosbaber merged 5 commits into
mainfrom
stephan/20260604-checker-retry
Jun 4, 2026
Merged

fix(chartvalidator): manifest retrieval retry mechanism#20
bosbaber merged 5 commits into
mainfrom
stephan/20260604-checker-retry

Conversation

@bosbaber
Copy link
Copy Markdown
Contributor

@bosbaber bosbaber commented Jun 4, 2026

This pull request significantly improves the robustness and clarity of the chart validation tool by adding retry logic for Docker image validation, enhancing documentation, and increasing test coverage. The main focus is on ensuring that transient network errors during Docker image validation do not cause unnecessary failures in CI, and that users and developers have a clear understanding of the tool's operation and capabilities.

Enhancements to Docker image validation:

  • Added retry logic to the Docker image validation step: if docker manifest inspect fails due to a transient error, it will now retry up to three times with a randomized backoff between 1–15 seconds before marking the image as missing. This helps prevent CI failures due to temporary network issues.
  • Refactored the DockerImageValidationEngine to support injectable sleep functions, improving testability of the retry logic. [1] [2] [3]

Test coverage improvements:

  • Added new unit tests to verify Docker image validation retry behavior, including tests for both eventual success after retries and failure after exhausting all retries. [1] [2]

Documentation improvements:

  • Rewrote the README.md with a comprehensive overview of the tool, its pipeline stages, usage instructions, configuration flags, registry authentication, updating CRD schemas, and build instructions. This makes the project much more accessible to new users and contributors.

@bosbaber bosbaber self-assigned this Jun 4, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the chartvalidator image’s chart-checker pipeline by making Docker image existence validation more resilient to transient failures, and by expanding the project documentation and unit tests.

Changes:

  • Added retry/backoff behavior around docker manifest inspect in the Docker image validation engine.
  • Made the Docker validation engine more testable by injecting a sleep function (wired to time.Sleep in production).
  • Rewrote/expanded chartvalidator/README.md with a detailed pipeline and usage guide, and added unit tests for the retry behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
chartvalidator/README.md Expanded documentation describing the 5-stage pipeline, flags, registry auth, schema updates, and build instructions (includes retry behavior description).
chartvalidator/checker/engine_docker_validation.go Implemented retry + randomized backoff for docker manifest inspect, and added injectable sleep function support.
chartvalidator/checker/engine_docker_validation_test.go Added unit tests covering “eventual success after retries” and “failure after retries exhausted”.
chartvalidator/checker/engine_app_checker.go Wires retrySleepFn to time.Sleep when constructing the Docker validation engine.

Comment thread chartvalidator/README.md Outdated
Comment thread chartvalidator/checker/engine_docker_validation.go
Comment thread chartvalidator/checker/engine_docker_validation.go Outdated
Comment thread chartvalidator/checker/engine_docker_validation_test.go
Comment thread chartvalidator/checker/engine_docker_validation_test.go
@bosbaber bosbaber merged commit 6e3c7cf into main Jun 4, 2026
3 checks passed
@bosbaber bosbaber deleted the stephan/20260604-checker-retry branch June 4, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants