Skip to content

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

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

acgalbany wants to merge 24 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
isValid: false,
},
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can add here more test cases like empty or invalid artifactoryId, no flagValues no argValues etc. You can see the delete tests from other services as example.

isValid: false,
},
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As I mentioned in the delete_test, here you can also extend the tests with more test cases.

isValid: false,
},
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

as mentioned in the tests of delete and describe commands, here we can also add more test cases. At least invalid artifactory id checks

model.KMSCustomEndpoint = false
}),
},
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please add a test in here for the empty endpoint case

),
examples.NewExample(
`Create a proxy-cache artifactory with credentials`,
"$ stackit registry artifactory create --name my-proxy --proxy-url https://custom-registry.com --proxy-registry-type harbor --proxy-access-key my-user --proxy-access-secret my-secret",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Setting the flag with a secret value has been deprecated. Secrets will be read from the given file or can be prompted. The following implementation is correct, but example needs to be updated.

Please take a look at the example

proxyRegistryType := flags.FlagToStringPointer(p, cmd, proxyRegistryTypeFlag)
proxyDesc := flags.FlagToStringPointer(p, cmd, proxyDescriptionFlag)
proxyKey := flags.FlagToStringPointer(p, cmd, proxyAccessKeyFlag)
proxySecret := flags.SecretFlagToStringPointer(p, cmd, proxyAccessSecretFlag)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

First example, where only name is given does not work, user always gets a prompt to set a secret. We had detected and fixed this optional secret flag issue in STACKIT CLI, see 1697

We have a new function ResolveSecretFlag, which will let you define optional secret flags. e.g

pw, err := flags.ResolveSecretFlag(p, cmd, passwordFlag)

Alexandre Catalan added 2 commits November 3, 2026 20:36
…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 and others added 3 commits November 3, 2026 21:15
- Add 'stackit registry replication-adapter list' command to list available replication adapters
- Support client-side --limit flag and JSON/YAML table formatting
- Add unit tests covering argument parsing, request building, and output formatting
- Generate markdown documentation for the new command

Relates to STACKITCRE-382
- Add TestFetchArtifactories unit tests covering pagination, limit, and error handling
- Add test cases for proxy access secret without key and empty flags in create
- Add test case for proxy without description in describe output
- Add test case for nil model in create and update outputResult
- Add JSON output format test case in replication-adapter list

Relates to STACKITCRE-382
…-comments

Feat/stackitcre 382 registry fix comments
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