MASCORE-15348: Skip isUserSyncTarget validation in test_bundle_sizes for MAS >= 9.1 - #557
Open
Raahithyaj wants to merge 1 commit into
Open
MASCORE-15348: Skip isUserSyncTarget validation in test_bundle_sizes for MAS >= 9.1#557Raahithyaj wants to merge 1 commit into
Raahithyaj wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
MASCORE-15348 - postsync-verify-manage-job is still failing in 8.3.0
Description
For MAS >= 9.1, the operator automatically manages the
isUserSyncTargetfield in the ManageWorkspace CR status internally. Users should not set or validate this field in automation. However, thetest_bundle_sizestest inpostsync-verify-manage-jobwas doing a full equality check between spec and statusserverBundles, which caused it to fail whenever the operator setisUserSyncTargetto a different value in status than what was in spec.This fix adds a
remove_user_sync_target()function in the test script that stripsisUserSyncTargetfrom both spec and status bundles before comparing them, gated onMAS_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 the510-550-ibm-mas-suite-app-configchart.Test Results
Tested on
noble8/inst02(MAS 9.2.x). Reproduced the bug on the old code —test_bundle_sizesfailed withisUserSyncTarget: Falsein spec vsTruein status for theuibundle.After fix: All tests pass. Confirmed via configmap
postsync-verify-tests-manage-record-cm:Proof that the fix is exercised — spec has no
isUserSyncTarget, status has it (operator sets it), yet the test passes:spec.serverBundles[ui]— noisUserSyncTargetfieldstatus.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.