radius-project / radius

Radius is a cloud-native, portable application platform that makes app development easier for teams building cloud-native apps.
https://radapp.io
Apache License 2.0
1.48k stars 94 forks source link

Review and Update duplicate structure for SecretConfig{} #7989

Open lakshmimsft opened 1 week ago

lakshmimsft commented 1 week ago

Steps to reproduce

  1. In https://github.com/radius-project/radius/blob/main/typespec/Applications.Core/environments.tsp I see two structures, which are identical. I brough this up with @vishwahiremat. They were created at slightly different times but they can be consolidated to one SecretConfig{}
@doc("Personal Access Token (PAT) configuration used to authenticate to Git platforms.")
model SecretConfig {
  @doc("The ID of an Applications.Core/SecretStore resource containing the Git platform personal access token (PAT). The secret store must have a secret named 'pat', containing the PAT value. A secret named 'username' is optional, containing the username associated with the pat. By default no username is specified.")
  secret?: string;
}

@doc("Registry Secret Configuration used to authenticate to private bicep registries.")
model RegistrySecretConfig {
  @doc("The ID of an Applications.Core/SecretStore resource containing credential information used to authenticate private container registry.The keys in the secretstore depends on the type.")
  secret?: string;
}
  1. Field secret in the model should not be optional.

Observed behavior

No response

Desired behavior

One SecretConfig{} model with required field `secret'

Workaround

No response

rad Version

NA

Operating system

NA

Additional context

This update should not affect the user experience. They will continue to refer to the secret in bicep as they do. https://github.com/radius-project/design-notes/pull/53/files#diff-12354a738cc93ef8bfee787de4ebb16befdb3c7dccce0df0a0f4e29e523b779d

Would you like to support us?

AB#13443

radius-triage-bot[bot] commented 1 week ago

:wave: @lakshmimsft Thanks for filing this bug report.

A project maintainer will review this report and get back to you soon. If you'd like immediate help troubleshooting, please visit our Discord server.

For more information on our triage process please visit our triage overview

ytimocin commented 6 days ago
radius-triage-bot[bot] commented 6 days ago

:+1: We've reviewed this issue and have agreed to add it to our backlog. Please subscribe to this issue for notifications, we'll provide updates when we pick it up.

We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview