Skip to content

_encode_uri_path_for_uss acknowledge encoding on a URI given as input - #415

Merged
zFernand0 merged 3 commits into
zowe:mainfrom
aadityasinha-dotcom:encode_uri
Sep 30, 2026
Merged

zFernand0 merged 3 commits into
zowe:mainfrom
aadityasinha-dotcom:encode_uri

Conversation

@aadityasinha-dotcom

@aadityasinha-dotcom aadityasinha-dotcom commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

What It Does
Resolves #413

How to Test

Review Checklist
I certify that I have:

  • updated the changelog
  • manually tested my changes
  • added/updated automated unit/integration tests
  • created/ran system tests (provide build number if applicable)
  • followed the contribution guidelines

Additional Comments

Signed-off-by: aadityasinha-dotcom <aadityasinha009@gmail.com>
@github-project-automation github-project-automation Bot moved this to New Issues in Zowe CLI Squad Sep 4, 2026
@zowe-robot zowe-robot moved this from New Issues to In Progress in Zowe CLI Squad Sep 4, 2026
@zFernand0 zFernand0 linked an issue Sep 10, 2026 that may be closed by this pull request
@zFernand0
zFernand0 self-requested a review September 10, 2026 19:13
@aadityasinha-dotcom
aadityasinha-dotcom marked this pull request as ready for review September 12, 2026 21:39
@zowe-robot zowe-robot moved this from In Progress to Review/QA in Zowe CLI Squad Sep 12, 2026
@JTonda
JTonda requested a review from traeok September 14, 2026 15:08
traeok
traeok previously requested changes Sep 14, 2026

@traeok traeok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

While I'm not opposed to taking this approach, I noticed that urllib is already imported at the top. Could we use the urllib.parse function to detect URI encoding instead?

For example:

from urllib.parse import unquote, quote

def is_percent_encoded(text: str) -> bool:
    """Checks if a string contains valid percent-encoding."""
    # unquote transforms '%20' to ' ' and returns a different string if encoding was present
    return unquote(text) != text

Signed-off-by: aadityasinha-dotcom <aadityasinha009@gmail.com>
@JTonda
JTonda requested a review from traeok September 21, 2026 15:09
@traeok
traeok dismissed their stale review September 21, 2026 18:45

Requested changes have been implemented.

@traeok traeok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks Aaditya, all looks good and I'm ready to approve if tests pass. Can you please add a changelog entry to track the fix?

@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.53%. Comparing base (5f8f8bc) to head (c34de42).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #415      +/-   ##
==========================================
+ Coverage   85.50%   85.53%   +0.02%     
==========================================
  Files          49       49              
  Lines        2995     3001       +6     
==========================================
+ Hits         2561     2567       +6     
  Misses        434      434              
Flag Coverage Δ
unittests 85.53% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

Signed-off-by: aadityasinha-dotcom <aadityasinha009@gmail.com>
@traeok
traeok requested a review from anaxceron September 25, 2026 14:45

@traeok traeok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @aadityasinha-dotcom! LGTM

@zFernand0 zFernand0 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! 😋


I had forgotten to submit my review last week 😢

@zFernand0
zFernand0 merged commit ac64632 into zowe:main Sep 30, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

_encode_uri_path_for_uss does not skip encoded URIs

5 participants