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(pact_verifier): Fix missing PATCH version in plugin's version #308

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

tienvx
Copy link
Contributor

@tienvx tienvx commented Aug 7, 2023

Fix pact-foundation/pact-plugins#44

I don't know how to write test for this. Please show me how if it's required. I guess the 'missing plugin' test is enough to cover this change?

@YOU54F
Copy link
Member

YOU54F commented Aug 7, 2023

Thanks @tienvx!

That doesn't seem right, that it can't download a plugin at all.

I wonder if the major/minor and not patch was by design, based on some on Ron's comments in this thread

pact-foundation/pact-plugins#21

but in that case I would expect it to match the latest for 0.0.x so using 0.0 should get you 0.0.5 even if 0.0.3 is installed on your system.

Not sure if thats part of the rationale for this case

@rholshausen
Copy link
Contributor

The reason I dropped the patch version, is because I had this problem (just making up the versions):

  • Created a Pact test with plugin version 1.0.2
  • Published the Pact file
  • When I went to verify the Pact file, it failed due to a bug in the plugin
  • Fixed the plugin a few times, it ended up at version 1.0.5
  • Tried to verify the Pact file, but it was still failing because the Pact file was linked to version 1.0.2

At this point I realised that you probably always want the latest version, even with minor, not just patch.

@tienvx
Copy link
Contributor Author

tienvx commented Aug 8, 2023

Sorry I didn't know about this feature.

btw, I think this feature is not implemented for provider verification? Or at least it didn't print out the log that it's working e.g.

Version `0.0.3` is selected as latest version of `0.0` of csv plugin

If it's working, I still don't know what cause the bug pact-foundation/pact-plugins#44

@YOU54F
Copy link
Member

YOU54F commented Aug 9, 2023

Sorry I didn't know about this feature.

That's okay, not your fault, I am not sure if we have documented, so will make a note of after we've resolved this

btw, I think this feature is not implemented for provider verification? Or at least it didn't print out the log that it's working

This may be the case, would need to check the code. I'll leave @uglyog to second check it

If it's working, I still don't know what cause the bug pact-foundation/pact-plugins#44

Once we confirm it is expected to be implemented and working, we can check retest but will consider that case when looking at this change.

Thanks Tien!

@rholshausen rholshausen merged commit 4000908 into pact-foundation:master Aug 18, 2023
13 checks passed
@tienvx tienvx deleted the fix-wrong-plugin-version branch August 18, 2023 12:50
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.

Provider verification > auto-downloading plugins feature doesn't work as expected
3 participants