Skip to content

[CONS-1090] Harbor discards a customer's license data when a refresh fails - #208

Merged
defunctl merged 3 commits into
experiment/software-stackfrom
fix/CONS-1090-keep-products-on-failed-refresh
Oct 11, 2026
Merged

defunctl merged 3 commits into
experiment/software-stackfrom
fix/CONS-1090-keep-products-on-failed-refresh

Conversation

@johnhooks

@johnhooks johnhooks commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

🎫 Ticket

CONS-1090

🗒️ Description

Keeps a customer's cached purchases when a license refresh fails, so a Licensing outage no longer makes them look unlicensed.

⚠️ Blockers

Based on #205.

Summary by CodeRabbit

  • Bug Fixes
    • When a product catalog refresh fails, the previously cached catalog is preserved rather than cleared, keeping existing product information available.
    • When a refresh succeeds, the cached catalog is replaced with the latest results, and any prior refresh error is cleared.

refresh_products() deleted the cached products before calling
Licensing, so a timeout or error left nothing to fall back on and the
customer looked unlicensed until a later fetch succeeded.
@linear

linear Bot commented Oct 11, 2026

Copy link
Copy Markdown

CONS-1090

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 1614fefc-0573-438c-aab9-7391e7812e10

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 9b70462e-c75a-4c77-ab3f-b0ab00511bf5





📥 Commits

Reviewing files that changed from the base of the PR and between 648f358 and d8766b0.






📒 Files selected for processing (2)
  • src/Harbor/Licensing/License_Manager.php
  • tests/wpunit/Licensing/License_ManagerTest.php





Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.







📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

refresh_products() no longer deletes the cached product catalog before fetching. Tests check that a failed refresh preserves the cached collection and records a failure timestamp, while a successful refresh replaces the collection and clears the prior error.

Changes

Product catalog refresh

Layer / File(s) Summary
Refresh and verify catalog behavior
src/Harbor/Licensing/License_Manager.php, tests/wpunit/Licensing/License_ManagerTest.php
refresh_products() calls the fetch helper without first deleting the cached catalog. Its documentation describes a cache-bypassing refresh and says that a failed refresh keeps the cached catalog. Tests check cache and error state after failed and successful refreshes.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix












Merge Risk: ⚪ Minimal · up to d8766

A failed license refresh preserves cached purchases. No actionable merge-blocking issue remains.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the primary bug addressed by the pull request: cached license data was discarded when a refresh failed.





✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR






🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR









  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@johnhooks
johnhooks marked this pull request as ready for review October 11, 2026 20:59
@johnhooks
johnhooks requested a review from defunctl October 11, 2026 20:59
@defunctl
defunctl merged commit 1eb8d3a into experiment/software-stack Oct 11, 2026
26 checks passed
@defunctl
defunctl deleted the fix/CONS-1090-keep-products-on-failed-refresh branch October 11, 2026 21:14
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.

2 participants