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

Fix linting issues #312

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Fix linting issues #312

wants to merge 16 commits into from

Conversation

gardar
Copy link
Contributor

@gardar gardar commented Jan 23, 2024

fixes: #283

meta/main.yml Outdated Show resolved Hide resolved
Signed-off-by: gardar <[email protected]>
@guenhter
Copy link
Collaborator

@gardar If you could push a merge request with the first three commits (without "fix role name"), I'd merge that right away. Those three commits are not really isolated so they can be squashed together.
The commit "fix role name" needs some attention because we don't wanna mess again the Ansible galaxy, this is why I'd separate that single commit.

@gardar
Copy link
Contributor Author

gardar commented Jan 23, 2024

ansible-lint refuses to run without fixing the role name first.
With that being said I'm still working on this, so it's not ready for merge just yet.

@guenhter
Copy link
Collaborator

I missed the draft status. Thx

Signed-off-by: gardar <[email protected]>
Signed-off-by: gardar <[email protected]>
Signed-off-by: gardar <[email protected]>
Signed-off-by: gardar <[email protected]>
@gardar gardar marked this pull request as ready for review January 23, 2024 16:21
@gardar
Copy link
Contributor Author

gardar commented Jan 23, 2024

All issues fixed, are you sure about reverting the role name from gitlab_runner to gitlab-runner?

@riemers
Copy link
Owner

riemers commented Jan 23, 2024 via email

@gardar
Copy link
Contributor Author

gardar commented Jan 23, 2024

I see, the transition from hyphens to underscore in galaxy was some time ago and I think you can't make new roles with hyphens in the name.
Perhaps it's possible to get an alias in galaxy? So that both gitlab-runner and gitlab_runner names work?

@riemers
Copy link
Owner

riemers commented Jan 25, 2024 via email

@gardar
Copy link
Contributor Author

gardar commented Jan 25, 2024

Well since role names are now required to be with underscores and hyphens are only allowed for legacy purposes one would assume an alias would be standard practice.
I don't think anyone is able to steal your role name since it's prefixed with your namespace 😃

Let me know if you want to check with the galaxy team or I can change the metadata and add the role name linting rule to the ignore list.

@riemers
Copy link
Owner

riemers commented Jan 25, 2024 via email

@gardar
Copy link
Contributor Author

gardar commented Jan 25, 2024

Ok let me know if you get any response from the inquiry, otherwise I'll change the meta.

@ericsysmin
Copy link

ericsysmin commented Feb 12, 2024

All issues fixed, are you sure about reverting the role name from gitlab_runner to gitlab-runner?

In newer Ansible versions gitlab-runner throws errors, using _ in the role name is basically a requirement. Using the role_name value in meta helps address this without changing repository name. I believe Galaxy if I remember correctly now will reject it if there's a - in the name.

@riemers
Copy link
Owner

riemers commented Feb 13, 2024 via email

@gardar
Copy link
Contributor Author

gardar commented Feb 13, 2024

I see two options, either to get the role renamed to gitlab_runner on galaxy, or if possible to add a alias on galaxy so that the role is available under both names.

@gardar
Copy link
Contributor Author

gardar commented Feb 27, 2024

So what's the situation here, have you checked if the role can be renamed or if you can get a name alias?

@riemers
Copy link
Owner

riemers commented Feb 27, 2024 via email

Copy link

Although PRs are appreciated, if it sits for too long nothing happens. Can always update and do again :) This is just the automation talking

@github-actions github-actions bot added the Stale label Apr 13, 2024
@gardar
Copy link
Contributor Author

gardar commented Apr 13, 2024

Any news @riemers ?

@github-actions github-actions bot removed the Stale label Apr 14, 2024
@guenhter
Copy link
Collaborator

@gardar If you would split this PR to have only linting changes and not metadata changes like the role_name, I'll be happy to merge it right away. If you keep it as is, I don't want to touch it because we had troubles with Ansible-Galaxy before and this is too hot for me.

@gardar gardar force-pushed the lint branch 2 times, most recently from 2f3b053 to 534541e Compare April 25, 2024 13:28
@@ -13,6 +13,7 @@
ansible.builtin.command: "{{ gitlab_runner_executable }} restart"
listen: restart_gitlab_runner_macos
become: "{{ gitlab_runner_system_mode }}"
changed_when: true
Copy link
Collaborator

@guenhter guenhter Apr 25, 2024

Choose a reason for hiding this comment

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

I this necessary? Doesn't the command module produces a "changed" anyway?

@guenhter
Copy link
Collaborator

Could you please do a rebase onto master to get rid if the merge commit, because it seems when resolving the problems within the merge, some lines got lost (of a previous MR). To be on the safe side, please rebase then I'll review it again.

@gardar gardar force-pushed the lint branch 2 times, most recently from f92d0b7 to 7f47d30 Compare April 25, 2024 22:37
@guenhter
Copy link
Collaborator

And let me know when you are done, then I'll have another look at it

@guenhter
Copy link
Collaborator

guenhter commented May 7, 2024

@gardar when the conflicts are resolved and the branch is rebased, I'm happy to merge

@gardar
Copy link
Contributor Author

gardar commented May 8, 2024

Thanks! Haven't had time to complete it yet, I'll give you a ping once it's ready.

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.

ansible-lint
4 participants