Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(V3): Edit team config fails with global & project level present #3138

Merged
merged 10 commits into from
Oct 3, 2024

Conversation

SanthoshiBoyina1
Copy link
Contributor

@SanthoshiBoyina1 SanthoshiBoyina1 commented Sep 23, 2024

Proposed changes

Solves #3125
To fix Edit team config fails with global & project level present

Release Notes

Milestone:

Changelog:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds or improves functionality)
  • Breaking change (a change that would cause existing functionality to not work as expected)
  • Documentation (Markdown, README updates)
  • Other (please specify above in "Proposed changes" section)

Checklist

General

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • All PR dependencies have been merged and published (if applicable)
  • A GIF or screenshot is included in the PR for visual changes
  • The pre-publish command has been executed:
    • v2 and below: yarn workspace vscode-extension-for-zowe vscode:prepublish
    • v3: pnpm --filter vscode-extension-for-zowe vscode:prepublish

Code coverage

  • There is coverage for the code that I have added
  • I have added new test cases and they are passing
  • I have manually tested the changes

Deployment

  • I have added developer documentation (if applicable)
  • Documentation should be added to Zowe Docs
    • If you're an outside contributor, please post in the #zowe-doc Slack channel to coordinate documentation.
    • Otherwise, please check with the rest of the squad about any needed documentation before merging.
  • These changes may need ported to the appropriate branches (list here):

Further comments

Copy link

📅 Suggested merge-by date: 10/7/2024

JillieBeanSim
JillieBeanSim previously approved these changes Sep 23, 2024
Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

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

LGTM! thanks for the fix @SanthoshiBoyina1

Copy link
Member

@t1m0thyj t1m0thyj left a comment

Choose a reason for hiding this comment

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

Will approve once Trae's comment is addressed - creating zowe.config.user.json files should not be the default behavior, as the purpose of User Config is solely to override values in zowe.config.json.

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.79%. Comparing base (71f995d) to head (99b0a65).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
...ckages/zowe-explorer/src/configuration/Profiles.ts 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3138      +/-   ##
==========================================
- Coverage   92.79%   92.79%   -0.01%     
==========================================
  Files         113      113              
  Lines       11663    11669       +6     
  Branches     2593     2501      -92     
==========================================
+ Hits        10823    10828       +5     
- Misses        838      839       +1     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

left a small comment on the changelog 😅

packages/zowe-explorer/src/configuration/Profiles.ts Outdated Show resolved Hide resolved
packages/zowe-explorer/CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Billie Simmons <[email protected]>
@JillieBeanSim
Copy link
Contributor

JillieBeanSim commented Sep 25, 2024

Hey all, I tried a different approach. Let me know what you think @traeok @t1m0thyj @zFernand0

FYI @SanthoshiBoyina1

Edit: sorry, not to look like I'm just barging in on the PR. Santhoshi asked me to help look into resolving the concerns raised in PR.

zFernand0
zFernand0 previously approved these changes Sep 26, 2024
Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

LGTM! 😋

Left a small comment about an edge-case. 😅
But it's a bit rare for someone to want to update their config by opening their zoweDir and selecting project as their choice 😋

@zFernand0 zFernand0 added this to the v3.0.0 GA milestone Sep 27, 2024
Signed-off-by: Santhoshi Boyina <[email protected]>
@traeok traeok self-requested a review September 30, 2024 21:55
Signed-off-by: Santhoshi Boyina <[email protected]>
anaxceron
anaxceron previously approved these changes Oct 1, 2024
Copy link
Contributor

@anaxceron anaxceron left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @SanthoshiBoyina1!

await this.openConfigFile(file.path);
}
}
Gui.showMessage(this.manualEditMsg);
break;
case "global":
for (const file of existingLayers) {
if (file.global) {
if (file.path.includes(FileManagement.getZoweDir())) {
Copy link
Member

Choose a reason for hiding this comment

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

I think the change on this line could be reverted to address Fernando's comment 😋

Suggested change
if (file.path.includes(FileManagement.getZoweDir())) {
if (file.global) {

@t1m0thyj t1m0thyj modified the milestones: v3.0.0 GA, v3.0.1 Oct 2, 2024
Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

As Timothy mentioned, it looks like we'll need to change the logic back for case "global" so that it handles opening files in the Zowe dir as well.

Will approve once resolved 😋

Copy link

sonarcloud bot commented Oct 3, 2024

Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

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

LGTM! thanks @SanthoshiBoyina1 for the fix

@JillieBeanSim JillieBeanSim merged commit 27836ed into main Oct 3, 2024
22 checks passed
@JillieBeanSim JillieBeanSim deleted the fix/editTeamConfig branch October 3, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Edit team config fails with global & project level present
6 participants