-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix linting issues #147
Fix linting issues #147
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there! 👋 Thanks for the PR. 👍 The actual changes LGTM, but there are some other issues that need to be resolved.
First, before we get to the technical issues, our company requires a CLA to be digitally signed by any external contributors. Just to be clear, all personal information is protected under the GDPR, since Ableton is based in Germany and the data isn't added to any customer mailing lists or anything like that. It's only stored by our legal team. Also, you only need to sign the CLA once, then you can submit as many PRs as you like to any of our repos. 🙂
Ok, as for the technical stuff... so unfortunately CI failed (sorry, you won't be able to see the results page since the Jenkins server is firewalled off to the outside world), but basically the error is:
ERROR! the role 'ableton.nix' was not found in /home/nre/Code/Ableton/ansible-role-nix/molecule/default/roles:/home/nre/.cache/ansible-compat/1a0050/roles:/home/nre/.cache/molecule/ansible-role-nix/default/roles:/home/nre/Code/Ableton:/home/nre/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/nre/Code/Ableton/ansible-role-nix/molecule/default
The error appears to be in '/home/nre/Code/Ableton/ansible-role-nix/molecule/default/converge.yml': line 10, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
roles:
- ableton.nix
^ here
I can also reproduce this locally when checking out your PR branch and running molecule test
locally. However, when I run molecule test
locally I don't have any problems. Likewise, I don't have the issue with docker-py
that you mentioned, but I don't mind pinning the package to work around a known issue. How exactly are you running molecule?
As for the ansible-lint changes, thanks, I don't remember why we excluded the molecule
converge playbook, but IIRC it had to do with a bug in some old ansible-lint version.
I think the easiest way to proceed with this PR would be to drop the change from ansible-role-nix
to ableton.nix
and just merge the linter fixes. Then we can figure out how to change the role name. I agree that it would be better to use the canonical role name for molecule, since this resembles how you'd use this role in actual playbooks, but we've struggled to find a solution that satisfies molecule, developer workstations, CI, and other scenarios. This has been a problem since Ansible changed their role name requirements.
@nre-ableton no problem, CLA signed. Regarding the One thing I could do is check maybe what problem you have on Jenkins (if you send a Jenkinsfile) or on workstation and I can also try to help. |
The root of the problem we have is that our Jenkins nodes don't check out repositories with unique names. It's unfortunately a bit of a difficult problem to fix. Basically, when "normal people" clone the repository, it gets cloned to However, our CI nodes must check out all repositories to a directory named Although it should theoretically be possible to override this with Currently, we work around this by manually creating a symlink in |
No problem, there is nothing critical in this PR anyway. I wait as much as needed. |
@staticdev We've fixed the CI issues on our side. Can you please rebase and force-push? This PR should be good to go after that. |
@nre-ableton I am sorry I used github sync branch functionality and it actually does merge instead of rebase. |
Ok, the code changes look fine, but can you squash all commits so there's only a single one? Thanks. 👍 If you're unsure how to do this, just let me know and I'll force-push to your branch. |
979cc5d
to
0fae703
Compare
0fae703
to
39408ac
Compare
@nre-ableton hope it is correct now ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks! 👍 I'll run it through CI, just to make sure, but I don't anticipate any problems.
CI failed due to a race condition that occurs when setting up the Ansible role symlink. I need to make another fix to our systems before this job can build. 😅 |
@staticdev Ok, finally passing CI. 😌 Thanks again for your contribution! 👍 |
I had a couple issues trying to run ansible-lint and molecule locally direct from a clone and install dependencies, that are fixed in this PR.
Namely:
ansible lint does not find role declared in converge:
docker-py fails running molecule with (check urllib3 v2 incompatibility docker/docker-py#3113):
Adding a restriction to urllib3 solves the issue.
errors pointed by
molecule/default/coverage.yml
are also fixed, so the file does not need to be ignored anymore.