-
Notifications
You must be signed in to change notification settings - Fork 73
[Feature] [Platform] Packer #1915
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
base: master
Are you sure you want to change the base?
Conversation
458086a
to
96efb5f
Compare
96efb5f
to
cfb075a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a new Packer feature to the platform CLI, including export, import, and merge commands, along with supporting utilities and logging enhancements.
- Introduce Packer commands (export, import, merge) and underlying
pack
logic - Add file-based JSON/YAML unmarshal helper and update JSON/YAML handling in CLI commands
- Enhance logging with elapsed-time wrappers and bump several dependencies
Reviewed Changes
Copilot reviewed 20 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
pkg/util/json.go | Added JsonOrYamlUnmarshalFile for file-based JSON/YAML parsing |
pkg/util/closer/multi.go | New MultiCloser implementation |
pkg/platform/registry.go | Removed unused flagPlatformName from registry command flags |
pkg/platform/regclient.go | New helper to instantiate a registry client |
pkg/platform/package_merge.go | Added merge subcommand |
pkg/platform/package_install.go | Refactored install to support multiple packages and inline charts |
pkg/platform/package_import.go | Added import subcommand |
pkg/platform/package_export.go | Added export subcommand |
pkg/platform/package_dump.go | Simplified dump to use yaml.Marshal |
pkg/platform/package.go | Registered new subcommands (export , import , merge ) |
pkg/platform/pack/proto.go | Defined Packer Proto types |
pkg/platform/pack/logger.go | Initialized pack logger |
pkg/platform/pack/import.go | Implemented Packer import logic |
pkg/platform/helm.go | Added getHelmPackages utility |
pkg/platform/flags.go | Added deployment-name validation and registry credentials flag |
pkg/logging/wrap.go | Added WithElapsed and WithElapsedCustom wrappers |
pkg/apis/shared/v1/any.go | Improved Any.MarshalJSON to handle empty data |
go.mod | Bumped various dependencies |
docs/cli/arangodb_operator_platform.md | Updated CLI docs for new commands and flags |
Comments suppressed due to low confidence (2)
pkg/util/json.go:45
- [nitpick] Acronyms in Go names should be all uppercase. Consider renaming
JsonOrYamlUnmarshalFile
toJSONOrYAMLUnmarshalFile
to matchJSONRemarshal
and Go conventions.
func JsonOrYamlUnmarshalFile[T any](path string) (T, error) {
pkg/logging/wrap.go:112
- This function uses
time.Now()
andtime.Time
but thetime
package is not imported in this file, causing a compilation error. Addimport "time"
.
func WithElapsed(key string) Wrap {
@@ -170,7 +168,9 @@ func packageInstallRun(cmd *cobra.Command, args []string) error { | |||
return err | |||
} | |||
|
|||
mergedData, err := helm.NewMergeValues(helm.MergeMaps, map[string]any{ | |||
println(string(chartObject.Overrides)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This println
call appears to be a leftover debug statement. It should be removed or replaced with structured logging if you intend to surface the overrides.
println(string(chartObject.Overrides)) | |
logger.Str("chartOverrides", string(chartObject.Overrides)).Info("Chart overrides processed") |
Copilot uses AI. Check for mistakes.
No description provided.