Fixes #38055 - Fix future-dated subscriptions #11243
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the changes introduced in this pull request?
Problem 1:
Candlepin's
GET owners/{owner_key}/products
endpoint, called byKatello::Resources::Candlepin::Product.all
, recently added a new param,active
. When the param is not included, it apparently causes Candlepin to omit (some?) products with future-dated subscriptions. Sending the paramactive=include
should restore the previous behavior. This affects Candlepin version 4.4.15 and above.Problem 2:
The "Add Subscriptions" page does not display future-dated subscriptions, e.g. subscriptions whose start date is in the future. Sending the
add_future
param should fix that.Considerations taken when implementing this change?
I don't think this should break anything, since the param would just be ignored on previous CP versions.
What are the testing steps for this pull request?
Obtain a manifest with a future-dated subscription and no other subscriptions
Import into a new organization
Without this PR: Manifest import fails with
From another org with a valid manifest imported, the "Add Subscriptions" page does not show any future-dated subscriptions available to add.
After:
Manifest import succeeds
You can see any future-dated subscriptions on the Add Subscriptions page. Compare with access.redhat.com > Subscription allocations > your manifest > Add subscriptions. The available subscriptions in Satellite should include future-dated ones just like this page does.