jenkins-x-plugins / jx-gitops

a simple CLI tool for working with kubernetes resources files in a GitOps repository
Apache License 2.0
33 stars 50 forks source link

fix: Only upgrade pkg with upstream #868

Closed msvticket closed 2 years ago

msvticket commented 2 years ago

This is part of solving jenkins-x/jx#8024

Got this error during jx gitops upgrade:

processing kpt directory: config-root wth strategy: resource-merge
error: failed to update source using kpt: failed to upgrade kpt packages in dir /Users/msv/Documents/projects/jx3-cluster-dev: failed to run kpt command: failed to run '/Users/msv/.jx-gitops/plugins/bin/kpt-1.0.0-beta.17 pkg update config-root@ --strategy resource-merge' command in directory '/Users/msv/Documents/projects/jx3-cluster-dev', output: 'Error: package must have an upstream reference'

This is since this package isn't referring a to an upstream package, which it shouldn't. (It's used for kpt live apply.) The fix makes the check for the upstreams repo execute.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

msvticket commented 2 years ago

/cc ankitm123 tomhobson babadofar

jenkins-x-bot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ankitm123

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/jenkins-x-plugins/jx-gitops/blob/main/OWNERS)~~ [ankitm123] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
jenkins-x-bot commented 2 years ago

Failed to merge this PR due to:

failed merging [868]: [Method Not Allowed]