Reduce excessive URI encoding [V2]#2750
Draft
gejohnston wants to merge 22 commits into
Draft
Conversation
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
…coding Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
Signed-off-by: Gene Johnston <eugene.johnston@broadcom.com>
Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
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.
What It Does
To prepare for future changes to URI encoding, this PR reduces the encoding used for URIs in REST requests by the following Zowe client SDK operations. These operations cover all known REST URIs that are currently encoded by Zowe clients.
URI encoding has been reduced to the minimum that still allows the operations to work successfully in the current z/OS environment.
URI encoding has been consolidated into one file (EncodeUri.ts) to enable quick adjustment when new URI restrictions come online.
Different levels of URI encoding is implemented for z/OSMF and API-ML, because API-ML requires more characters to be encoded.
Two characters " and \ are valid characters in USS file names. During testing I discovered that both z/OSMF and API-ML fail with vague server errors (like HTTP 500). As part of this change, the Zowe client SDK throws an error when either character is included in a USS file name. That error message identifies the offending character which cannot be used with REST APIs in the current environment.
These changes have been successfully tested manually and successfully regression-tested by automated pipelines in the CLI. Manual testing of Zowe Explorer with these SDK changes is just beginning, and no CHANGELOG has been written yet.
I requested reviews prior to the completion of Zowe Explorer testing to give people sufficient time to review the changes before the upcoming Zowe V2 release. I will keep this PR as a draft until Zowe Explorer testing is complete.
How to Test
Select a valid special character. Place that character into dataset, USS file name, or job. Perform a Zowe CLI command on such an item. USS file names allow more special characters, so they are a good choice for testing. For example, ? is a valid character in a USS file name, but it has special meaning in a URI as the start of a query parameter.
You can also perform any of the other operations listed above with special characters.
Review Checklist
I certify that I have:
Additional Comments
The same set of changes will be applied to V3 after the testing of V2 is complete.