diff --git a/projects/kubernetes-sigs/image-builder/BOTTLEROCKET_ADMIN_CONTAINER_METADATA b/projects/kubernetes-sigs/image-builder/BOTTLEROCKET_ADMIN_CONTAINER_METADATA index 7d489d3738..1668e0b8dc 100644 --- a/projects/kubernetes-sigs/image-builder/BOTTLEROCKET_ADMIN_CONTAINER_METADATA +++ b/projects/kubernetes-sigs/image-builder/BOTTLEROCKET_ADMIN_CONTAINER_METADATA @@ -1,2 +1,2 @@ -ImageDigest: sha256:2f884ebc34c0f54b6d75493ba2ad645f42525d6c90fe2099ae50708de6f86152 -Tag: v0.11.6 +imageDigest: sha256:2f884ebc34c0f54b6d75493ba2ad645f42525d6c90fe2099ae50708de6f86152 +tag: v0.11.6 diff --git a/projects/kubernetes-sigs/image-builder/BOTTLEROCKET_CONTROL_CONTAINER_METADATA b/projects/kubernetes-sigs/image-builder/BOTTLEROCKET_CONTROL_CONTAINER_METADATA index fda7902298..33e794e9ea 100644 --- a/projects/kubernetes-sigs/image-builder/BOTTLEROCKET_CONTROL_CONTAINER_METADATA +++ b/projects/kubernetes-sigs/image-builder/BOTTLEROCKET_CONTROL_CONTAINER_METADATA @@ -1,2 +1,2 @@ -ImageDigest: sha256:0ed73c9a2e35fab4287f3cbf18de084b740cace3234628c5e215adc407e52750 -Tag: v0.7.10 +imageDigest: sha256:0ed73c9a2e35fab4287f3cbf18de084b740cace3234628c5e215adc407e52750 +tag: v0.7.10 diff --git a/tools/version-tracker/pkg/commands/upgrade/upgrade.go b/tools/version-tracker/pkg/commands/upgrade/upgrade.go index 4bbdd58ff1..e995edf1e3 100644 --- a/tools/version-tracker/pkg/commands/upgrade/upgrade.go +++ b/tools/version-tracker/pkg/commands/upgrade/upgrade.go @@ -131,7 +131,7 @@ func Run(upgradeOptions *types.UpgradeOptions) error { projectHasPatches = true patchFiles, err := os.ReadDir(filepath.Join(projectRootFilepath, constants.PatchesDirectory)) if err != nil { - return fmt.Errorf("reading patch directory", err) + return fmt.Errorf("reading patch directory: %v", err) } totalPatchCount = len(patchFiles) } @@ -445,13 +445,13 @@ func getLatestEKSDistroRelease(client *gogithub.Client, branch string) (int, str eksDistroProdReleaseNumberFile := fmt.Sprintf(constants.EKSDistroProdReleaseNumberFileFormat, branch) releaseNumber, err := github.GetFileContents(client, "aws", "eks-distro", eksDistroProdReleaseNumberFile, constants.MainBranchName) if err != nil { - return 0, "", fmt.Errorf("getting contents of EKS Distro prod release number file: %v", eksDistroProdReleaseNumberFile, err) + return 0, "", fmt.Errorf("getting contents of EKS Distro prod release number file: %v", err) } kubernetesGitTagFile := fmt.Sprintf(constants.KubernetesGitTagFileFormat, branch) kubeVersion, err := github.GetFileContents(client, "aws", "eks-distro", kubernetesGitTagFile, constants.MainBranchName) if err != nil { - return 0, "", fmt.Errorf("getting contents of Kubernetes Git tag file: %v", eksDistroProdReleaseNumberFile, err) + return 0, "", fmt.Errorf("getting contents of Kubernetes Git tag file: %v", err) } releaseNumberInt, err := strconv.Atoi(strings.TrimRight(string(releaseNumber), "\n")) @@ -777,7 +777,7 @@ func updateBottlerocketHostContainerMetadata(client *gogithub.Client, projectRoo updatedHostContainerFiles := []string{} hostContainersTOMLContents, err := github.GetFileContents(client, "bottlerocket-os", "bottlerocket", constants.BottlerocketHostContainersTOMLFile, latestBottlerocketVersion) if err != nil { - return nil, fmt.Errorf("getting contents of Bottlerocket host containers file: %v", constants.BottlerocketHostContainersTOMLFile, err) + return nil, fmt.Errorf("getting contents of Bottlerocket host containers file: %v", err) } var hostContainersTOMLMap interface{} diff --git a/tools/version-tracker/pkg/github/github.go b/tools/version-tracker/pkg/github/github.go index c969f77e5d..02bfaf373f 100644 --- a/tools/version-tracker/pkg/github/github.go +++ b/tools/version-tracker/pkg/github/github.go @@ -361,7 +361,7 @@ func CreatePullRequest(client *github.Client, org, repo, title, body, baseRepoOw pullRequest.Body = github.String(body) pullRequest, _, err = client.PullRequests.Edit(context.Background(), baseRepoOwner, constants.BuildToolingRepoName, *pullRequest.Number, pullRequest) if err != nil { - return fmt.Errorf("editing existing pull request %s: %v", pullRequest.HTMLURL, err) + return fmt.Errorf("editing existing pull request %s: %v", *pullRequest.HTMLURL, err) } // If patches to the project failed to apply, check if the PR already has a comment warning about @@ -369,7 +369,7 @@ func CreatePullRequest(client *github.Client, org, repo, title, body, baseRepoOw if addPatchWarningComment { pullRequestComments, _, err := client.Issues.ListComments(context.Background(), baseRepoOwner, constants.BuildToolingRepoName, *pullRequest.Number, nil) if err != nil { - return fmt.Errorf("listing comments on pull request [%s]: %v", pullRequest.HTMLURL, err) + return fmt.Errorf("listing comments on pull request [%s]: %v", *pullRequest.HTMLURL, err) } for _, comment := range pullRequestComments { diff --git a/tools/version-tracker/pkg/types/types.go b/tools/version-tracker/pkg/types/types.go index a4779cbf3d..1eb8933f66 100644 --- a/tools/version-tracker/pkg/types/types.go +++ b/tools/version-tracker/pkg/types/types.go @@ -62,8 +62,8 @@ type GoVersionSourceOfTruth struct { } type ImageMetadata struct { - Tag string `yaml:"tag,omitempty"` - ImageDigest string `yaml:"imageDigest,omitempty"` + Tag string `json:"tag,omitempty"` + ImageDigest string `json:"imageDigest,omitempty"` } type EKSDistroRelease struct {