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 await annotation precedence #3344

Merged
merged 2 commits into from
Dec 3, 2024
Merged

Fix await annotation precedence #3344

merged 2 commits into from
Dec 3, 2024

Conversation

blampe
Copy link
Contributor

@blampe blampe commented Dec 3, 2024

Currently when creating or updating, custom await annotations (including waitFor and skipAwait) will be ignored for resources which have built-in await logic.

This corrects the behavior by returning a boolean from metadata.ReadyCondition indicating whether the user specified some behavior via an annotation. If that's true then we don't use the built-in logic.

We preserve the existing precedence when PULUMI_K8S_AWAIT_ALL is true. That is, we will continue to use built-in await logic (if the resource has it) by default, even when generic await is enabled.

During testing I also realized we have a bug where if a JSONPath is specified pointing to a non-primitive type (like .metadata) it will never resolve. I fixed this to match correctly.

Refs #3329
Fixes #3345

@blampe blampe requested a review from rquitales December 3, 2024 18:57
Copy link

github-actions bot commented Dec 3, 2024

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@@ -5,6 +5,11 @@
- [nodejs] Resolves `punycode` deprecation warnings by using native `fetch` instead of `node-fetch`.
(https://github.com/pulumi/pulumi-kubernetes/issues/3301)

### Fixed

Copy link
Member

Choose a reason for hiding this comment

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

Should we also add a note about jsonpath matching on complex types?

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 85.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 41.11%. Comparing base (d440f53) to head (5cac286).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
provider/pkg/metadata/overrides.go 75.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3344      +/-   ##
==========================================
+ Coverage   41.08%   41.11%   +0.03%     
==========================================
  Files          85       85              
  Lines       12736    12741       +5     
==========================================
+ Hits         5232     5238       +6     
+ Misses       7115     7113       -2     
- Partials      389      390       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blampe blampe merged commit e065015 into master Dec 3, 2024
19 checks passed
@blampe blampe deleted the blampe/await-override branch December 3, 2024 20:36
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.

pulumi.com/waitFor annotation will hang when matching objects or arrays
2 participants