Skip to content

[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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ajanikow
Copy link
Collaborator

No description provided.

@cla-bot cla-bot bot added the cla-signed label Jun 19, 2025
@ajanikow ajanikow force-pushed the feature/platform/packer branch 2 times, most recently from 458086a to 96efb5f Compare June 20, 2025 14:59
@ajanikow ajanikow force-pushed the feature/platform/packer branch from 96efb5f to cfb075a Compare June 23, 2025 15:12
@ajanikow ajanikow marked this pull request as ready for review June 23, 2025 16:10
@ajanikow ajanikow requested a review from Copilot June 23, 2025 16:10
Copy link

@Copilot Copilot AI left a 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 to JSONOrYAMLUnmarshalFile to match JSONRemarshal and Go conventions.
func JsonOrYamlUnmarshalFile[T any](path string) (T, error) {

pkg/logging/wrap.go:112

  • This function uses time.Now() and time.Time but the time package is not imported in this file, causing a compilation error. Add import "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))
Copy link
Preview

Copilot AI Jun 23, 2025

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.

Suggested change
println(string(chartObject.Overrides))
logger.Str("chartOverrides", string(chartObject.Overrides)).Info("Chart overrides processed")

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant