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

Exit normally from K8S parser with unsupported manifests (Cherry-pick of #17037) #17143

Merged
merged 1 commit into from Oct 7, 2022

Conversation

stuhood
Copy link
Sponsor Member

@stuhood stuhood commented Oct 7, 2022

It was observed that when having a complex Helm deployment that may contain manifests for CRDs, the Helm backend would render and parse them every time even if the contents of the original template (or the rendered manifest) haven't changed in-between runs.

This is due to the fact that the Helm K8S parser will exit with an exit_code=2 to signal Pants when it has attempted to parse a manifest that it can not understand. This also causes the process cache to not be saved.

This changes the parser to exit normally (exit_code=0) and without returning any output for those cases, so the end result is the same (no container image references found in that given file) but without the re-rendering of those manifest all the time as a side effect.

[ci skip-rust]
[ci skip-build-wheels]

…17037)

This changes the parser to exit normally (exit_code=0) and without returning any output for those cases
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@stuhood stuhood added the category:internal CI, fixes for not-yet-released features, etc. label Oct 7, 2022
@stuhood stuhood requested review from benjyw, alonsodomin and jsirois and removed request for benjyw October 7, 2022 17:16
Copy link
Member

@jsirois jsirois left a comment

Choose a reason for hiding this comment

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

Sounds like a bugfix since this fixes user-observable re-rendering.

@stuhood stuhood added category:bugfix Bug fixes for released features and removed category:internal CI, fixes for not-yet-released features, etc. labels Oct 7, 2022
@stuhood stuhood merged commit 53d0b48 into pantsbuild:2.14.x Oct 7, 2022
@stuhood stuhood deleted the cherry-pick-17037-to-2.14.x branch October 7, 2022 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants