Skip to content
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

Fix issues related to empty stack dir, optional cluster_name_pattern and better of use_eks flag #734

Closed
wants to merge 3 commits into from

Conversation

shahincsejnu
Copy link

@shahincsejnu shahincsejnu commented Oct 20, 2024

what

  1. atmos helmfile commands should not require EKS
  2. cluster_name_pattern should only use for EKS
  3. website url link fixing

why

references

Summary by CodeRabbit

  • New Features

    • Enhanced error handling for AWS configurations when using EKS.
    • Improved validation logic for stack manifests, ensuring necessary files are present before execution.
  • Bug Fixes

    • Corrected error message formatting for improved clarity.
    • Updated documentation for vendoring to clarify functionality and benefits.
  • Documentation

    • Expanded use cases and features related to vendoring in Atmos.
    • Updated links in documentation for better navigation.
  • Chores

    • Added new entries to .gitignore to streamline version control.
    • Updated various dependencies to improve compatibility and performance.

…and better of use_eks flag

Signed-off-by: Sahadat Hossain <shahincsejnu@gmail.com>
@shahincsejnu shahincsejnu requested review from a team as code owners October 20, 2024 06:30
Copy link
Contributor

coderabbitai bot commented Oct 20, 2024

📝 Walkthrough

Walkthrough

This pull request introduces several changes across multiple files. The .gitignore file is updated to include the vendor directory. The go.mod file sees extensive modifications, primarily in dependency management, including updates and additions of various libraries. Error handling improvements are made in internal/exec/helmfile.go and internal/exec/validate_stacks.go, enhancing checks for AWS configurations and stack validations. The pkg/config/config.go file removes a default setting for the use_eks property, and the documentation for vendoring in website/docs/core-concepts/vendor/vendor.mdx is expanded for clarity.

Changes

File Change Summary
.gitignore Added vendor to the list of ignored files and directories.
go.mod Updated multiple dependencies, including upgrades and additions; removed some older dependencies.
internal/exec/helmfile.go Added error check for empty AWS region; improved error message formatting.
internal/exec/validate_stacks.go Enhanced error handling for empty stacks directory and refined checks for Atmos manifest files.
pkg/config/config.go Removed default setting for components.helmfile.use_eks.
website/docs/core-concepts/vendor/vendor.mdx Expanded and clarified documentation on vendoring, updated links for Component Manifest.

Possibly related PRs

Suggested labels

minor

Suggested reviewers

  • aknysh
  • johncblandii
  • nitrocode

🐰 In the land of code where we hop and play,
New entries added, keeping troubles at bay.
Dependencies updated, all shiny and bright,
With clearer docs, everything feels just right.
So let's celebrate with a joyful cheer,
For a smoother path, we hold dear! 🎉


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between f555631 and 3abb24e.

📒 Files selected for processing (1)
  • pkg/config/config.go (0 hunks)
💤 Files with no reviewable changes (1)
  • pkg/config/config.go

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🧹 Outside diff range comments (3)
website/docs/core-concepts/vendor/vendor.mdx (3)

Line range hint 17-27: LGTM: Comprehensive use cases with a suggestion

The expanded Use-cases section greatly enhances the documentation by providing detailed, practical examples of vendoring applications. This aligns well with the PR objective of improving documentation clarity.

Consider adding a brief introductory sentence before listing the use cases to provide context, such as:

"Vendoring in Atmos can be applied in various scenarios to improve dependency management and code reuse. Here are some key use cases:"

This addition would help readers transition into the detailed list of use cases more smoothly.

🧰 Tools
🪛 LanguageTool

[style] ~66-~66: This phrase is redundant. Consider using “inside”.
Context: ...t) Using component.yaml manifest file inside of a component directory. See below. The ...

(OUTSIDE_OF)


Line range hint 41-50: Suggestion: Merge duplicate Use-cases sections

There are currently two separate Use-cases sections in the document. To improve readability and avoid confusion, consider merging this section with the earlier Use-cases section (lines 17-27). The content in both sections is valuable, but combining them would create a more cohesive and comprehensive list of use cases for Atmos vendoring.

Here's a suggested approach:

  1. Move the unique use cases from this section to the earlier Use-cases section.
  2. Combine overlapping points to avoid redundancy.
  3. Remove this duplicate section entirely.

