Skip to content

Make changes to support connection timeouts and hostname validation#2486

Merged
zFernand0 merged 3 commits intomasterfrom
fix-session-issues
Apr 21, 2025
Merged

Make changes to support connection timeouts and hostname validation#2486
zFernand0 merged 3 commits intomasterfrom
fix-session-issues

Conversation

@awharn
Copy link
Copy Markdown
Member

@awharn awharn commented Apr 15, 2025

What It Does

Adds a connection timeout to the Abstract Rest Client.
Adds hostname validation to REST requests.
Fixes linter errors.
Makes imports more granular to prevent circular imports.

How to Test

Review Checklist
I certify that I have:

Additional Comments

Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
@awharn awharn self-assigned this Apr 15, 2025
@github-project-automation github-project-automation Bot moved this to New Issues in Zowe CLI Squad Apr 15, 2025
@zowe-robot zowe-robot moved this from New Issues to In Progress in Zowe CLI Squad Apr 15, 2025
@github-actions
Copy link
Copy Markdown

📅 Suggested merge-by date: 4/29/2025

Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.56%. Comparing base (c6da93b) to head (075329f).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #2486    +/-   ##
========================================
  Coverage   91.55%   91.56%            
========================================
  Files         641      641            
  Lines       18480    18498    +18     
  Branches     3918     4036   +118     
========================================
+ Hits        16920    16938    +18     
  Misses       1558     1558            
  Partials        2        2            

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

import { ZosFilesUtils } from "../../utils/ZosFilesUtils";

export class Utilities {
private static readonly minimumTimeout = 5;
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.

should this timeout be added as a constant? in Constants.ts? only because a min timeout of 5 is used a lot of places

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I only did this here because of the several uses in this one file. The only other locations where I could find 5 being used was in the zosfiles strings file, and as a parameter for responseTimeout in the zosmf package. The only places where the change could be placed to share that value across those three files is either zosmf or core, and a new constants object would need to be created to export it. Seeing as the property here is readonly, I plan to leave the implementation as-is until we find more constants that we would like to expose at a lower level.

@github-project-automation github-project-automation Bot moved this from In Progress to Review/QA in Zowe CLI Squad Apr 16, 2025
Comment thread packages/imperative/CHANGELOG.md Outdated
Copy link
Copy Markdown
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.

Left a comment re: the changelog

Comment thread packages/imperative/CHANGELOG.md Outdated
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
@awharn awharn requested a review from anaxceron April 17, 2025 13:25
Copy link
Copy Markdown
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.

Good changelog, thanks @awharn!

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
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.

Tested and LGTM, thanks Andrew!

Copy link
Copy Markdown
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! 😋

Pardon the late review 😅
Thanks for adding this as an ENV 🥳

@zFernand0 zFernand0 merged commit 8d182fe into master Apr 21, 2025
25 of 26 checks passed
@zFernand0 zFernand0 deleted the fix-session-issues branch April 21, 2025 13:44
@github-project-automation github-project-automation Bot moved this from Review/QA to Closed in Zowe CLI Squad Apr 21, 2025
@zFernand0 zFernand0 added the release-current Indicates that there is no new functionality being delivered label Apr 21, 2025
@zFernand0
Copy link
Copy Markdown
Member

tagging release current to combine with the 2 other open PRs 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-current Indicates that there is no new functionality being delivered

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

8 participants