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.

Unable to run canDeploy using latest

See original GitHub issue

Software versions

  • OS: Mac OSX 10.14.3
  • Library version: 6.21.3
  • Node Version: v10.15.1

Expected behaviour

When using latest:[pacticipant] I expected the can-I-deploy check to run for the latest version of the pacticipant.

Actual behaviour

Script ends execution with:

TypeError: Must provide the same number of pacticipant and version

Steps to reproduce

const pact = require("@pact-foundation/pact-node");

const checkProvider = {
  pactBroker: "http://localhost",
  pacticipant: ["service"],
  latest: ["f53101e8"], //tried true, "", "master", "service"
};

pact.canDeploy(checkProvider)

And if I add the pacticipant version to the mix I get Error: A version number and latest flag cannot both be specified for service

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mboudreaucommented, Mar 4, 2019

@rafael-anachoreta Hey, I released a new version of pact-node, 7.0.0, which includes fixes for ‘latest’ and ‘to’ parameters. Please go ahead and try it out. It’s a major version because it had to break the existing API of being able to do multiple participants/versions in one go, but I found this to be overly confusing and unnecessary.

Let me know how you go 😃

1reaction
TimothyJonescommented, Feb 27, 2019

I think we could get some milage through changing the options API for canDeploy-

const checkProvider = {
  pactBroker: "http://localhost",
  pacticipant: ["service1","service2"],
  pacticipantVersion: [{ tag: "TAG1", latest: true },{version: "VERSION2"}],
};

This would be more difficult for the node CLI, but if we replaced the node CLI with binstubs as in this issue, then we could sidestep that problem (and have less code to maintain). Thoughts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run canDeploy using latest · Issue #141 - GitHub
When using latest:[pacticipant] I expected the can-I-deploy check to run for the latest version of the pacticipant. Actual behaviour. Script ...
Read more >
Failed to connect to Veeam Backup and Replication server
It looks like your veeam Backup Service is not running. If not, use open a ... That log file has not updated with...
Read more >
Troubleshooting Common Problems with Web Deploy
1. Could not initialize Microsoft.Web.Deployment.Dll during start-up. Symptoms, Remote Agent Service fails to start ...
Read more >
Deployment safety - GitLab Docs
When an older deployment job starts, it fails and is labeled: failed outdated deployment job in the pipeline view. The deployment job is...
Read more >
Tomcat is not deploying my web project from Eclipse
I tried adding new server to Eclipse, renaming project, cleaning and still it is the same. When I build it with maven I...
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