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

Added lint to molecule #161

Merged
merged 3 commits into from
Jan 26, 2023
Merged

Added lint to molecule #161

merged 3 commits into from
Jan 26, 2023

Conversation

MorganLindqvist
Copy link

Added so that the lint test is always run when using molecule

Change-Id: I537aa1a622a8dc0a85b181f14c3eb709df8d8477

@MorganLindqvist
Copy link
Author

Since the code fails lint the addition of lint tests in molecule will fail. Fixing the faults or explicitly disabling them in the code will make this PR work and keep future molecule tests fail if the code fails lint.

@MorganLindqvist
Copy link
Author

@staticdev Now fixed all lint warnings in the code. Looks like there is somethiing in the CI/CD chain in github that makes it fail anyway. Any ideas?

Change-Id: I537aa1a622a8dc0a85b181f14c3eb709df8d8477
Change-Id: Iea66c5aaf7d2383743db7828c68218db4d511592
@MorganLindqvist
Copy link
Author

Hi @staticdev ,
I added so that lint is done every time one runs molecule.

Lint then need to be added in the test.yml file (I can do this). Would you like this or to remove lint from being run default every time one builds with molecule?

I would prefer it being run every time one run molecule but it is your repository.

@@ -13,3 +13,7 @@ platforms:
pre_build_image: true
provisioner:
name: ansible
Copy link
Owner

Choose a reason for hiding this comment

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

What are the advantages of having it on molecule in this case? I added a separate lint workflow because with molecule the same checks were repeated in each distro for molecule, resulting in longer wait in Github Actions. Am I missing something?

Copy link
Author

Choose a reason for hiding this comment

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

@staticdev the benefit would be that one would always run the linting everyting one run molecule during development on the local computer and could fix lint issues as soon as they occur whithout needing the extra step of running lint explicitly.

Copy link
Owner

Choose a reason for hiding this comment

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

@MorganLindqvist I understand your point but for me does not justify the time on pipeline. With precommit I forget about lint and focus on my change while developing, then I worry when I do the commits. Also for me is bad to change one role to lint different since I have a standard already for many roles. Hope you can also see my side since I have extra costs involved to maintain the role.

Copy link
Author

Choose a reason for hiding this comment

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

@staticdev sure, will remove lint from the molecule build

Change-Id: Id077e0d93808bb7fbc9185f9e55061b15d563cf2
Copy link
Owner

@staticdev staticdev left a comment

Choose a reason for hiding this comment

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

Thanks a lot @MorganLindqvist ! LGTM.

@staticdev staticdev merged commit 0af1ec5 into staticdev:main Jan 26, 2023
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.

2 participants