Repository navigation
Package spec checks (warnings) - #482
Merged
Merged
Conversation
Build and publish now check every package against stricter package rules with stable ids (SPEC-M01 … SPEC-B02): one dappnode_package.json, upstream[] with an arg and version that match the compose build args, no named template root, only package_variants/, docker-compose.yml, no container_name outside core packages, pinned external images, no ${VAR} interpolation, mapping-style build.args, recognised release file names and size limits, and no compose-validation skip or UPSTREAM_VERSION override.
- Findings are printed once after the run with rule id, file and fix, and in GitHub Actions also as ::warning annotations. Builds never fail because of them.
- Schema coercions are reported as SPEC-F03 instead of in the step title.
- DAPPNODE_SDK_SPEC=error makes validation fail on any violation (opt-in strict mode); DAPPNODE_SDK_SPEC=off skips the checks.
- Findings are attributed to the file that defines the value, so a root value inherited by every variant is reported once.
- Run over all 113 non-archived package repos without false positives found: digest-pinned args, shorter variant upstream lists, valid avatars and core packages' container_name are accepted. Packages created by init produce no findings.
doc/package-spec.md defines the rules the SDK now checks, why each exists, which repositories break each today, the rollout from warnings to errors, rules proposed for a later phase, consumer contradictions found, and the tropibot code each rule makes removable. Warnings link to this document.
|
Dappnode bot has built and pinned the built packages to an IPFS node, for commit: 2e53a24 This is a development version and should only be installed for testing purposes.
Hash: (by dappnodebot/build-action) |
After exempting core packages from SPEC-C02, 58 (not 65) active repositories have findings.
This was referenced Nov 9, 2026
Merged
This was referenced Nov 9, 2026
This was referenced Nov 9, 2026
This was referenced Nov 9, 2026
fix: point repository metadata at this package (SPEC-M08)
dappnode/DAppNodePackage-anchor-generic#30
Merged
Merged
Merged
Merged
Merged
Merged
Merged
fix: keep avatar sources outside release files (SPEC-F01)
dappnode/DAppNodePackage-package-harness#1
Merged
Merged
fix: ignore escaped compose variables (SPEC-C04)
Merged
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.
Stacked on #481; review after it. Once #481 is merged this PR targets
master.Summary
Adds a stricter package spec, and checks every package against it during
buildandpublish. In this release violations are warnings only: nothing that builds today stops building. The plan is to turn them into errors later.The spec is in
doc/package-spec.md. For each rule it gives why it exists, which repositories break it today, and the rollout. It also lists the tropibot code each rule will make removable.Rules
24 rules with stable ids:
dappnode_package.jsonper directory; package name format;upstream[]instead of legacyupstreamRepo/Version/Arg; the upstreamargexists in composebuild.argsand its value equals the upstreamversion; variantupstream[]keeps the root's positions; only schema fields;repository.urlis the package's own repository; exposable services exist in the composename/versionon a template root; variants only inpackage_variants/; variant directory names; a single release file in the root or the variant, not both; every variant directory has a manifestdocker-compose.ymlonly (a custom--compose_file_nameyields a release DAPPMANAGER cannot install); nocontainer_nameoutside core packages; pinned external images; no${VAR}interpolation;build.argsas a mappingnotifications.ymlare silently dropped today); size limits; values already of the schema type--skip_compose_validation; noUPSTREAM_VERSIONenvironment overrideBehaviour
::warningannotation on the run and the PR.DAPPNODE_SDK_SPEC=error(opt-in) makes validation fail on any violation, so workflows can try strict mode before it is the default.DAPPNODE_SDK_SPEC=offskips the checks.isBanner: "false") are reported asSPEC-F03, replacing the long "Validate files" title from Quality fixes for build, publish and GitHub actions #481.deny_unknown_fields, so findings deliberately stay out of it.Verification
DAppNodePackage*/DNP_*repositories:1.0.0@sha256:…), shorter variantupstream[]lists, valid avatars named like other release files, andcontainer_nameon core packages, which the installer relies on.dappnodesdk init(single and template) produce no findings.yarn lint,yarn buildandyarn testpass (160 passing, 1 pending). The new tests cover each rule, the no-false-positive cases, annotation escaping, and warn, error and off modes.