Skip to content

chore(app): add config values types #2486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 15, 2025
Merged

Conversation

JGAntunes
Copy link
Member

What this PR does / why we need it:

This PR adds a config value type which allows us to extend value with metadata. This is required for the file input type which will hold the filename besides the actual file content in the Value property.

This is just a straight replacement change, no new functionality is added besides the filename field (and the new types) which is currently unused.

Which issue(s) this PR fixes:

Part of: https://app.shortcut.com/replicated/story/126680/add-file-config-item-type-backend-foundation

Does this PR require a test?

NONE

Does this PR require a release note?

NONE

Does this PR require documentation?

NONE

@JGAntunes JGAntunes requested review from emosbaugh and sgalsaleh July 15, 2025 18:44
@JGAntunes JGAntunes self-assigned this Jul 15, 2025
emosbaugh
emosbaugh previously approved these changes Jul 15, 2025
@JGAntunes JGAntunes force-pushed the chore/add-config-values-types branch from 03ece9b to 70dc2a7 Compare July 15, 2025 19:56
@JGAntunes JGAntunes enabled auto-merge (squash) July 15, 2025 20:43
@JGAntunes JGAntunes requested a review from emosbaugh July 15, 2025 20:50
emosbaugh
emosbaugh previously approved these changes Jul 15, 2025
Copy link

github-actions bot commented Jul 15, 2025

This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID.

Online Installer:

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/appver-dev-a8bda7e" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Airgap Installer (may take a few minutes before the airgap bundle is built):

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci-airgap/appver-dev-a8bda7e?airgap=true" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Happy debugging!

@emosbaugh emosbaugh force-pushed the chore/add-config-values-types branch from a0eadf6 to f079e81 Compare July 15, 2025 21:17
@@ -125,7 +127,12 @@ const ConfigurationStep: React.FC<ConfigurationStepProps> = ({ onNext }) => {
// Initialize configValues with initial values when they load
useEffect(() => {
if (apiConfigValues && Object.keys(configValues).length === 0) {
setConfigValues(apiConfigValues);
// Convert AppConfigValues to Record<string, string> for local state
Copy link
Member

Choose a reason for hiding this comment

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

why not make local state the same type though?

@@ -13,7 +13,11 @@ func (c *InstallController) GetAppConfig(ctx context.Context) (kotsv1beta1.Confi
return c.appConfigManager.GetConfig()
}

func (c *InstallController) PatchAppConfigValues(ctx context.Context, values map[string]string) (finalErr error) {
func (c *InstallController) PatchAppConfigValues(ctx context.Context, values types.AppConfigValues) (finalErr error) {
if err := c.validateReleaseData(); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

was this intentionally added back?

@@ -13,7 +13,11 @@ func (c *InstallController) GetAppConfig(ctx context.Context) (kotsv1beta1.Confi
return c.appConfigManager.GetConfig()
}

func (c *InstallController) PatchAppConfigValues(ctx context.Context, values map[string]string) (finalErr error) {
func (c *InstallController) PatchAppConfigValues(ctx context.Context, values types.AppConfigValues) (finalErr error) {
if err := c.validateReleaseData(); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

was this intentionally added back?

sgalsaleh
sgalsaleh previously approved these changes Jul 15, 2025
@emosbaugh emosbaugh disabled auto-merge July 15, 2025 23:26
@emosbaugh
Copy link
Member

Failures are flakes and unrelated. Merging

@emosbaugh emosbaugh merged commit 77061bf into main Jul 15, 2025
190 of 198 checks passed
@emosbaugh emosbaugh deleted the chore/add-config-values-types branch July 15, 2025 23:26
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