This reorganization will enhance the overall structure and flow of the document.

🧰 Tools
🪛 LanguageTool

[style] ~66-~66: This phrase is redundant. Consider using “inside”.
Context: ...t) Using component.yaml manifest file inside of a component directory. See below. The ...

(OUTSIDE_OF)


Line range hint 52-66: LGTM: Updated link with a minor suggestion

The update to the Component Manifest link is correct and aligns with the PR objective of fixing website URL links. This change will ensure users are directed to the appropriate documentation.

There's a minor grammatical issue in the last sentence of this section. Consider revising it as follows:

- A `component.yaml` file placed into a component's directory is used to describe the vendoring config for one component only.
+ A `component.yaml` file placed in a component's directory is used to describe the vendoring configuration for that specific component only.

This revision improves clarity and grammatical correctness.

🧰 Tools
🪛 LanguageTool

[style] ~66-~66: This phrase is redundant. Consider using “inside”.
Context: ...t) Using component.yaml manifest file inside of a component directory. See below. The ...

(OUTSIDE_OF)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between c866ab5 and bb63b2c.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (7)
  • .gitignore (1 hunks)
  • go.mod (5 hunks)
  • internal/exec/helmfile.go (1 hunks)
  • internal/exec/validate_stacks.go (2 hunks)
  • pkg/config/config.go (0 hunks)
  • pkg/config/utils.go (2 hunks)
  • website/docs/core-concepts/vendor/vendor.mdx (1 hunks)
💤 Files with no reviewable changes (1)
  • pkg/config/config.go
🧰 Additional context used
🪛 LanguageTool
website/docs/core-concepts/vendor/vendor.mdx

[style] ~66-~66: This phrase is redundant. Consider using “inside”.
Context: ...t) Using component.yaml manifest file inside of a component directory. See below. The ...

(OUTSIDE_OF)

🔇 Additional comments (11)
.gitignore (1)

37-37: LGTM: Addition of vendor to .gitignore is appropriate.

The addition of vendor to the .gitignore file is a good practice for Go projects using vendoring for dependency management. This change ensures that vendored dependencies are not tracked by Git, which is typically desired as these files are usually managed by the Go toolchain.

This addition aligns well with the PR objectives related to improving dependency management. It suggests that the project may be adopting or refining its approach to vendoring, which can offer benefits such as reproducible builds and easier offline development.

website/docs/core-concepts/vendor/vendor.mdx (2)

Line range hint 1-15: LGTM: Enhanced introduction and overview

The changes in the introduction and first paragraph effectively clarify the purpose and benefits of vendoring in Atmos. The content accurately describes how vendoring can help manage dependencies, particularly for Terraform, and outlines its advantages for standardization, reuse, and compliance.

🧰 Tools
🪛 LanguageTool

[style] ~66-~66: This phrase is redundant. Consider using “inside”.
Context: ...t) Using component.yaml manifest file inside of a component directory. See below. The ...

(OUTSIDE_OF)


Line range hint 29-39: LGTM: Detailed feature list

The updated Features section provides a comprehensive list of sources from which Atmos can copy components and artifacts. This addition enhances the documentation by clearly outlining the capabilities of Atmos vendoring. The mention of inspiration from VMware Tanzu's vendir tool provides useful context for users familiar with other tools in the ecosystem.

🧰 Tools
🪛 LanguageTool

[style] ~66-~66: This phrase is redundant. Consider using “inside”.
Context: ...t) Using component.yaml manifest file inside of a component directory. See below. The ...

(OUTSIDE_OF)

internal/exec/helmfile.go (1)

Line range hint 1-338: Summary of review for internal/exec/helmfile.go

The changes in this file improve error handling for EKS-related operations by adding a check for the AWS region. This aligns with the PR objectives of enhancing the functionality of atmos helmfile commands, particularly in the context of EKS usage.

However, there's an opportunity to further improve the code structure to better support optional EKS usage, which would more fully align with the PR objective of making atmos helmfile commands not require EKS.

Overall, the changes are a step in the right direction, but further refactoring could enhance the flexibility and maintainability of the code.

go.mod (7)

22-22: Verify the version of github.com/hashicorp/hcl

