Skip to content
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

Fix nullifying annotations when there are no labels #156

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

clbx
Copy link
Contributor

@clbx clbx commented Apr 6, 2023

Fixes #155

Currently if there are no labels described in the configuration, annotations also get set to an empty map, nuking any annotations set in the configuration.

if w.k8sPlugin.Metadata.Labels == nil {
w.k8sPlugin.Metadata.Labels = map[string]string{}
w.k8sPlugin.Metadata.Annotations = map[string]string{}
}

This splits them up so that annotations are only set to an empty map if no annotations are described.

Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

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

LGTM ✅

Thanks for the contribution!

@DrJosh9000 DrJosh9000 merged commit 8e8f4bb into buildkite:main Apr 12, 2023
@clbx clbx deleted the annotations-fix branch April 12, 2023 04:05
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.

Job does not get annotations from configuration
2 participants