zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
113 stars 87 forks source link

fix(ProfileInfo): ignore command-based props during schema comparison #2045

Closed traeok closed 7 months ago

traeok commented 7 months ago

What It Does

Resolves #2051

Since we allow command-based schemas to be registered through Zowe Explorer, the comparison checks between schemas need to omit any command-related properties to prevent the equality checks from failing.

Otherwise, the warning regarding "two unversioned schemas with different contents" will persist as the equality check will always fail. This PR resolves this by ignoring any command-based properties when comparing schemas.

Ideally, we would make initForZowe in Zowe Explorer API use the IProfileTypeConfiguration type instead of ICommandProfileTypeConfiguration - unfortunately, this would be a breaking change, so the best we can do for now is make comparisons and ignore the properties from the command-based type.

Review Checklist I certify that I have:

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (1b972d7) 91.06% compared to head (7ff571b) 91.06%. Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2045 +/- ## ======================================= Coverage 91.06% 91.06% ======================================= Files 636 636 Lines 18955 18967 +12 Branches 3862 3865 +3 ======================================= + Hits 17261 17273 +12 Misses 1693 1693 Partials 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
92.6% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

github-actions[bot] commented 7 months ago

Release succeeded for the master branch. :tada:

The following packages have been published:

Powered by Octorelease :rocket: