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

Fixes bare variables in conditionals (deprecation warnings with Ansible 2.8+) #204

Merged
merged 3 commits into from
Jul 12, 2019
Merged

Fixes bare variables in conditionals (deprecation warnings with Ansible 2.8+) #204

merged 3 commits into from
Jul 12, 2019

Conversation

jljouannic
Copy link
Contributor

@jljouannic jljouannic commented Jul 11, 2019

This PR is about fixing some warning messages showing up in the console when running the role with ansible ≥ 2.8

@pkuczynski pkuczynski requested a review from lpaulmp July 11, 2019 11:49
@pkuczynski
Copy link
Member

@derekgottlieb @lpaulmp what you think?

@derekgottlieb
Copy link
Contributor

Reading through a related discussion here, it sounds like this is the right approach for ansible 2.8+.

@pkuczynski
Copy link
Member

Thanks for the confirmation. I will then merge it in.

@pkuczynski
Copy link
Member

@jljouannic could you please add a CHANGELOG entry and fix the failing build?

@jljouannic
Copy link
Contributor Author

jljouannic commented Jul 12, 2019

Sure, I can add an entry in CHANGELOG.

I have no idea why the travis build crashes. A test named tests_ubuntu16_1 seems to fail:

{
    "changed": true,
    "cmd": "/tmp/rvm-installer.sh stable --path /home/user/.rvm --auto-dotfiles --user-install",
    "delta": "0:00:01.218399",
    "end": "2019-07-11 10:01:45.642142",
    "failed": true,
    "msg": "non-zero return code",
    "rc": 22,
    "start": "2019-07-11 10:01:44.423743",
    "stderr": "curl: (22) The requested URL returned error: 403 Forbidden\ncurl: (22) The requested URL returned error: 410 Gone\ncurl: (22) The requested URL returned error: 404 Not Found\ncurl: (22) The requested URL returned error: 404 Not Found",
    "stderr_lines": [
        "curl: (22) The requested URL returned error: 403 Forbidden",
        "curl: (22) The requested URL returned error: 410 Gone",
        "curl: (22) The requested URL returned error: 404 Not Found",
        "curl: (22) The requested URL returned error: 404 Not Found"
    ],
    "stdout": "Turning on auto dotfiles mode.\nTurning on user install mode.\nDownloading https://github.com/rvm/rvm/archive/.tar.gz\n\nCould not download 'https://github.com/rvm/rvm/archive/.tar.gz'.\n  curl returned status '22'.\n\nDownloading https://bitbucket.org/mpapis/rvm/get/.tar.gz\n\nCould not download 'https://bitbucket.org/mpapis/rvm/get/.tar.gz'.\n  curl returned status '22'.",
    "stdout_lines": [
        "Turning on auto dotfiles mode.",
        "Turning on user install mode.",
        "Downloading https://github.com/rvm/rvm/archive/.tar.gz",
        "",
        "Could not download 'https://github.com/rvm/rvm/archive/.tar.gz'.",
        "  curl returned status '22'.",
        "",
        "Downloading https://bitbucket.org/mpapis/rvm/get/.tar.gz",
        "",
        "Could not download 'https://bitbucket.org/mpapis/rvm/get/.tar.gz'.",
        "  curl returned status '22'."
    ]
}

@jljouannic jljouannic closed this Jul 12, 2019
@jljouannic jljouannic reopened this Jul 12, 2019
@pkuczynski
Copy link
Member

Ah, this is another issue we are working on with RVM, so we can ignore it for this PR :)

@pkuczynski pkuczynski changed the title 🐛 Fixes bare variables used as boolean Fixes bare variables in conditionals (deprecation warnings with Ansible 2.8+) Jul 12, 2019
@pkuczynski pkuczynski merged commit deb1d3e into rvm:master Jul 12, 2019
@pkuczynski
Copy link
Member

Merged. Thanks!

@AwolDes
Copy link

AwolDes commented Jul 16, 2019

Hey guys

I use this ansible role as apart of my build pipeline, and 4 days ago (when this was released), my builds started to fail. I'm running Ubuntu 16.04, and can see that there is discussion of a test failing for Ubuntu 16.1, could this be related? Attached is an image of the error being raised, and a gist of the formatted payload. I'm not 100% sure this change is related, but it does seem coincidental and wanted to check in.

image

Any help is appreciated, cheers!

Edit: I've just pinned the version to v2.1.2, the the build works, so it seems that this update has had unexpected changes. Let me know if you need anymore info!

@pkuczynski
Copy link
Member

@jljouannic can you have a look? Otherwise, I will need to revert this change...

@jljouannic
Copy link
Contributor Author

I think the problem encountered by @AwolDes and the failing test in build job are the same.

I might be wrong, but I don't think it has anything to do with the fix I proposed in this PR.

@pkuczynski Didn't you mentioned this problem was related to another issue you wre working on with RVM?

@pkuczynski
Copy link
Member

That's true. But I could not recognize the same error from his output. @AwolDes I will try to release new rvm today, hopefully this will fix your builds.

@jljouannic
Copy link
Contributor Author

You're right, the errors are not the same.
However in both cases, problem seems related to incomplete URL or path:

  • "Could not download 'https://bitbucket.org/mpapis/rvm/get/<MISSING_PART>.tar.gz'."
  • "stderr_lines": ["/bin/sh: 1: /home/ruby/.rvm/wrappers/<MISSING_PART>/gem: not found"]

@pkuczynski
Copy link
Member

Then master contains the fix. Will be released to stable soon.

@AwolDes
Copy link

AwolDes commented Jul 16, 2019

@pkuczynski @jljouannic thanks for getting a fix in for this! Really appreciate it.

@pkuczynski
Copy link
Member

I am glad you like it! You might consider a small donation for the team https://opencollective.com/rvm

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

Successfully merging this pull request may close these issues.

4 participants