ansible-gitlab-runner icon indicating copy to clipboard operation
ansible-gitlab-runner copied to clipboard

Fix linting issues

Open gardar opened this issue 1 year ago • 24 comments

fixes: #283

gardar avatar Jan 23 '24 11:01 gardar

@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.

guenhter avatar Jan 23 '24 11:01 guenhter

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.

gardar avatar Jan 23 '24 11:01 gardar

I missed the draft status. Thx

guenhter avatar Jan 23 '24 11:01 guenhter

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

gardar avatar Jan 23 '24 16:01 gardar

It should be as it is in ansible galaxy right now. Since that one has all the history.


Van: gardar @.> Verzonden: Tuesday, January 23, 2024 5:22:32 PM Aan: riemers/ansible-gitlab-runner @.> CC: Erik-jan Riemers @.>; Mention @.> Onderwerp: Re: [riemers/ansible-gitlab-runner] Fix linting issues (PR #312)

All issues fixed, are you sure about reverting the role namehttps://ansible.readthedocs.io/projects/lint/rules/role-name/ from gitlab_runner to gitlab-runner?

— Reply to this email directly, view it on GitHubhttps://github.com/riemers/ansible-gitlab-runner/pull/312#issuecomment-1906424028, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFGQOKGPJ3W4LMFPHUXGSLYP7PURAVCNFSM6AAAAABCGZ747WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWGQZDIMBSHA. You are receiving this because you were mentioned.Message ID: @.***>

riemers avatar Jan 23 '24 16:01 riemers

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?

gardar avatar Jan 23 '24 16:01 gardar

Don’t dare to touch it.. but I can ask if an alias is possible. But if it is that means people can steal other names too. So I doubt it. Going back and forth also doesn’t help ;)


Van: gardar @.> Verzonden: Tuesday, January 23, 2024 5:40:27 PM Aan: riemers/ansible-gitlab-runner @.> CC: Erik-jan Riemers @.>; Mention @.> Onderwerp: Re: [riemers/ansible-gitlab-runner] Fix linting issues (PR #312)

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?

— Reply to this email directly, view it on GitHubhttps://github.com/riemers/ansible-gitlab-runner/pull/312#issuecomment-1906472180, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFGQOMTGV2QPKO4GUPITTDYP7RXXAVCNFSM6AAAAABCGZ747WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWGQ3TEMJYGA. You are receiving this because you were mentioned.Message ID: @.***>

riemers avatar Jan 25 '24 06:01 riemers

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.

gardar avatar Jan 25 '24 13:01 gardar

If it is possible to have both that would be fine too. I know a lot of people used the old role.. but it won’t be end of the world either.


Van: gardar @.> Verzonden: Thursday, January 25, 2024 2:52:02 PM Aan: riemers/ansible-gitlab-runner @.> CC: Erik-jan Riemers @.>; Mention @.> Onderwerp: Re: [riemers/ansible-gitlab-runner] Fix linting issues (PR #312)

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.

— Reply to this email directly, view it on GitHubhttps://github.com/riemers/ansible-gitlab-runner/pull/312#issuecomment-1910261190, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFGQOL5RSO4SLIPNGNWDDLYQJPQFAVCNFSM6AAAAABCGZ747WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQGI3DCMJZGA. You are receiving this because you were mentioned.Message ID: @.***>

riemers avatar Jan 25 '24 18:01 riemers

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

gardar avatar Jan 25 '24 19:01 gardar

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.

ericsysmin avatar Feb 12 '24 18:02 ericsysmin

Maybe we can do both? I mean if it’s a requirement somewhere on the website and we should follow that pattern but then I loose the history / downloads from it too no?


Van: Eric Anderson @.> Verzonden: Monday, February 12, 2024 7:56:17 PM Aan: riemers/ansible-gitlab-runner @.> CC: Erik-jan Riemers @.>; Mention @.> Onderwerp: Re: [riemers/ansible-gitlab-runner] Fix linting issues (PR #312)

All issues fixed, are you sure about reverting the role namehttps://ansible.readthedocs.io/projects/lint/rules/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.

— Reply to this email directly, view it on GitHubhttps://github.com/riemers/ansible-gitlab-runner/pull/312#issuecomment-1939346492, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFGQOPVKIITE37XCZFC7XLYTJQVDAVCNFSM6AAAAABCGZ747WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZZGM2DMNBZGI. You are receiving this because you were mentioned.Message ID: @.***>

riemers avatar Feb 13 '24 08:02 riemers

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 avatar Feb 13 '24 12:02 gardar

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

gardar avatar Feb 27 '24 16:02 gardar

Been I’ll for some time and also busy as you are also ;) still have to do boring taxes and playing helpdesk for the family’s. I’ll need some time in the weekend and take some time for it.


Van: gardar @.> Verzonden: Tuesday, February 27, 2024 5:02:40 PM Aan: riemers/ansible-gitlab-runner @.> CC: Erik-jan Riemers @.>; Mention @.> Onderwerp: Re: [riemers/ansible-gitlab-runner] Fix linting issues (PR #312)

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

— Reply to this email directly, view it on GitHubhttps://github.com/riemers/ansible-gitlab-runner/pull/312#issuecomment-1966895272, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFGQOJNKZRWCKEWG7VMTPLYVX7SBAVCNFSM6AAAAABCGZ747WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRWHA4TKMRXGI. You are receiving this because you were mentioned.Message ID: @.***>

riemers avatar Feb 27 '24 18:02 riemers

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[bot] avatar Apr 13 '24 01:04 github-actions[bot]

Any news @riemers ?

gardar avatar Apr 13 '24 02:04 gardar

@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.

guenhter avatar Apr 25 '24 09:04 guenhter

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.

guenhter avatar Apr 25 '24 14:04 guenhter

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

guenhter avatar Apr 26 '24 09:04 guenhter

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

guenhter avatar May 07 '24 08:05 guenhter

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

gardar avatar May 08 '24 10:05 gardar

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[bot] avatar Jun 23 '24 01:06 github-actions[bot]

Unstale

gardar avatar Jun 23 '24 02:06 gardar

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[bot] avatar Aug 08 '24 01:08 github-actions[bot]

Unstale i suppose ;p

riemers avatar Aug 08 '24 09:08 riemers

See #344

riemers avatar Aug 13 '24 12:08 riemers