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 #37832 - Don't use cached manifest expiration date after manifest refresh #11149

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

jeremylenz
Copy link
Member

@jeremylenz jeremylenz commented Sep 17, 2024

What are the changes introduced in this pull request?

  1. Introduce a new undocumented API param, force_manifest_expire_cache, in the Organizations API controller. This calls manifest_expiration_date with cached: false, making sure we make the call to local Candlepin and get the up-to-date manifest expiration date.
  2. Pass this param from the Subscriptions page when we're finished refreshing a manifest.

Considerations taken when implementing this change?

What are the testing steps for this pull request?

  1. Import a BLANK manifest with expiration date < 365 days
  2. Refresh the manifest
  3. Click Manage Manifest

The expiration date should be extended to one year from today's date, but still shows the old expiration date. Refreshing the browser page resolves the issue.

Now, check out the PR
Delete your manifest
Import the same manifest from the zip file (showing old expiration date)
Now refresh the manifest again.

You should immediately see the new expiration date, with no browser refresh needed.

Important: Make sure you reproduce the issue first. I was only able to reproduce it with a BLANK manifest (with no subscriptions). Manifests with subscriptions don't seem to have the issue.

@qcjames53
Copy link
Contributor

Hi Jeremy!

I appreciate the detailed testing steps you wrote out. I was able to reliably trigger the issue with my qjames-test-manifest-2 manifest from RH console. When switching to the PR branch, unfortunately it appears that the manifest date does not visually change on a manifest refresh in Safari. Refreshing the manifest again or reloading the page seems to update the expiry field. I checked both Firefox and Chrome and they both appear to work as expected.

There are quite a few console errors I can share if you would like; it's very repeatable. The top screenshot is Firefox after refresh, the bottom is Safari:

image image

@qcjames53
Copy link
Contributor

Is Safari support a deal breaker for Katello development? If not, I am happy to ACK. Things seem robust and I have no issues with the source.

@jeremylenz
Copy link
Member Author

cache cache cashity cache cache

Copy link
Contributor

@qcjames53 qcjames53 left a comment

Choose a reason for hiding this comment

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

Jeremy and I video called briefly to look at what was going wrong with Safari support. It turns out I hadn't deep refreshed the page yet and cache was (as usual) messing things up. Honest mistake. Manifest expiry date refresh appears to work perfectly.

ACKing

@qcjames53 qcjames53 merged commit e0f354d into Katello:master Sep 18, 2024
27 checks passed
@chris1984
Copy link
Member

People still use Safari?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants