Repository navigation
Conversation
Harbor ships a linter whose default rules this repository does not check itself, among them agent-image-test-leak (hidden tests copied into the agent image), verifier-runtime-install and verifier-network-download, shared-verifier and overlapping artifact paths. scripts/lint_tasks.py runs those rules over every task and fails on any finding except the two that Harbor 0.25.0 reports on every task: a Compose file that cannot load without Harbor's base file, and --link-mode copy read as a package named copy. All 70 tasks pass in about a minute.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #14
Harbor ships task lint rules this repository did not run:
agent-image-test-leak(hidden tests copied into the agent image),verifier-runtime-install,verifier-network-download,shared-verifierand overlapping artifact paths, among others.Changes
scripts/lint_tasks.pyruns Harbor's default rules over every task and printsPASS/FAILper task. It drops exactly two findings that Harbor 0.25.0 reports on every task:invalid-task-configondocker-compose.yaml, because the files need Harbor's base Compose file to load;unpinned-python-dependencyon the hash-locked--require-hashes ... -rinstalls, where--link-mode copyis read as a package namedcopy.docs/development.mdlists the command.The Compose rules themselves still do not run; #14 describes how to make them.
Tests
tests/test_lint_tasks.pychecks that the two findings are dropped and that other task-config errors, an unpinned package and other rules are kept. AddingRUN pip install requeststo a verifier Dockerfile makes the script fail on that task. All 70 tasks pass.uv run python -m unittest discover -s testsuv run ruff check scripts src testsuv run ruff format --check scripts src tests