test-kitchen / kitchen-ec2

A Test Kitchen Driver for Amazon EC2
Other
221 stars 202 forks source link

Release 3.18; issue with spot_options:, #619

Open yoconono opened 11 months ago

yoconono commented 11 months ago

:speaking_head: Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

:ghost: Brief Description

Greetings, since release 3.17.1 our builds are failing on what is seen as a typo error on script lines (release 3.17.1+) on file ec2.rb image

result:

/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `require': /var/lib/gems/2.7.0/gems/kitchen-ec2-3.18.0/lib/kitchen/driver/**ec2.rb:519:** syntax error, unexpected ',' (SyntaxError)

[3](https://jenkins.services.ooflex.net/job/Flex%20SRE/job/ansible-docker/job/PR-32/2/pipeline-console/?start-byte=0&selected-node=34#log-3)
          spot_options:,
## Version

on release <=3.17.0 of that file the syntax was different which makes me think of a copy/paste issue

        instance_data[:instance_market_options] = {
          market_type: "spot",
          spot_options: spot_options,
        }

[Version of the project installed]

Environment

[Details about the environment such as the Operating System, cookbook details, etc...]

Scenario

validating an ansible script through jenkins

Steps to Reproduce

just build ;p

Expected Result

parse error

MartinLenko commented 11 months ago

I ran into the same issue and found that it is related to this PR https://github.com/test-kitchen/kitchen-ec2/pull/610/files

Apparently, this requires ruby 3.1, but we are still on 2.7.0. I am not much of a ruby user so I am baffled how this all works. How come that gem that requires ruby 3.1 gets installed and used by ruby 2.7.0?