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

syntax error, unexpected '.' with pact-1.88.84 #72

Closed
2 of 3 tasks
MarkConway94 opened this issue May 6, 2022 · 4 comments
Closed
2 of 3 tasks

syntax error, unexpected '.' with pact-1.88.84 #72

MarkConway94 opened this issue May 6, 2022 · 4 comments

Comments

@MarkConway94
Copy link

MarkConway94 commented May 6, 2022

Pre issue-raising checklist

I have already (please mark the applicable with an x):

  • Upgraded to the latest version of the relevant libraries
  • Checked to see if the issue has already been raised
  • Created an executable example that demonstrates the issue using either:

Software versions

  • pact-ruby-standalone: pact-1.88.84

Expected behaviour

can-i-deploy and publish commands work as expected.

Actual behaviour

Hi, starting today Friday 6th May, we are getting the following error after downloading the pact-ruby-standalone and running either the publish command or the can-i-deploy command. We noticed that in your latest release notes there also seems to be a bug with the loading of these two commands' examples which may relate to our issue.
The error we are seeing is:

➜  bin git:(main) ✗ ./pact-broker can-i-deploy --dry-run --pacticipant=MyApp --version=1.0.0 --to=INT --broker-base-url="http://pactbroker.myapp.com"
/Users/me/myapp/services/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/broker.rb:8:in `require': /Users/me/myapp/services/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:51: syntax error, unexpected '.' (SyntaxError)
                branch_name: options.branch&.strip,
                                             ^
/Users/me/myapp/services/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:52: syntax error, unexpected '.'
                tags: options.tag&.collect(&:strip)
                                   ^
/Users/me/myapp/services/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:53: syntax error, unexpected '}', expecting keyword_end
	from /Users/me/myapp/services/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/broker.rb:8:in `<top (required)>'
	from /Users/me/myapp/services/pact/lib/app/pact-broker.rb:1:in `require'
	from /Users/me/myapp/services/pact/lib/app/pact-broker.rb:1:in `<main>'

I downloaded the version before the latest one, pact-1.88.83, and that works fine

Steps to reproduce

Download pact-rubt-standalone and run the publish or can-i-deploy step

Relevent log files

Please ensure you set logging to DEBUG and attach any relevant log files here (or link from a gist).

@YOU54F
Copy link
Member

YOU54F commented May 6, 2022

Hi @MarkConway94 thanks for the report.

We are just in the middle of doing some work to support some commands for Pactflow so apologies for the inconvenience, we certainly didn't mean to break anyones workflow!

Will get this addressed as soon as possible, thanks for suggesting a workaround for users.

I downloaded the version before the latest one, pact-1.88.83, and that works fine

@YOU54F
Copy link
Member

YOU54F commented May 9, 2022

Hey,

This is fixed now

**curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.88.85/pact-1.88.84-osx.tar.gz
tar xzf pact-1.88.84-osx.tar.gz
cd pact/bin
./pact-broker can-i-deploy

Result:

/Users/yousaf.nabi/dev/pact-foundation/pact_broker-client/pact/bin/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/broker.rb:8:in `require': /Users/yousaf.nabi/dev/pact-foundation/pact_broker-client/pact/bin/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:51: syntax error, unexpected '.' (SyntaxError)
                branch_name: options.branch&.strip,
                                             ^
/Users/yousaf.nabi/dev/pact-foundation/pact_broker-client/pact/bin/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:52: syntax error, unexpected '.'
                tags: options.tag&.collect(&:strip)
                                   ^
/Users/yousaf.nabi/dev/pact-foundation/pact_broker-client/pact/bin/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:53: syntax error, unexpected '}', expecting keyword_end
        from /Users/yousaf.nabi/dev/pact-foundation/pact_broker-client/pact/bin/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/broker.rb:8:in `<top (required)>'
        from /Users/yousaf.nabi/dev/pact-foundation/pact_broker-client/pact/bin/pact/lib/app/pact-broker.rb:1:in `require'
        from /Users/yousaf.nabi/dev/pact-foundation/pact_broker-client/pact/bin/pact/lib/app/pact-broker.rb:1:in `<main>

Post

curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.88.85/pact-1.88.85-osx.tar.gz
tar xzf pact-1.88.85-osx.tar.gz
cd pact/bin
./pact-broker can-i-deploy

Result

No value provided for required options '--pacticipant'

@YOU54F YOU54F closed this as completed May 9, 2022
@MarkConway94
Copy link
Author

Nice one, thanks YOU54F

@YOU54F
Copy link
Member

YOU54F commented May 9, 2022

No worries mate, huge thanks to @aushm

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

No branches or pull requests

2 participants