Skip to content

Fix bug when no resources are generated. #10

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

Merged
merged 1 commit into from
Jan 24, 2023
Merged

Conversation

bigkevmcd
Copy link
Collaborator

There was a bug when we generated 0 resources, the inventory wasn't allowed to contain no entries.

There was a bug when we generated 0 resources, the inventory wasn't
allowed to contain no entries.
@bigkevmcd bigkevmcd requested a review from a team January 24, 2023 09:29
Copy link
Collaborator

@foot foot left a comment

Choose a reason for hiding this comment

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

Neat 👌

Happens if you kubectl get gs -oyaml | kubectl apply -f?

}

updated := &templatesv1.GitOpsSet{}
if err := k8sClient.Get(ctx, client.ObjectKeyFromObject(gs), updated); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

ObjectKeyFromObject handy

@bigkevmcd bigkevmcd merged commit 03b545d into main Jan 24, 2023
@bigkevmcd
Copy link
Collaborator Author

Happens if you kubectl get gs -oyaml | kubectl apply -f?

Yeah, and if you don't have any resources in the GitRepository ;-)

@bigkevmcd bigkevmcd deleted the fix-empty-inventory branch January 24, 2023 12:02
casibbald pushed a commit that referenced this pull request Feb 11, 2025
…tions/checkout-4.1.2

Bump actions/checkout from 4.1.1 to 4.1.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants