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 #36521 - raise an error with invalid manifest #10619

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

lfu
Copy link
Member

@lfu lfu commented Jun 20, 2023

What are the changes introduced in this pull request?

Considerations taken when implementing this change?

What are the testing steps for this pull request?

  1. Export a Red Hat repository
  2. Go to your disconnected Satellite and remove all subscriptions from your manifest (DO NOT DELETE THE MANIFEST, JUST LET IT EMPTY)
  3. Try importing the Red hat repository exported in step 1

Before:

Could not import the archive.:
undefined method `substitutor' for nil:NilClass

After

Could not import the archive.:
  Manifest does not have a valid subscription

@theforeman-bot
Copy link

Issues: #36521

chris1984

This comment was marked as duplicate.

Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

On my export org ( with a current manifest that has subscriptions) When trying to enable a RH repo I get the following

undefined method `empty?' for #Katello::Resources::CDN::CdnResource:0x00007fa5151051c8

Looks like the 2 failing tests are also failing with the same thing

https://ci.theforeman.org/blue/organizations/jenkins/katello-pr-test/detail/katello-pr-test/12939/tests

Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

Works great,

Exported a repo with my default organization
Created a new organization with an empty manifest and tried to import

[root@centos8-stream-katello-nightly ~]# hammer content-import repository --organization-id 3 --path /var/lib/pulp/imports/Default_Organization/Export-Red_Hat_Satellite_Client_6_for_RHEL_7_Server_RPMs_x86_64-1/1.0/2023-06-26T15-40-49-00-00/
Could not import the archive.:
  The organization's manifest does not contain the subscriptions required to enable the following repositories.
   
  * Product = 'Red Hat Enterprise Linux Server', Repository = 'Red Hat Satellite Client 6 for RHEL 7 Server RPMs x86_64'

@lfu lfu merged commit 58dcb48 into Katello:master Jun 27, 2023
5 checks passed
@lfu lfu deleted the repo_import_36521 branch November 16, 2023 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants