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

Remove InstanceStateStrategy #1745

Merged
merged 4 commits into from
Mar 11, 2024
Merged

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Mar 8, 2024

A search shows that InstanceStateStrategy isn't being used, so we can safely remove it.

This simplifies our code.

A [search](https://github.com/search?q=org%3Apulumi%20InstanceStateStrategy&type=code)
shows that `InstanceStateStrategy` isn't being used, so we can safely remove it.

This simplifies our code.
@iwahbe iwahbe requested a review from t0yv0 March 8, 2024 16:21
@iwahbe iwahbe self-assigned this Mar 8, 2024
Copy link
Member

@t0yv0 t0yv0 left a comment

Choose a reason for hiding this comment

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

Thank you!

@iwahbe
Copy link
Member Author

iwahbe commented Mar 8, 2024

@t0yv0 This is failing one test:

=== RUN   TestRegressAws1423
=== RUN   TestRegressAws1423/testCase1
=== RUN   TestRegressAws1423/testCase2/createPreview
=== RUN   TestRegressAws1423/testCase2/diff
    json_match.go:149: 
        	Error Trace:	/Users/ianwahbe/go/pkg/mod/github.com/pulumi/providertest@v0.0.11/replay/json_match.go:149
        	            				/Users/ianwahbe/go/pkg/mod/github.com/pulumi/providertest@v0.0.11/replay/json_match.go:80
        	            				/Users/ianwahbe/go/pkg/mod/github.com/pulumi/providertest@v0.0.11/replay/json_match.go:133
        	            				/Users/ianwahbe/go/pkg/mod/github.com/pulumi/providertest@v0.0.11/replay/json_match.go:145
        	            				/Users/ianwahbe/go/pkg/mod/github.com/pulumi/providertest@v0.0.11/replay/json_match.go:45
        	            				/Users/ianwahbe/go/pkg/mod/github.com/pulumi/providertest@v0.0.11/replay/replay.go:198
        	            				/Users/ianwahbe/go/pkg/mod/github.com/pulumi/providertest@v0.0.11/replay/replay.go:121
        	            				/Users/ianwahbe/go/src/github.com/pulumi/pulumi-terraform-bridge/pkg/tests/regress_aws_1423_test.go:442
        	Error:      	Not equal: 
        	            	expected: "\"DIFF_NONE\""
        	            	actual  : "\"DIFF_SOME\""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-"DIFF_NONE"
        	            	+"DIFF_SOME"
        	Test:       	TestRegressAws1423/testCase2/diff
        	Messages:   	at #["changes"]
    json_match.go:135: [#["detailedDiff"]] unexpected value {
          "rules[0].name": {
            "kind": "UPDATE"
          },
          "rules[0].priority": {
            "kind": "UPDATE"
          },
          "rules[0].statement.geoMatchStatement.countryCodes[0]": {
            "kind": "UPDATE"
          },
          "rules[0].visibilityConfig.cloudwatchMetricsEnabled": {
            "kind": "UPDATE"
          },
          "rules[0].visibilityConfig.metricName": {
            "kind": "UPDATE"
          },
          "rules[0].visibilityConfig.sampledRequestsEnabled": {
            "kind": "UPDATE"
          }
        }
    json_match.go:135: [#["diffs"]] unexpected value [
          "rules",
          "rules",
          "rules",
          "rules",
          "rules",
          "rules"
        ]
--- FAIL: TestRegressAws1423 (0.54s)
    --- PASS: TestRegressAws1423/testCase1 (0.16s)
    --- PASS: TestRegressAws1423/testCase2/createPreview (0.16s)
    --- FAIL: TestRegressAws1423/testCase2/diff (0.21s)

Should I just remove this test, since it is testing behavior that is not actually used, or is this a sign that something is wrong with shimv2.WithPlanResourceChange?

@t0yv0
Copy link
Member

t0yv0 commented Mar 8, 2024

Yeah amenable to removing this test, or you an do detailedDiff:"*" and diffs:"*".

This is testing the functionality of `InstanceStateStrategy`, which no longer exists.
@iwahbe iwahbe enabled auto-merge (squash) March 11, 2024 11:04
@iwahbe
Copy link
Member Author

iwahbe commented Mar 11, 2024

Yeah amenable to removing this test, or you an do detailedDiff:"*" and diffs:"*".

I'm just going to remove. Setting "detailedDiff":"*" and "diffs":"*" wouldn't do it, since we would also need to set "changes":"*" at which point why bother keeping the test.

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.22%. Comparing base (95487a0) to head (8b601b4).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1745      +/-   ##
==========================================
- Coverage   59.70%   59.22%   -0.49%     
==========================================
  Files         301      307       +6     
  Lines       42094    42403     +309     
==========================================
- Hits        25132    25112      -20     
- Misses      15533    15866     +333     
+ Partials     1429     1425       -4     

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

@iwahbe iwahbe merged commit 22fdb29 into master Mar 11, 2024
9 checks passed
@iwahbe iwahbe deleted the iwahbe/remove-InstanceStateStrategy branch March 11, 2024 11:18
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.

None yet

2 participants