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

Catch up replay to bridge's replay #59

Closed
wants to merge 2 commits into from

Conversation

VenelinMartinov
Copy link
Contributor

Apply changes to replay from tf-bridge from pulumi/pulumi-terraform-bridge#1496 and pulumi/pulumi-terraform-bridge#1583 in preparation of deprecating the bridge replay.

@VenelinMartinov VenelinMartinov requested review from t0yv0 and a team January 22, 2024 18:32
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 86 lines in your changes are missing coverage. Please review.

Comparison is base (8c45fd2) 33.45% compared to head (968da9c) 34.14%.
Report is 2 commits behind head on main.

Files Patch % Lines
providers/providerMock.go 31.53% 72 Missing and 4 partials ⚠️
replay/replay.go 0.00% 5 Missing ⚠️
pulumitest/assertrefresh/asserts.go 66.66% 2 Missing and 1 partial ⚠️
pulumitest/pulumiTest.go 88.23% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   33.45%   34.14%   +0.69%     
==========================================
  Files          42       42              
  Lines        2571     2592      +21     
==========================================
+ Hits          860      885      +25     
+ Misses       1606     1604       -2     
+ Partials      105      103       -2     

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

Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

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

This looks good to me, but we should probably wait for someone familiar with this library to approve before merging.

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.

Hold on a sec, can you remind me where this is used? We discussed that WithUnorderedArrayPaths was actually not needed I recall.

@VenelinMartinov
Copy link
Contributor Author

The PR where I originally introduced this is pulumi/pulumi-terraform-bridge#1583.

The only place where WithUnorderedArrayPaths is used is in replay.go:196 - the change is also in this PR.

I ended up reverting the changes to the externally used Replay - no options there and baked in the assumption of errors being unordered in the framework. To match that I added an option to AssertJSONMatchesPattern. LMK If I have misunderstood you and if you have a better suggestion on how to fix this.

@t0yv0
Copy link
Member

t0yv0 commented Jan 23, 2024

Ah yes, it is used I see! Sorry for being difficult here but I find this path-based API really awkward to explain so if we can get by without that's a little win, but since it bugs me so much I guess I can put the work in to rid of it. One sec

@t0yv0
Copy link
Member

t0yv0 commented Jan 23, 2024

#61 wdyt?

t0yv0 added a commit that referenced this pull request Jan 23, 2024
Alternative to #59

The motivation is to deprecate the replay module in pulumi-terraform-bridge in favor of a Go package here under generic providertest, and backport edits that happened in pulumi-terraform-bridge to this new home.

Unlike #59 two small things:

- trying not to expose the match options but solve the CheckFailure ordering on semantic level
- trying to make Errors compatible with gRPC log capture format []string

---------

Co-authored-by: Venelin <[email protected]>
@t0yv0
Copy link
Member

t0yv0 commented Jan 23, 2024

Closing in favor of #61

@t0yv0 t0yv0 closed this Jan 23, 2024
@t0yv0 t0yv0 deleted the vvm/catch_up_replay_to_bridge branch March 5, 2024 13:53
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