Skip to content

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Apr 5, 2025

  • registry.ServiceConfig: add a "ExtraFields" for outputting deprecated fields.
  • remove uses of AllowNondistributableArtifactsCIDRs and AllowNondistributableArtifactsHostnames

- Human readable description for the release notes

API: Deprecated `AllowNondistributableArtifactsCIDRs` and `AllowNondistributableArtifactsHostnames` fields in the `RegistryConfig` struct in the `GET /info` response are omitted in API v1.49.

- A picture of a cute animal (not mandatory but encouraged)

@vvoland
Copy link
Contributor

vvoland commented Apr 7, 2025

Needs a rebase

@thaJeztah
Copy link
Member Author

Thx! Yes, was waiting for yours and Rob's PR's to be merged 😂

- registry.ServiceConfig: add a "ExtraFields" for outputting deprecated
  fields.
- remove uses of AllowNondistributableArtifactsCIDRs and AllowNondistributableArtifactsHostnames

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the omit_non_distributable branch from 278d8ab to 7d9c50d Compare April 7, 2025 17:12
@thaJeztah
Copy link
Member Author

Rebased 👍

Comment on lines +1 to +2
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.22
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Does the json.RawMessage(nil) need go1.22?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, but the any does require go .. whatever version added generics 😞

I was on the fence on changing it to interface{}, which would be the alternative

Copy link
Member Author

Choose a reason for hiding this comment

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

I should probably add that this PR was slightly me exploring options for providing backward-compatibility fields, without that requiring keeping backward-compatibility types. Initially, I considered a map[string]json.RawMessage, but there are cases where that could not be super useful. The any still allows using a raw-message (for cases where, e.g. the deprecated type is no more, and we could just hard-code a placeholder response).

I was also considering if we could somehow set such legacy fields at the top-level struct (merging with nested fields), but that might get complicated fast, so not sure if that's a good approach.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ohh right, I missed the any 😄

@thaJeztah thaJeztah merged commit ba12b2d into moby:master Apr 8, 2025
154 checks passed
@thaJeztah thaJeztah deleted the omit_non_distributable branch April 8, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants