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

refactoring: plugins can report their template dir #2300

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

ssbarnea
Copy link
Member

Fix problem where location of templates was hardcoded.

Fix problem where location of templates was hardcoded.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
@ssbarnea ssbarnea added this to the 3.0 milestone Sep 17, 2019
molecule/command/init/scenario.py Show resolved Hide resolved
_instance.execute()

assert 1 == e.value.code
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still be providing something to the user in the case of a KeyError instead of a stack trace!?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@decentral1se You would be surprised but in this case the stack trace is more useful than the previous error message which was totally misleading: referring to missing folder, not inexistent driver.

Try it, that one is very easy to test from cli, before and after: molecule init role --driver-name foo.

Usually I am for clear error messages, but a nice error message here would require a wide range of changes. Should be done eventually but not part of this change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, sure. However, there is now an increasing list of "things for the future". Please start to mark them in the code! Add a TODO, XXX, whatever or create an issue. If you forget, nobody will remember to do these things until the users have to run into them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There where already there, the difference is that now we uncover them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no TODO in this change or added by you. So no, they are not there.

Copy link
Contributor

@decentral1se decentral1se left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document somewhere that we need to loop back on this stuff to clean up.

@ssbarnea ssbarnea merged commit 765fc9e into ansible:master Sep 17, 2019
@ssbarnea ssbarnea deleted the fix/tpl-dir branch January 4, 2020 11:01
@ssbarnea ssbarnea added the major label Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants