← Back to issue list

entrypoint-service rejects empty argument list in 1.15 even though this previously worked

View original Github issue

Metadata

Project
rockcraft
Number
#1022
Type
issue
State
closed
Author
bschimke95
Labels
—
Created
Updated
Closed

Current evaluation

Regression in 1.15 where entrypoint-service rejected explicit empty CMD args. Fixed by merged PR #1032 (commit d0db5228) restoring pre-1.15 behaviour; ships in Rockcraft 1.16.0 (already in edge). Closed by reporter.

Resolution: closed resolved

Reason: PR #1032 "fix: preserve previous entrypoint-service behaviour" was merged as commit d0db5228, removing the validation that rejected `command: "/metrics-server [ ]"` for entrypoint-service. Maintainer alesancor1 confirmed the empty square brackets are accepted again and the fix will be in 1.16.0; the reporter agreed the issue was addressed, with the broader design change deferred to a separate issue.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description Rockcraft 1.15 introduces a stricter validation on `entrypoint-service` that rejects services whose command has zero default arguments. This breaks Rocks that rely on a bare command invocation. Previous versions allowed an empty argument list. The new behavior appears to be an unintended side-effect of recent validation changes rather than a design requirement (as discussed [here](https://matrix.to/#/!AveAluboPXIRinIodA:ubuntu.com/$qgJvq8VTHoK5xzIJXtmHn2-4Qd-cRJZ8qix4mpslKGQ?via=ubuntu.com&via=matrix.org)). The validation now asserts [len(args) > 0](https://github.com/canonical/rockcraft/pull/939/files#diff-54f38854c7e2d7d0fb5ab8160a493b4cf8f6f7da496a149eeff2680ec7ae6dbbR263-R270), making [] invalid even though CMD is optional in OCI and earlier Rockcraft versions accepted it. ### To Reproduce 1. Use Rockcraft 1.15. 3. Define a Pebble service with a bare command and no arguments. 5. Set entrypoint-service to that service. 7. Run rockcraft pack. 9. Observe the validation error: ``` the Pebble service '<name>' has a command <binary> without default arguments and thus cannot be used as the entrypoint-service ``` ### Environment Rockcraft 1.15 (tested on Ubuntu 22.04) ### rockcraft.yaml ```yaml name: metrics-server summary: ROCK for the metrics-server Project. description: > Metrics Server is a scalable, efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines. version: "0.7.2" license: Apache-2.0 base: bare build-base: ubuntu@22.04 platforms: amd64: arm64: services: metrics-server: override: replace summary: "metrics-server service" startup: enabled command: "/metrics-server [ ]" on-failure: shutdown entrypoint-service: metrics-server parts: openssl: plugin: nil stage-packages: - openssl-fips-module-3 # a Pro only FIPS package for openssl - openssl # now automatically selected from fips-preview metrics-server: plugin: nil source: https://github.com/kubernetes-sigs/metrics-server.git source-type: git source-tag: v0.7.2 source-depth: 1 build-packages: - build-essential build-snaps: - go/1.22/stable override-build: | make build ARCH="${CRAFT_ARCH_BUILD_FOR}" BINARY_NAME=metrics-server cp $CRAFT_PART_BUILD/_output/metrics-server $CRAFT_PART_INSTALL ``` ### Relevant log output ```shell $ sudo rockcraft pack --verbose Warning: 'entrypoint-service' is defined. This operation will result in a rock with an atypical OCI Entrypoint. While that might be acceptable for testing and personal use, it shall require prior approval before submitting to a Canonical registry namespace. Bad rockcraft.yaml content: - the Pebble service 'metrics-server' has a command /metrics-server without default arguments and thus cannot be used as the entrypoint-service. (in field 'entrypoint-service') For more information, check out: https://documentation.ubuntu.com/rockcraft/en/1.15.0/reference/rockcraft.yaml ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Regression in 1.15 where entrypoint-service rejected explicit empty CMD args. Fixed by merged PR #1032 (commit d0db5228) restoring pre-1.15 behaviour; ships in Rockcraft 1.16.0 (already in edge). Closed by reporter.
stealth/space-bunny-alpha — closed resolved Regression in 1.15 rejecting empty arg lists for entrypoint-service was fixed by merged PR #1032 (commit d0db5228), restoring pre-1.15 behaviour; shipped in Rockcraft 1.16.0 (also in edge).
stealth/space-bunny-alpha — closed resolved PR #1032 (d0db5228) restored pre-1.15 acceptance of explicit empty arguments ([ ]) for entrypoint-service, resolving the regression in Rockcraft 1.16.0.
qwen/qwen3.6-35b-a3b — — PR #1032 merged to restore previous behavior, allowing empty argument lists for entrypoint-service. Strict validation was reverted to prevent breaking existing builds. Fix ships in Rockcraft 1.16.0.
qwen/qwen3.6-35b-a3b — — Fixed via merged PR 1032, restoring validation to allow empty argument lists via [ ] for entrypoint-service. The regression is resolved and available in v1.16.0.
qwen/qwen3.6-35b-a3b — — Merged PR #1032 to restore previous behavior, allowing empty argument lists for entrypoint-service. The 1.15 regression is fixed and included in 1.16.0. Full constraint relaxation is deferred.
qwen3.6-35b-a3b-mtp-q6 — — Fixed in PR #1032 by restoring previous validation behavior, allowing empty argument lists via [ ] for entrypoint-service. The issue is closed, with the fix scheduled for Rockcraft v1.16.0. Full constraint relaxation is deferred to a separate design review.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/rockcraft#1032 (confidence 97%)

    Merged PR (commit d0db5228) that restores acceptance of empty argument lists for entrypoint-service; maintainer states it closes #1022 and ships in 1.16.0.

  • Related To: canonical/rockcraft#939 (confidence 70%)

    Original entrypoint-service PR whose `len(args) > 0` assertion introduced the stricter validation causing the 1.15 regression.

  • Related To: canonical/rockcraft#1033 (confidence 40%)

    Referenced by the reporter as an incorrect/mistaken link; actual fix is PR #1032.

Related issues

Issue Project State Summary Similarity
#1032 fix: preserve previous entrypoint-service behaviour rockcraft merged Merged as d0db5228, restoring empty argument-list support for entrypoint-service to preserve pre-1.15 behavior. The fix shipped in Rockcraft 1.16.0 and closed #1022.
80%