The dependency github.com/hashicorp/hcl has been updated to version v1.0.1-vault-5. This appears to be a custom or forked version specific to Vault. Please confirm that this is the intended version and that it is compatible with your codebase.


48-93: Ensure compatibility of updated indirect dependencies

A large number of indirect dependencies have been added or updated, including AWS SDKs, Google Cloud libraries, and OpenTelemetry packages. Notable updates include:

  • github.com/aws/aws-sdk-go to v1.55.5
  • github.com/aws/aws-sdk-go-v2 to v1.32.2
  • cloud.google.com/go to v0.116.0
  • OpenTelemetry packages to v1.31.0

Please ensure that these updated dependencies are necessary, compatible with your codebase, and do not introduce any breaking changes or security vulnerabilities.


122-123: Confirm necessity of Envoy Proxy dependencies

The dependencies github.com/envoyproxy/go-control-plane and github.com/envoyproxy/protoc-gen-validate have been added as indirect dependencies. Ensure these are required for your project and verify their compatibility.


152-155: Verify updates to HashiCorp dependencies

Several HashiCorp dependencies, including github.com/hashicorp/go-hclog, github.com/hashicorp/go-plugin, and github.com/hashicorp/terraform-json, have been updated. Please confirm that these updates align with your project's requirements and that they do not introduce any breaking changes.


168-170: Review updates to Vault API and SDK

The dependencies github.com/hashicorp/vault/api and github.com/hashicorp/vault/sdk have been updated to newer versions. Ensure that your code is compatible with these versions and that any necessary code changes are made.


209-209: Check compatibility of github.com/rs/zerolog update

The github.com/rs/zerolog dependency has been updated to v1.33.0. Verify that this update does not introduce any breaking changes and that all logging functionalities work as expected.


271-272: Ensure compatibility with updated Kubernetes packages

The Kubernetes client libraries k8s.io/client-go v0.31.1 and k8s.io/utils have been updated. Check that these versions are compatible with your codebase and update any Kubernetes-related code if necessary.

website/docs/core-concepts/vendor/vendor.mdx Show resolved Hide resolved
Comment on lines +108 to +116
dir, err := os.ReadDir(cliConfig.StacksBaseAbsolutePath)
if err != nil {
return err
}
if len(dir) == 0 {
validationErrorMessages = append(validationErrorMessages, "The 'stacks' directory is empty. Please create stack manifest files in the 'stacks' directory before running the 'validate stacks' command.")
return errors.New(strings.Join(validationErrorMessages, "\n\n"))
}

Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Approve changes with a minor suggestion for consistency

The new check for an empty stacks directory is a valuable addition. It enhances the validation process by ensuring the basic structure is in place before proceeding with more detailed checks. This aligns well with the PR objectives of improving error handling and user experience.

For consistency with the rest of the function, consider moving the error return to the end of the function:

 if len(dir) == 0 {
 	validationErrorMessages = append(validationErrorMessages, "The 'stacks' directory is empty. Please create stack manifest files in the 'stacks' directory before running the 'validate stacks' command.")
-	return errors.New(strings.Join(validationErrorMessages, "\n\n"))
 }

 // ... rest of the function ...

 if len(validationErrorMessages) > 0 {
 	return errors.New(strings.Join(validationErrorMessages, "\n\n"))
 }

This change would allow for collecting all validation errors, including the empty directory check, before returning.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
dir, err := os.ReadDir(cliConfig.StacksBaseAbsolutePath)
if err != nil {
return err
}
if len(dir) == 0 {
validationErrorMessages = append(validationErrorMessages, "The 'stacks' directory is empty. Please create stack manifest files in the 'stacks' directory before running the 'validate stacks' command.")
return errors.New(strings.Join(validationErrorMessages, "\n\n"))
}
dir, err := os.ReadDir(cliConfig.StacksBaseAbsolutePath)
if err != nil {
return err
}
if len(dir) == 0 {
validationErrorMessages = append(validationErrorMessages, "The 'stacks' directory is empty. Please create stack manifest files in the 'stacks' directory before running the 'validate stacks' command.")
}
// ... rest of the function ...
if len(validationErrorMessages) > 0 {
return errors.New(strings.Join(validationErrorMessages, "\n\n"))
}

