question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Logic error in canIDeploy when using -Platest=tag

See original GitHub issue

There appears to be a logic error in the canIDeploy task: when using -Platest=TAG, the task always fails. The task should fail when neither a version nor latest was specified. The instanceof term should probably have been negated:

https://github.com/pact-foundation/pact-jvm/blob/4b9e7548aef99b311df06594ba1c7b4712b615bc/provider/gradle/src/main/groovy/au/com/dius/pact/provider/gradle/PactCanIDeployTask.groovy#L41

As is, whenever a tag is specified, latest will be an instance of Latest.UseLatestTag, and the LHS of the && operator evaluates to true, throwing an exception.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bethesquecommented, Feb 28, 2022

Ideally, your pipeline would have it as a property, even if it got generated by the application.

0reactions
lio-wdcommented, Mar 16, 2022

Any chance this bug can still be fixed, to match the logic in the Ruby client?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incorrect error message for canIDeploy failed gradle task #1393
I am unable to replicate this. Can you provide the versions of Pact-JVM, Gradle and the Pact broker you are using? I have...
Read more >
Auto Layout Guide: Logical Errors - Apple Developer
Describes the constraint-based system for laying out user interface elements.
Read more >
PM51402: MESSAGE DFS3178E MSC DETECTED AN ... - IBM
MSC detected an internal logic error when a /RST LINK command was issued for a TCP/IP link. Error message DFS3178E with RETCODE=00000000, RSNCODE=000007C ......
Read more >
Can I Deploy | Pact Docs
How to use Pact + the can-i-deploy tool to ensure that you are safe to deploy your application.
Read more >
2.9.1. Logical Errors And Using The Debugger
Compare the calculated results with those produced by the program to locate where the error is in the code. Steps for locating a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found