molecule-plugins icon indicating copy to clipboard operation
molecule-plugins copied to clipboard

fix #239 , use python-style templating instead of Jinja in the plugins login_cmd_template

Open danielpodwysocki opened this issue 1 year ago • 19 comments

This file assumes Jinja templating for the port parameter and passes a Jinja-style "{{ port }}".

https://github.com/ansible/molecule/blob/main/src/molecule/command/login.py#L105

When it reaches molecule, it is subsituted in this file and is done by python calling .format() on the string. That causes it to not render correctly and gives users issues running molecule login.

ref: https://github.com/ansible-community/molecule-plugins/issues/239

danielpodwysocki avatar Feb 14 '24 18:02 danielpodwysocki

Label error. Requires exactly 1 of: bug, enhancement, major, minor, patch, skip-changelog. Found:

github-actions[bot] avatar Feb 14 '24 18:02 github-actions[bot]

I tested by editing this change into my venv locally and can now log in correctly to ec2 instances by calling molecule login

danielpodwysocki avatar Feb 14 '24 18:02 danielpodwysocki

It affects users on all plugins - updated the PR to address each.

danielpodwysocki avatar Feb 18 '24 06:02 danielpodwysocki

Any news on this?

danielpodwysocki avatar Feb 27 '24 17:02 danielpodwysocki

Any news on this PR?

This bug breaks some of the plugin functionality quite badly.

danielpodwysocki avatar Mar 04 '24 08:03 danielpodwysocki

Can also confirm, that this fixes the issue.

ekin-oener-provsn avatar Mar 30 '24 03:03 ekin-oener-provsn

@danielpodwysocki Please add a label to the PR. Would recommend to use 'patch' here. Otherwise following check is failing to success 'ack / ack / ack (pull_request_target) '. I think, after adding this label, the process of merging will be a step nearer.

ekin-oener-provsn avatar Mar 30 '24 13:03 ekin-oener-provsn

@danielpodwysocki Please add a label to the PR. Would recommend to use 'patch' here. Otherwise following check is failing to success 'ack / ack / ack (pull_request_target) '. I think, after adding this label, the process of merging will be a step nearer.

@ekin-oener-provsn I miss permissions to do that here, I could only create the PR but seems I cannot edit labels. It will need to be someone with enough access to this repo.

danielpodwysocki avatar Mar 30 '24 17:03 danielpodwysocki

Confirm. Fixes the same issue for me.

dzintars avatar Apr 11 '24 13:04 dzintars

Bump... the fix seems good, we just need a maintainer to add the label to the PR as the submitter asserts they lack permission to edit the labels.

cclose avatar May 08 '24 17:05 cclose

Bump. Please merge this, the bug is breaking stuff.

robpou avatar Jun 10 '24 19:06 robpou

Can confirm the PR fixed the issue locally for me, is it possible for it to be merged?

ben16w avatar Jun 21 '24 20:06 ben16w

please please please get this merged, as we are re-writing all our ansible roles and this would help so much

matt-horwood-mayden avatar Jul 18 '24 13:07 matt-horwood-mayden

please please please get this merged, as we are re-writing all our ansible roles and this would help so much

+1 please approve this.

isaacfraser-tomtom avatar Jul 18 '24 13:07 isaacfraser-tomtom

@audgirka are you able to progress this PR please?

matt-horwood-mayden avatar Jul 18 '24 14:07 matt-horwood-mayden

@apatard Have had a quick look at the failed builds and can see that centos:7 is failing, as thats now EOL should that be removed?

matt-horwood-mayden avatar Jul 31 '24 08:07 matt-horwood-mayden

@apatard Have had a quick look at the failed builds and can see that centos:7 is failing, as thats now EOL should that be removed?

I found time to fix that the other day but didn't find enough time to clean, push and create a PR. I hope I'll do it this week

apatard avatar Jul 31 '24 09:07 apatard

PR opened, and looks like the CI is green, so only a reviewer is needed to get it merged. This should unblock this PR

apatard avatar Aug 02 '24 13:08 apatard

Any news here?

This is a rather annoying bug to work around and feels like something we should be addressing in weeks, not months?

danielpodwysocki avatar Aug 22 '24 08:08 danielpodwysocki

Any news here?

This is a rather annoying bug to work around and feels like something we should be addressing in weeks, not months?

once the CI is fixed, this PR will be merged. As long as my PR about fixing the CI is not merged (in this form or any other form), I fear it's stuck :(

apatard avatar Aug 22 '24 13:08 apatard

Right, looks like my PR has been merged (big thanks to @ssbarnea). Once this PR is rebased, it'll be ready to be merged I guess.

apatard avatar Sep 20 '24 07:09 apatard

Right, looks like my PR has been merged (big thanks to @ssbarnea). Once this PR is rebased, it'll be ready to be merged I guess.

Awesome - I've rebased off of main.

danielpodwysocki avatar Sep 20 '24 12:09 danielpodwysocki

Any chance to finally release? :pray:

simi avatar Dec 13 '24 07:12 simi