Skip to content

feat(app): render NAIS env var and file sources distinctly#712

Merged
jhrv merged 1 commit intomainfrom
add-nais-source-kind
Apr 17, 2026
Merged

feat(app): render NAIS env var and file sources distinctly#712
jhrv merged 1 commit intomainfrom
add-nais-source-kind

Conversation

@jhrv
Copy link
Copy Markdown
Contributor

@jhrv jhrv commented Apr 17, 2026

Summary

Adopts the new NAIS value in InstanceGroupValueSourceKind (nais/api #402) so the CLI can distinguish values sourced from the Nais platform from those defined in the application manifest.

Changes

Initiative-related

  • internal/app/envvars.go: render NAIS sources as Nais/<name> (SPEC rendering unchanged)
  • internal/app/command/files.go: user-facing help text "Secrets and ConfigMaps" → "Secrets and Configs"

Schema regeneration (mandated by AGENTS.md after API schema changes)

  • schema.graphql + internal/naisapi/gql/generated.go: regenerated via mise run update:graphql-schema:live. In addition to the NAIS source kind, this picks up unrelated schema evolution that has landed in nais/api since the last regeneration: ApplicationRestartLoopIssue / APPLICATION_RESTART_LOOP, PostgresDeletedActivityLogEntry / POSTGRES_DELETED, deletePostgres mutation, lastExitTimestamp on ApplicationInstance. These are not consumed by any code in this PR — they're just along for the ride because the file mirrors the live API.

Bonus fix

  • mise/tasks/update/graphql-schema/{live,local}.sh: nais alpha apinais api (the alpha namespace was removed in bcbae80; the scripts were broken before this PR)

Verification

  • mise run fmt
  • go build ./...
  • go test ./...

nais-api now distinguishes user-defined SPEC values from platform-
injected NAIS values (see nais/api#402). Render NAIS-sourced entries
as 'Nais/<name>' while keeping SPEC rendering unchanged.

Rename 'ConfigMaps' to 'Configs' in 'nais app files' help text for
consistency with the user-facing 'Config/<name>' rendering.

Also fix the schema update tasks to use the promoted top-level 'api'
command (was 'alpha api') so 'mise run update:graphql-schema:{live,local}'
works again after the command promotion.
@github-actions
Copy link
Copy Markdown
Contributor

📝 Changelog preview

Below is a preview of the Changelog that will be added to the next release. Only commit messages that follow the Conventional Commits specification will be included in the Changelog.

v5.26.0 - 2026-04-17

Full Changelog: v5.25.7...v5.26.0

🚀 Features

  • (app) Render NAIS env var and file sources distinctly (220fef7)

@jhrv jhrv merged commit 2d9998a into main Apr 17, 2026
19 checks passed
@jhrv jhrv deleted the add-nais-source-kind branch April 17, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant