Skip to content

feat(registry): onboard container registry service - #1693

Open
acgalbany wants to merge 44 commits into
stackitcloud:mainfrom
acgalbany:feat/STACKITCRE-382-registry
Open

acgalbany wants to merge 44 commits into
stackitcloud:mainfrom
acgalbany:feat/STACKITCRE-382-registry

Conversation

@acgalbany

@acgalbany acgalbany commented Oct 21, 2026 •

Copy link
Copy Markdown

Description

https://jira.schwarz/browse/STACKITCRE-382
Relates to STACKITCRE-382

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@acgalbany
acgalbany requested a review from a team as a code owner October 21, 2026 10:48
Comment thread internal/cmd/config/unset/unset_test.go Resolved
Alexandre Catalan added 2 commits November 3, 2026 20:36
…to feat/STACKITCRE-382-registry-fix-comments
…ITCRE-382

- Migrate optional secret flag resolution to flags.ResolveSecretFlag in create and update commands to prevent unintended stdin prompts when omitted
- Update command examples in create.go to read secrets from stdin (-) or file (@<file>) instead of deprecated literal strings
- Regenerate registry create and update documentation
- Expand unit test coverage in delete_test.go, describe_test.go, and update_test.go for missing args, missing flags, and empty/invalid artifactory UUIDs
- Add secret resolution test cases using fstest.MapFS and verify rejection of literal secret values
- Add missing unit test case for unsetting registry-custom-endpoint in unset_test.go

Relates to STACKITCRE-382
Alexandre Catalan added 3 commits November 5, 2026 16:18
Align the custom endpoint config with the new command name.

- Config key: registry_custom_endpoint -> containerregistry_custom_endpoint
- Flag in `config set` / `config unset`: --registry-custom-endpoint -> --containerregistry-custom-endpoint
- Update profile import template and regenerate docs
…tainer-registry

Rename the `stackit containerregistry` command to `stackit container-registry`,
following the hyphenated naming used by other multi-word services
(e.g. load-balancer, secrets-manager).

- Move internal/cmd/containerregistry to internal/cmd/container-registry
- Move internal/pkg/services/containerregistry to internal/pkg/services/container-registry
- Update command examples and regenerate docs

The Go package name (containerregistry) and the STACKIT SDK package
(stackit-sdk-go/services/registry) are unchanged.
…er-registry

Align the custom endpoint config with the new command name.

- Config key: containerregistry_custom_endpoint -> container_registry_custom_endpoint
- Flag in `config set` / `config unset`: --containerregistry-custom-endpoint -> --container-registry-custom-endpoint
- Update profile import template (keeping alphabetical order) and regenerate docs
Alexandre Catalan added 8 commits November 17, 2026 12:07
Update github.com/stackitcloud/stackit-sdk-go/services/registry to v0.2.0,
which introduces the ErrorDescription field on the Artifactory model.

Relates to STACKITCRE-382
…scribe

Display the artifactory error description in table output when present,
providing users with context when an artifactory is in an error state.
Also add test coverage for the error description field.

Relates to STACKITCRE-382
Display a warning informing users that STACKIT Container Registry
projects can be recovered via a support request for up to 30 days
after deletion. Remove the contradictory '(This cannot be undone)'
suffix from the confirmation prompt and add unit test coverage for
the warning output.

Relates to STACKITCRE-382
…ory create

Add required proxy credentials flags to the Docker Hub proxy-cache example
to prevent backend API errors, while keeping examples for both unauthenticated
and authenticated (stdin and file) proxy creation. Regenerate command documentation.

Relates to STACKITCRE-382
…actory create and update

Add comprehensive command examples covering every available flag
(both required and optional) for artifactory create and update commands,
including unauthenticated proxies, proxy descriptions, and secret handling
via stdin and file paths. Regenerate command documentation.

Relates to STACKITCRE-382
# Conflicts:
#	docs/stackit_config_unset.md
Alexandre Catalan added 2 commits November 19, 2026 13:00
…les without credentials

Proxy-cache artifactories without credentials end up in ERROR state, so
remove those examples from the create command and use a reachable
upstream URL in the update example. Regenerate container-registry docs.
…alidation, and naming

Addresses feedback from PR stackitcloud#1693 reviews:
- Refactor artifactory list command to use SDK paginate.All eager pagination
  with request/response adapters matching terraform-provider-stackit PR #1870.
- Keep a single request in replication-adapter list: the endpoint does not
  accept page_token/page_size query parameters, so the SDK request only
  exposes Execute(). Document the limitation and add fetch tests.
- Switch replication-adapter table rendering to table.Display(p) for consistency.
- Add nil check for response in artifactory create command before accessing Id.
- Enforce proxy credentials when configuring a proxy via MarkFlagsRequiredTogether
  and validate proxy-description usage to prevent HTTP 400 Bad Request responses.
- Update artifactory delete warning message to reference "artifactories"
  rather than "projects" to avoid confusion with STACKIT projects.

Relates to STACKITCRE-382
@acgalbany
acgalbany requested review from Fyusel and GokceGK November 27, 2026 10:47
…ew feedback

- Use spinner.Run2 in artifactory create and update commands to return
  the wait response and error directly without closure mutation.
- Split proxy MarkFlagsRequiredTogether back into (proxy-url,
  proxy-registry-type) and (proxy-access-key, proxy-access-secret) so
  unauthenticated proxy caches remain supported as in the Registry API
  and terraform-provider-stackit#1870.
- Use cliErr.FlagValidationError when proxy-description or proxy
  credentials are provided without proxy-url and proxy-registry-type.
- Update artifactory create unit tests to cover unauthenticated proxy
  configuration and reject orphaned proxy credentials.

Relates to STACKITCRE-382
Alexandre Catalan added 2 commits December 4, 2026 09:50
Map `internal/cmd/container-registry/**` to the `domain:CentralServices`
label in `.github/labeler.yml` so pull requests touching the new
Container Registry commands are automatically labeled, matching
`services/registry/*` in `stackit-sdk-go` and addressing the unresolved
review feedback on PR stackitcloud#1693.

Relates to STACKITCRE-382
# Conflicts:
#	internal/cmd/config/unset/unset_test.go
Fyusel
Fyusel previously approved these changes Dec 4, 2026
Add missing blank lines required by the wsl_v5 linter configuration in golang-ci.yaml across the container-registry commands, service utilities, unit tests, and the container-registry endpoint block in config unset.

After merging main into feat/STACKITCRE-382-registry, golangci-lint enforced wsl_v5 rules (branch-max-lines: 4, allow-whole-block: true), causing make lint to fail on missing whitespace before control-flow statements, assignments, expressions, range loops, defer calls, and return statements.
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.

3 participants