Skip to content

chore(store): drop Workload addresses and ports from the CRD - #120

Merged
akijakya merged 3 commits into
mainfrom
chore/drop-workload-addresses-ports
Nov 11, 2026
Merged

akijakya merged 3 commits into
mainfrom
chore/drop-workload-addresses-ports

Conversation

@akijakya

@akijakya akijakya commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Follow-up to agntcy/dir#2397 (step 3 of agntcy/dir#2299), which removes the deprecated addresses and ports from agntcy.dir.runtime.v1.Workload. That change shipped in dir v1.9.0.

Changes

  • github.com/agntcy/dir/api in store, discovery and server is pinned to v1.9.0; github.com/agntcy/dir/client and github.com/agntcy/dir/utils in discovery move to v1.9.0 too.
  • The dir v1.9.0 modules require Go 1.27.3, so the go directives and the golang builder images in the discovery and server Dockerfiles move to 1.27.3.
  • task crd:gen regenerates install/chart/templates/discovery.agntcy.io_discoveredworkloads.yaml: the addresses and ports properties and the Addresses and Ports print columns are gone.

No code here sets the fields: since v1.4.0 the adapters emit locators only. A stored DiscoveredWorkload that still has the two fields loses them (structural pruning) the next time it is written.

Testing

  • With Go 1.27.3: task lint and task test pass.
  • task crd:gen against api v1.9.0 produces no further changes to the CRD.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@akijakya
akijakya marked this pull request as ready for review November 11, 2026 09:21
@akijakya
akijakya requested a review from a team as a code owner November 11, 2026 09:21
@akijakya
akijakya requested a balanced review from Copilot November 11, 2026 09:22
@akijakya akijakya self-assigned this Nov 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The API update breaks decoding of legacy SQLite payloads containing addresses or ports, causing workload reads to fail and listings to omit existing records.

2 open issues
What changed in this PR

Aligns dir-runtime with dir v1.9.0’s removal of deprecated workload endpoint fields, continuing the migration to locators.

Changes:

  • Removes addresses, ports, and their print columns from the generated workload CRD.
  • Updates dir dependencies to v1.9.0 and refreshes dependency checksums.
  • Raises affected Go directives and container builder images to Go 1.27.3.
File Description
store/​go.sum Refreshes API and transitive dependency checksums.
store/​go.mod Updates the API dependency and Go requirement.
server/​go.sum Refreshes API and transitive dependency checksums.
server/​go.mod Updates the API dependency and Go requirement.
server/​Dockerfile Updates the pinned Go builder image.
install/​chart/​templates/​discovery.agntcy.io_discoveredworkloads.yaml Removes deprecated endpoint properties and print columns.
discovery/​go.sum Refreshes dir and transitive dependency checksums.
discovery/​go.mod Updates dir modules, transitive dependencies, and Go requirement.
discovery/​Dockerfile Updates the pinned Go builder image.

Review effort: Balanced

Comment thread store/go.mod Resolved
Comment thread store/go.mod Resolved
agntcy/dir#2397 removes the fields from agntcy.dir.runtime.v1.Workload.
Pin dir/api to it and regenerate the DiscoveredWorkload CRD, which loses
the two properties and the Addresses and Ports print columns.

Signed-off-by: András Jáky <[email protected]>
Move github.com/agntcy/dir/api (store, discovery, server) from the
pre-release pseudo-version to v1.9.0, and client/utils in discovery to
v1.9.0. The dir v1.9.0 modules require Go 1.27.3, so the go directives
and the builder images move to 1.27.3 too. The regenerated CRD is
unchanged.

Signed-off-by: András Jáky <[email protected]>
@akijakya
akijakya force-pushed the chore/drop-workload-addresses-ports branch from 1e1e355 to 9f56543 Compare November 11, 2026 09:31
api v1.9.0 drops addresses and ports from Workload. protojson.Unmarshal
rejects unknown fields by default, so a row written before v1.4.0 that
still has them made GetWorkload fail and dropped out of ListWorkloads.
Decode with DiscardUnknown instead, and cover it with a regression test.

Also set the Taskfile GO_VERSION and the utils module to Go 1.27.3, so
task deps:tidy matches the Go requirement of the dir v1.9.0 modules.

Signed-off-by: András Jáky <[email protected]>
@github-actions github-actions Bot added size/S and removed size/XS labels Nov 11, 2026
@akijakya
akijakya merged commit 13f9500 into main Nov 11, 2026
14 checks passed
@akijakya
akijakya deleted the chore/drop-workload-addresses-ports branch November 11, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants