Skip to content

feat(client): Add imports and new fragments for stack and service models#3339

Merged
maciaszczykm merged 3 commits intomasterfrom
update-client
Mar 19, 2026
Merged

feat(client): Add imports and new fragments for stack and service models#3339
maciaszczykm merged 3 commits intomasterfrom
update-client

Conversation

@maciaszczykm
Copy link
Copy Markdown
Member

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 19, 2026

Greptile Summary

This PR extends the Go GraphQL client with new fragments and fields needed by the plural-cli: imports (stack name + outputs) is added to ServiceDeploymentExtended, distro and tags are added to BaseClusterFragment, and a new InfrastructureStackTinyFragment is introduced. The largely auto-generated changes are clean and follow existing patterns. Bundled in the same PR, NexusSettings/NexusSettingsAttributes are removed from the generated API models — however the corresponding cleanup in the controller CRD types is only half-done (code commented out, dead fields left in place).

  • ServiceDeploymentExtended gains an imports field with per-stack outputs, backed by the new InfrastructureStackTinyFragment and the already-existing StackOutputFragment.
  • BaseClusterFragment gains distro and tags { ...ClusterTags } fields; ClusterTags fragment was already defined in cluster.graphql.
  • All generated *_Imports structs and getter methods follow the existing codebase patterns.
  • Nexus removal is incomplete: NexusSettingsAttributes and NexusSettings are removed from models_gen.go, and the mapping code in deploymentsettings_types.go is commented out — but the Nexus field on the AISettings CRD struct and the NexusSettings Go type remain, so any operator who has nexus: configured in their DeploymentSettings CRD will silently have it ignored without error or warning.

Confidence Score: 3/5

  • Safe to merge for the new fragment additions; the Nexus cleanup introduces a silent regression for existing CRD users and should be addressed.
  • The core feature (new GraphQL fragments and client types) is auto-generated, follows existing patterns, and is low risk. The score is reduced because the Nexus removal leaves dead CRD fields that silently swallow user configuration without any error or deprecation signal.
  • go/controller/api/v1alpha1/deploymentsettings_types.go — the commented-out Nexus block and the orphaned NexusSettings type/field need proper resolution.

Important Files Changed

Filename Overview
go/client/graph/stack.graphql Adds the new InfrastructureStackTinyFragment (id + name) used by the service imports field. No issues.
go/client/graph/models.graphql Extends ServiceDeploymentExtended with the imports field and BaseClusterFragment with distro and tags. All referenced fragments already exist. No issues.
go/client/client.go Auto-generated file with new structs and getters for InfrastructureStackTinyFragment, ServiceDeploymentExtended_Imports, ClusterTags additions to BaseClusterFragment, and per-operation copies of the Imports type. All changes follow existing patterns.
go/client/models_gen.go Removes NexusSettings, NexusSettingsAttributes from the generated client models and removes Nexus from AiSettings/AiSettingsAttributes. Changes are consistent with a schema removal.
go/controller/api/v1alpha1/deploymentsettings_types.go Comments out the Nexus attribute mapping in Attributes(), but leaves the Nexus field on AISettings and the full NexusSettings type intact, meaning the CRD still accepts Nexus config that is now silently ignored.
go/client/generated/persisted-queries/queries.json Auto-generated persisted query hashes updated to reflect the new fragments. No issues.

Comments Outside Diff (1)

  1. go/controller/api/v1alpha1/deploymentsettings_types.go, line 718-731 (link)

    Commented-out code leaves dead Nexus field silently ignored

    The NexusSettingsAttributes type has been removed from models_gen.go, so the code that maps in.Nexusattr.Nexus was commented out rather than deleted. However, the Nexus field still exists on the AISettings CRD struct (line 468) and the NexusSettings type remains fully defined (lines 983–1018).

    This means any cluster operator who has nexus: configured in their DeploymentSettings CRD will now silently have that configuration ignored — no error is returned, no warning is logged, and the setting is never propagated to the API. This is a quiet regression for existing users.

    Consider one of:

    • Remove the Nexus field and NexusSettings type entirely (breaking, requires CRD version bump)
    • Keep the field but return an explicit error (or at least a warning log) when in.Nexus != nil, so operators are informed the setting is no longer effective

Last reviewed commit: "comment out Nexus to..."

@maciaszczykm
Copy link
Copy Markdown
Member Author

@greptileai

@maciaszczykm maciaszczykm added the enhancement New feature or request label Mar 19, 2026
@maciaszczykm maciaszczykm merged commit b5b880b into master Mar 19, 2026
36 checks passed
@maciaszczykm maciaszczykm deleted the update-client branch March 19, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants