pact-foundation / pact-reference

Reference implementations for the pact specifications
https://pact.io
MIT License
91 stars 46 forks source link

fix(pact_verifier): Fix missing PATCH version in plugin's version #308

Closed tienvx closed 10 months ago

tienvx commented 11 months ago

Fix https://github.com/pact-foundation/pact-plugins/issues/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 commented 11 months ago

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

https://github.com/pact-foundation/pact-plugins/issues/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 commented 11 months ago

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

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

tienvx commented 11 months ago

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 https://github.com/pact-foundation/pact-plugins/issues/44

YOU54F commented 11 months ago

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 https://github.com/pact-foundation/pact-plugins/issues/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!