pkg/config/utils.go Outdated Show resolved Hide resolved
pkg/config/utils.go Outdated Show resolved Hide resolved
go.mod Show resolved Hide resolved
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 // indirect
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove duplicate versions of github.com/cenkalti/backoff

Both github.com/cenkalti/backoff/v3 and github.com/cenkalti/backoff/v4 are listed as indirect dependencies. Having multiple major versions can lead to conflicts and increase binary size. Confirm which version is required and remove the unnecessary one.

Apply this diff to remove the older version if not needed:

-	github.com/cenkalti/backoff/v3 v3.2.2 // indirect

Committable suggestion was skipped due to low confidence.

@@ -103,9 +103,6 @@ func InitCliConfig(configAndStacksInfo schema.ConfigAndStacksInfo, processStacks
v.SetConfigType("yaml")
v.SetTypeByDefaultValue(true)

// Default configuration values
v.SetDefault("components.helmfile.use_eks", true)
Copy link
Member

Choose a reason for hiding this comment

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

I think this is the fix, by not defaulting it. This parameter was never documented by us. Please update the available parameters for helmfile in the helmfile docs.

@@ -275,11 +278,6 @@ func checkHelmfileConfig(cliConfig schema.CliConfiguration) error {
return errors.New("Helm AWS profile pattern must be provided in 'components.helmfile.helm_aws_profile_pattern' config or " +
"'ATMOS_COMPONENTS_HELMFILE_HELM_AWS_PROFILE_PATTERN' ENV variable")
}

if len(cliConfig.Components.Helmfile.ClusterNamePattern) < 1 {
return errors.New("Cluster name pattern must be provided in 'components.helmfile.cluster_name_pattern' config or " +
Copy link
Member

Choose a reason for hiding this comment

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

@aknysh do we still require this if use_eks is true?

Copy link
Member

Choose a reason for hiding this comment

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

ClusterNamePattern is needed to access the EKS cluster

Copy link
Member

Choose a reason for hiding this comment

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

@shahincsejnu we should require cluster_name_pattern if use_eks is true

Copy link
Author

Choose a reason for hiding this comment

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

@osterman okay, made it required!

@aknysh
Copy link
Member

aknysh commented Oct 20, 2024

@shahincsejnu thanks, please address the comments and resolve the conflicts

@aknysh aknysh added the no-release Do not create a new release (wait for additional code changes) label Oct 20, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Outside diff range comments (1)
internal/exec/helmfile.go (1)

Line range hint 32-285: Consider broader refactoring for optional EKS usage

While the current changes improve error handling, there's an opportunity to further enhance the ExecuteHelmfile function to make EKS usage truly optional, as suggested in previous review comments.

Consider refactoring the EKS-specific operations into a separate function that's only called when cliConfig.Components.Helmfile.UseEKS is true. This would make the main ExecuteHelmfile function more agnostic to whether EKS is being used or not, improving flexibility for non-EKS use cases.

Here's a high-level suggestion for the refactoring:

  1. Create a new function setupEKS that encapsulates all EKS-specific logic.
  2. In ExecuteHelmfile, call setupEKS only when cliConfig.Components.Helmfile.UseEKS is true.
  3. Move all EKS-specific checks (like the new region check) into setupEKS.

This refactoring would align better with the PR objective of making atmos helmfile commands not require EKS and improve the overall structure of the code.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between bb63b2c and f555631.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod (4 hunks)
  • internal/exec/helmfile.go (2 hunks)
🧰 Additional context used
🔇 Additional comments (8)
internal/exec/helmfile.go (1)

283-283: Approve the error message improvement

The modification to consolidate the error message for the missing cluster name pattern into a single line improves readability and consistency.

go.mod (7)

22-22: Verify the use of custom version v1.0.1-vault-5 for github.com/hashicorp/hcl.

The dependency github.com/hashicorp/hcl is set to version v1.0.1-vault-5, which appears to be a custom or forked version specific to HashiCorp Vault. Ensure that this version is intentionally used and that it doesn't introduce compatibility issues with other components relying on hcl.


73-91: Ensure compatibility with updated AWS SDK dependencies.

The AWS SDK dependencies have been significantly upgraded:

  • github.com/aws/aws-sdk-go updated to v1.55.5
  • github.com/aws/aws-sdk-go-v2 updated to v1.32.2
  • Multiple related AWS modules have also been updated.

Verify that your codebase is compatible with these new versions, as there may be breaking changes or deprecations that require code adjustments.


128-128: Confirm compatibility with github.com/go-jose/go-jose/v4 upgrade.

The library github.com/go-jose/go-jose has been updated to major version v4.0.4. Major version changes can introduce breaking changes. Ensure that any code using this library is updated accordingly.


169-169: Review update of github.com/klauspost/compress to v1.17.11.

The compression library has been updated. While minor version updates are generally safe, it's prudent to test compression and decompression functionality to ensure there are no regressions.


189-191: Check the use of pseudo-version for github.com/planetscale/vtprotobuf.

The dependency is specified with a pseudo-version:

  • v0.6.1-0.20240319094008-0393e58bdf10

Pseudo-versions are generally used for versions that are not tagged. Confirm that this is the intended version and consider using a tagged release if available for better stability.


227-231: Verify updates to OpenTelemetry packages.

The OpenTelemetry dependencies have been updated to v1.31.0:

  • go.opentelemetry.io/otel
  • go.opentelemetry.io/otel/metric
  • go.opentelemetry.io/otel/sdk
  • And others.

Ensure that your tracing and metrics implementation is compatible with these updated packages, as there may be API changes.


259-259: Ensure compatibility with k8s.io/client-go v0.31.1.

The Kubernetes client-go library has been updated to v0.31.1. Major version updates can include breaking changes. Verify that any Kubernetes interactions in your codebase are updated to work with this version.

Comment on lines +140 to +142
if context.Region == "" {
return errors.New("aws region must be specified")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Improve error handling for AWS region check

The addition of an AWS region check is a good improvement. However, to fully align with the PR objectives and previous review comments, consider the following enhancements:

  1. Make the check conditional on EKS usage.
  2. Improve the error message to be more specific.

Here's a suggested implementation:

-if context.Region == "" {
-   return errors.New("aws region must be specified")
-}
+if cliConfig.Components.Helmfile.UseEKS {
+   if context.Region == "" {
+      return errors.New("AWS region must be specified when using EKS")
+   }
+}

This change makes the region check specific to EKS usage and provides a more informative error message.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if context.Region == "" {
return errors.New("aws region must be specified")
}
if cliConfig.Components.Helmfile.UseEKS {
if context.Region == "" {
return errors.New("AWS region must be specified when using EKS")
}
}

Comment on lines +48 to +55
cel.dev/expr v0.16.2 // indirect
cloud.google.com/go v0.116.0 // indirect
cloud.google.com/go/auth v0.9.8 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
cloud.google.com/go/compute/metadata v0.5.2 // indirect
cloud.google.com/go/iam v1.2.1 // indirect
cloud.google.com/go/monitoring v1.21.1 // indirect
cloud.google.com/go/storage v1.44.0 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

🛠️ Refactor suggestion

Consider cleaning up unnecessary indirect dependencies.

Several new indirect dependencies have been added:

  • cel.dev/expr v0.16.2
  • cloud.google.com/go v0.116.0
  • cloud.google.com/go/auth v0.9.8
  • And others.

Indirect dependencies are usually managed automatically and might not need to be listed explicitly. Running go mod tidy can help remove unnecessary indirect dependencies and keep the go.mod file clean.

go.uber.org/multierr v1.11.0 // indirect
go4.org/intern v0.0.0-20230525184215-6c62f75575cb // indirect
go4.org/unsafe/assume-no-moving-gc v0.0.0-20231121144256-b99613f794b6 // indirect
gocloud.dev v0.40.0 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Assess the necessity of adding gocloud.dev v0.40.0.

The dependency gocloud.dev has been added. If your project doesn't directly use this package, and it's not required by your direct dependencies, consider removing it to minimize unnecessary dependencies.

@shahincsejnu
Copy link
Author

@shahincsejnu thanks, please address the comments and resolve the conflicts

@aknysh resolved & updated, pls have a look again, thanks!

@osterman
Copy link
Member

There are new merge conflicts. Also, please show screenshots validating the functionality against k3s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-release Do not create a new release (wait for additional code changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants