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

Tolerate Configure panics if one provider errors out #2931

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Mar 3, 2025

Minimally scoped panic recovery to address the scenario found in pulumi/pulumi-gcp#3007

GCP expects failure in Configure for SDKv2 to be final. When our code attempts to call Configure for PF after that failure, it results in a panic.

I do not know if fail-on-first-error is the desired behavior as it seems preferable to collect all the errors to show to the user if possible. Therefore this PR is scoped to tolerate panics if there have been preceding errors.

@t0yv0 t0yv0 marked this pull request as ready for review March 3, 2025 16:48
@t0yv0 t0yv0 requested a review from VenelinMartinov March 3, 2025 16:48
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.20%. Comparing base (cd5ba2d) to head (4ee0d00).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2931      +/-   ##
==========================================
- Coverage   67.74%   66.20%   -1.54%     
==========================================
  Files         331      331              
  Lines       42212    42230      +18     
==========================================
- Hits        28596    27958     -638     
- Misses      12022    12695     +673     
+ Partials     1594     1577      -17     

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

@VenelinMartinov VenelinMartinov enabled auto-merge (squash) March 3, 2025 17:08
@VenelinMartinov VenelinMartinov merged commit eac88d7 into master Mar 3, 2025
63 of 70 checks passed
@VenelinMartinov VenelinMartinov deleted the t0yv0/tolerate-configure-panics branch March 3, 2025 17:12
@t0yv0
Copy link
Member Author

t0yv0 commented Mar 3, 2025

-- FAIL: TestMaxItemsOneAliasingExpiring (1.22s)
    tokens_test.go:920: mismatch (-want +got):
        -- want
        ++ got
        @@ -1,18 +1 @@
        `{
            "auto-aliasing": {
                "resources": {
                    "pkg_r1": {
                        "current": "pkg:index/r1:R1",
                        "fields": {
                            "f1": {
                                "maxItemsOne": true
                            },
                            "f2": {
                                "maxItemsOne": false
                            }
                        }
                    }
                }
            },
            "auto-settings": {}
        }`
        \ No newline at end of file
        "{}"
        \ No newline at end of file
        
--- FAIL: TestMaxItemsOneDataSourceAliasing (1.34s)
    --- FAIL: TestMaxItemsOneDataSourceAliasing/auto-named-then-aliased (1.34s)
        tokens_test.go:1202: mismatch (-want +got):
            -- want
            ++ got
            @@ -1,24 +1 @@
            `{
                "auto-aliasing": {
                    "datasources": {
                        "pkg_r1": {
                            "current": "pkg:index/getR1:getR1",
                            "fields": {
                                "nest_flat": {
                                    "maxItemsOne": true
                                },
                                "nest_list": {
                                    "maxItemsOne": false
                                },
                                "override_flat": {
                                    "maxItemsOne": true
                                },
                                "override_list": {
                                    "maxItemsOne": false
                                }
                            }
                        }
                    }
                },
                "auto-settings": {}
            }`
            \ No newline at end of file
            "{}"
            \ No newline at end of file
            
FAIL

Should I revert or this appears unrelated?

@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v3.104.0.

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.

3 participants