-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add namespace parameter in legacy config #241
Add namespace parameter in legacy config #241
Conversation
17e8dcc
to
dd2f1d8
Compare
af2422f
to
be24382
Compare
@jctanner sorry to bother you again, would this proposal make sense as well? |
@chouetz legacy namespaces in galaxy_ng aren't actually restricted to the same set of characters as the v3/collection namespaces. We have to allow any valid github username to become a legacy namespace to assert compatibility with all the roles currently on galaxy.ansible.com |
2d0af6d
to
c884de4
Compare
c884de4
to
1a8b3d9
Compare
@jctanner I updated the regex. According to what I saw on galaxy.ansible.com we have to enable underscore whereas it's not allowed for github username, I guess. |
The line above this change, Line 61, has a bad regexp also. LEGACY_ROLE_NAME_REGEXP = re.compile("^[a-zA-Z0-9-_]{1,55}$") should be LEGACY_ROLE_NAME_REGEXP = re.compile("^[a-zA-Z0-9_-]{1,55}$") As it is, it matches |
4979904
to
a17f996
Compare
Seems it broke one test. I did a modification without checking the content of the eda tarball, I'm not sure this patch is correct. I'll try to deep dive |
I approved, @chouetz , but I'm only "grey check" worthy. (I don't have write access.) You'll need an approval from a reviewer with "green check" super powers. :> |
I've dumped the role namespaces and names from old-galaxy to check these regexes ... https://gist.github.com/jctanner/a3573e1583897bd24408c2ac3d115032 Some are expected failures such as ...
However, I believe we need to allow roles like these ...
|
Hello
I propose to add the namespace in field of the LegacyGalaxyInfo class to solve the following:
I'm trying to validate a legacy role with both
galaxy-importer.main
andansible-lint
If I have NO namespace in my
meta/main.yaml
I have the following error when executing ansible-lint:and when I have a namespace and execute galaxy-importer:
Tests performed with
With this PR I allow having a namespace in the configuration but still require namespace to be provided for galaxy-importer (
python -m galaxy_importer.main --legacy-role my-role --namespace my-namespace
)