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

SDK getResource failOnNoData flag #205

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Conversation

AndrewTwydell
Copy link
Contributor

What It Does
Adds a failOnNodata flag, defaulting to true (which is the current behaviour), to dictate if CMCI sending a NODATA response should throw an error or not.

Review Checklist
I certify that I have:

Additional Comments

@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 34.78261% with 90 lines in your changes missing coverage. Please review.

Project coverage is 28.31%. Comparing base (61f57a8) to head (a8badee).

Files with missing lines Patch % Lines
packages/vsce/src/utils/profileManagement.ts 25.25% 74 Missing ⚠️
packages/sdk/src/rest/CicsCmciRestError.ts 10.00% 9 Missing ⚠️
packages/vsce/src/trees/CICSPlexTree.ts 0.00% 3 Missing ⚠️
packages/vsce/src/utils/expansionHandler.ts 0.00% 2 Missing ⚠️
packages/sdk/src/rest/CicsCmciRestClient.ts 94.44% 1 Missing ⚠️
packages/vsce/src/commands/manageSessionCommand.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #205      +/-   ##
==========================================
+ Coverage   28.25%   28.31%   +0.06%     
==========================================
  Files         146      147       +1     
  Lines        4987     5047      +60     
  Branches      869      879      +10     
==========================================
+ Hits         1409     1429      +20     
- Misses       3578     3618      +40     

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

@davenice
Copy link
Contributor

This looks good too - do we need it for use in VSCE somewhere?

failOnNoData is added, but is optional, right? Is there any way this could break existing callers?

@AndrewTwydell
Copy link
Contributor Author

Yeah the idea will be we implement this into the VSCE getResource calls so we don't have to handle NODATA CMCI errors. The fact it's optional means we're not breaking current users of the SDK as it's default behavior is not changing; only once you opt in to the new features using these optional flags will the behaviour change.

Currently a WIP, looking at an optional flag to change the error you can get out too which will offer more helpful CMCI info on failures (RESP, RESP2 etc)

Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants