Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Update/publish nats#289

Merged
abdheshnayak merged 4 commits into
mainfrom
update/publish-nats
Mar 5, 2024
Merged

Update/publish nats#289
abdheshnayak merged 4 commits into
mainfrom
update/publish-nats

Conversation

@abdheshnayak
Copy link
Copy Markdown
Contributor

No description provided.

@abdheshnayak abdheshnayak merged commit 4ebad0b into main Mar 5, 2024
@abdheshnayak abdheshnayak deleted the update/publish-nats branch March 5, 2024 12:01
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey abdheshnayak - Here's my review!

General suggestions:

  • Ensure that the renaming and changes in the NATS subject formats are reflected and compatible with all subscribers to maintain system integrity.
  • Review the implications of making certain fields non-nullable in the GraphQL schema, particularly for enabled in HPA configurations, to ensure client compatibility.
  • Given the typo in the IsReadyOnly field, consider a thorough search for similar issues that might affect clarity and correctness.
  • Verify the broader impact of these changes on related components and services to ensure seamless integration and functionality.

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

EnvironmentName func(childComplexity int) int
ID func(childComplexity int) int
Immutable func(childComplexity int) int
IsReadyOnly func(childComplexity int) int
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (llm): It appears there's a typo in the field name IsReadyOnly. Based on the context, it seems like it should be IsReadOnly. This typo could lead to confusion and bugs in the future.

return string(obj.Id), nil
}

// IsReadyOnly is the resolver for the isReadyOnly field.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (llm): It appears that the IsReadyOnly resolver method throws a not implemented panic. To ensure the new isReadyOnly field works as expected, it's crucial to implement this resolver method and add unit tests verifying its correct behavior, especially considering different states of a Secret object.


return e.complexity.Secret.Immutable(childComplexity), true

case "Secret.isReadyOnly":
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (llm): I noticed that the isReadyOnly field has been added to the GraphQL schema for Secret. It's important to add integration tests for the GraphQL queries and mutations that involve this new field to ensure it's correctly handled in all relevant operations.

MinReplicas *int `json:"minReplicas,omitempty"`
ThresholdCPU *int `json:"thresholdCpu,omitempty"`
ThresholdMemory *int `json:"thresholdMemory,omitempty"`
Enabled bool `json:"enabled"`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (llm): The change from a pointer to a non-pointer boolean for the Enabled field in GithubComKloudliteOperatorApisCrdsV1Hpa and GithubComKloudliteOperatorApisCrdsV1HPAIn structs implies that this field is now required and will default to false if not provided. Please ensure there are tests to verify that the GraphQL mutations and inputs behave as expected when this field is omitted, particularly in scenarios where it was previously optional.

}

func clusterBuildCacheUpdateSubject(buildCache *entities.BuildCacheKey) string {
return fmt.Sprintf("res-updates.account.%s.displayName.%s.name.%s",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (llm): The change in the format of the NATS subject for build cache updates removes displayName and name, relying solely on id. It's important to verify through integration tests that subscribers to these subjects (if any exist) correctly handle and process messages with the new subject format. This ensures that the system's overall functionality remains intact.

return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (llm): The addition of null checks in the GraphQL execution context for HPA.enabled suggests a stricter handling of null values. Please ensure there are tests covering scenarios where HPA.enabled might be null, especially in light of the schema changes making enabled a non-nullable boolean. This is crucial for maintaining the robustness of the GraphQL API.

abdheshnayak added a commit that referenced this pull request Nov 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants