Skip to content

api/publish: allow setting custom Codename on the Release file - #1624

Open
chipflake wants to merge 1 commit into
aptly-dev:masterfrom
chipflake:api-codename
Open

api/publish: allow setting custom Codename on the Release file#1624
chipflake wants to merge 1 commit into
aptly-dev:masterfrom
chipflake:api-codename

Conversation

@chipflake

@chipflake chipflake commented Aug 26, 2026

Copy link
Copy Markdown

Description of the Change

Currently, when publishing via the API, the Codename is always set to the same string as the Distribution. This does not match the aptly CLI behaviour, where it is possible to set a -codename flag.

The CLI does not support updating the Codename after the published repo has been created (on Update), so I did not add Codename to the Update params here either. I think that it is ok not to support Codename updates (the Distribution cannot be changed either), but let me know if you think otherwise.

We are already using this patch internally, it would be nice to have it merged so that we can use upstream builds.

Checklist

  • allow Maintainers to edit PR (rebase, run coverage, help with tests, ...)
  • unit-test added (if change is algorithm)
  • functional test added/updated (if change is functional)
  • man page updated (if applicable)
  • bash completion updated (if applicable)
  • documentation updated
  • author name in AUTHORS

@saj

saj commented Aug 26, 2026

Copy link
Copy Markdown

We are already using this patch internally

I would like to provide additional context on why this patch is helpful.
(Beyond improving API parity with the CLI, as noted by chipflake, above.)

  -codename="": codename to publish (defaults to distribution)

Since #1269, aptly now allows users to publish to suites (distributions) whose literal values include slashes (/). We use this feature to publish to ornate suite names that have meaning to our internal org. While we are happy to see these strings in our suite names, we don't think it is proper for the same literals to appear in Codename:.

This patch allows us to emit Codename: trixie or Codename: bookworm -- decoupling from our ornate suite names -- which is more in-keeping with upstream custom.

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.07%. Comparing base (f59b0d2) to head (3d7f17e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1624      +/-   ##
==========================================
- Coverage   77.37%   77.07%   -0.31%     
==========================================
  Files         165      165              
  Lines       15747    15748       +1     
==========================================
- Hits        12185    12138      -47     
- Misses       2356     2408      +52     
+ Partials     1206     1202       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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