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

Fixes #31197 - ansible galaxy URL updates #9387

Merged
merged 1 commit into from Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -25,7 +25,7 @@ def distribution_options(path)
end

def partial_repo_path
"/pulp_ansible/galaxy/#{repo.relative_path}/api/v2/collections"
"/pulp_ansible/galaxy/#{repo.relative_path}/api/"
end

def mirror_remote_options
Expand Down
Expand Up @@ -144,13 +144,11 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',

$scope.collectionURLPopover = $sce.trustAsHtml("You can sync collections utilizing just the url:<br/>" +
"<b>1. For all collections in Ansible Galaxy:</b><br/>" +
"https://galaxy.ansible.com/api/v2/collections <br/>" +
"<b>2. For specific collection with URL filtering:</b><br/>" +
"https://galaxy.ansible.com/api/v2/collections/testing/k8s_demo_collection <br/>" +
"<b>3. For specific collections with Requirements.yml:</b><br/>" +
"https://galaxy.ansible.com/api/<br/>" +
Copy link
Member

Choose a reason for hiding this comment

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

Think https://galaxy.ansible.com/ is used for mirroring although the last I tried to mirror, it failed on some collection in galaxy..Not sure we want to advertise mirroring?

Copy link
Member Author

Choose a reason for hiding this comment

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

@sjha4 you mean mirroring all of Galaxy? Do we know why this was presented as a tool tip in the first place?

Copy link
Member

Choose a reason for hiding this comment

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

Ya..That was supposed to be a use case for collections support..Mirroring all of galaxy. I don't mind leaving that as advertised. Only issue was last I tried it, it failed on some collection in the galaxy. Think we'll have to test it better so it doesn't stay broken.

Copy link
Member Author

Choose a reason for hiding this comment

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

@sjha4 @jlsherrill aside from the comments re the galaxy url being listed... any other items we need to adjust? I think @jeremylenz is waiting on this for 4.1 picks.

Copy link
Member

Choose a reason for hiding this comment

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

maybe we should discuss it more with the pulp-ansible team and merge this as is. ACK from me

Copy link
Member

Choose a reason for hiding this comment

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

Ack +1

"<b>2. For specific collections with Requirements.yml:</b><br/>" +
"Use base URL https://galaxy.ansible.com/ and specify requirements.yml below to specify collections");

$scope.requirementPopover = $sce.trustAsHtml("To learn more about requirement.yml specification, visit <a href='https://docs.ansible.com/ansible/devel/dev_guide/collections_tech_preview.html#install-multiple-collections-with-a-requirements-file' target=\"_blank\">documentation </a>");
$scope.requirementPopover = $sce.trustAsHtml("To learn more about requirement.yml specification, visit <a href='https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#install-multiple-collections-with-a-requirements-file' target=\"_blank\">documentation </a>");

$scope.displayHttpProxyPolicyName = function (policy) {
return HttpProxyPolicy.displayHttpProxyPolicyName(policy);
Expand Down
Expand Up @@ -19,7 +19,7 @@ def setup
def test_feed_url_is_prepended_with_pulp_rpm_content_path
pulp3_repo = Katello::Pulp3::Repository::AnsibleCollection.new(@repo, @mock_smart_proxy)

assert_equal '/pulp_ansible/galaxy/' + @repo.relative_path + '/api/v2/collections', pulp3_repo.partial_repo_path
assert_equal '/pulp_ansible/galaxy/' + @repo.relative_path + '/api/', pulp3_repo.partial_repo_path
end

def test_remote_options
Expand Down