Skip to content

[patch] Add Fix for OLM Subscriptions get to ConstraintsNotSatisfiable state#321

Open
Bhautik-Vala wants to merge 4 commits into
stablefrom
mascore-13497
Open

[patch] Add Fix for OLM Subscriptions get to ConstraintsNotSatisfiable state#321
Bhautik-Vala wants to merge 4 commits into
stablefrom
mascore-13497

Conversation

@Bhautik-Vala
Copy link
Copy Markdown
Contributor

JIRA ISSUE: https://jsw.ibm.com/browse/MASCORE-13497

Updated applySubscription() in olm.py to detect the OLM ConstraintsNotSatisfiable scenario where a CSV already exists but is not referenced by a subscription.

Changes done

  • added detection for the ResolutionFailed / ConstraintsNotSatisfiable condition
  • parsed the subscription error message to identify the impacted CSV
  • covered 2 cases in the logic:
    • marketplace_cache case, where OLM can recover after cleanup and retry
    • catalog_behind case, where we cleanup and fail clearly because retry alone will not fix it, catalog rebuild needed
  • added mock tests in test_olm_constraints.py, and test coverage is working fine

Testing
This issue is mainly seen during a fresh operator release/update window, so it is not reproducible reliably right now . Because of that, validation was done through mock-based unit tests covering the recovery scenarios, and those tests are passing.

@Bhautik-Vala Bhautik-Vala changed the title Mascore 13497 [patch] Add Fix for OLM Subscriptions get to ConstraintsNotSatisfiable state May 4, 2026
@terc1997 terc1997 marked this pull request as ready for review May 12, 2026 19:05
@terc1997 terc1997 requested a review from a team as a code owner May 12, 2026 19:05
Comment thread src/mas/devops/olm.py
if isVersionEqualOrAfter(existingVersion, requiredVersion):
scenario = "marketplace_cache"
else:
scenario = "catalog_behind"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

catalog_behind means that the requiredVersion is not available in the catalog ?

@durera
Copy link
Copy Markdown
Contributor

durera commented May 20, 2026

Isn't this primarily related to the use of development catalogs/builds in long-life environments (which isn't/never has been supported)? If we are going to deliver this the testing needs to be incredibly thorough, because the actions being taken here generally speaking do not happen in real world scenarios, and taking these kinds of actions is dangerous.

@Bhautik-Vala
Copy link
Copy Markdown
Contributor Author

Yes mainly we found this issue in long life dev env like IVTs. I am really not sure does it happen in real Env with static catalog, and as u said the testing is very complex here and we faces this issue only in very small window of the month when operator release done. so what coule be next step now - can we close this issue - #44? @durera

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