Skip to content

MASCORE-15348: Skip isUserSyncTarget validation in test_bundle_sizes for MAS >= 9.1 - #557

Open
Raahithyaj wants to merge 1 commit into
mainfrom
mascore-15348-clean
Open

MASCORE-15348: Skip isUserSyncTarget validation in test_bundle_sizes for MAS >= 9.1#557
Raahithyaj wants to merge 1 commit into
mainfrom
mascore-15348-clean

Conversation

@Raahithyaj

Copy link
Copy Markdown

Issue

MASCORE-15348 - postsync-verify-manage-job is still failing in 8.3.0

Description

For MAS >= 9.1, the operator automatically manages the isUserSyncTarget field in the ManageWorkspace CR status internally. Users should not set or validate this field in automation. However, the test_bundle_sizes test in postsync-verify-manage-job was doing a full equality check between spec and status serverBundles, which caused it to fail whenever the operator set isUserSyncTarget to a different value in status than what was in spec.

This fix adds a remove_user_sync_target() function in the test script that strips isUserSyncTarget from both spec and status bundles before comparing them, gated on MAS_APP_CHANNEL >= 9.1. The MAS app channel is passed into the job pod as an environment variable so the test knows which version it's running against. The channel value is threaded through from the root app Helm values (ibm_suite_app_manage_install.mas_app_channel) down to the 510-550-ibm-mas-suite-app-config chart.

Test Results

Tested on noble8/inst02 (MAS 9.2.x). Reproduced the bug on the old code — test_bundle_sizes failed with isUserSyncTarget: False in spec vs True in status for the ui bundle.

image

After fix: All tests pass. Confirmed via configmap postsync-verify-tests-manage-record-cm:

../tmp/tests/tests.py::test_expected_reconciled_version PASSED  [ 20%]
../tmp/tests/tests.py::test_languages_set                PASSED  [ 40%]
../tmp/tests/tests.py::test_addons_enabled               PASSED  [ 60%]
../tmp/tests/tests.py::test_bundle_sizes                 PASSED  [ 80%]
../tmp/tests/tests.py::test_get_manage_ai_service_ping   SKIPPED (AI Broker API key not found)

4 passed, 1 skipped

Proof that the fix is exercised — spec has no isUserSyncTarget, status has it (operator sets it), yet the test passes:

  • spec.serverBundles[ui] — no isUserSyncTarget field
  • status.serverBundles[ui]isUserSyncTarget: true (operator-managed)

This confirms remove_user_sync_target() is stripping the field from status before comparison, making the test pass as expected.

@Raahithyaj
Raahithyaj requested a review from mnivedithaa August 12, 2026 06:12
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.

1 participant