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

Web: encode job name in API requests #2866

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

dolfinus
Copy link
Contributor

@dolfinus dolfinus commented Aug 5, 2024

Problem

After upgrading to 0.48 opening some job details lead to 404 errors.
This is because I have job names with slashes, like my/session/name, resulting API query to look like this:
http://localhost:8080/api/v1/namespaces/yarn%3A%2F%2Fsomecluster/jobs/my/session/name.execute_insert_into_hadoop_fs_relation_command

But it should be:
http://localhost:8080/api/v1/namespaces/yarn%3A%2F%2Fsomecluster/jobs/my%2Fsession%2Fname.execute_insert_into_hadoop_fs_relation_command

Same could be applied to dataset, tag or field names.

Solution

One-line summary:

Urlencode job, dataset, tag and field names while sending API request.

Checklist

  • You've signed-off your work
  • Your changes are accompanied by tests (if relevant)
  • Your change contains a small diff and is self-contained
  • You've updated any relevant documentation (if relevant)
  • You've included a one-line summary of your change for the CHANGELOG.md (Depending on the change, this may not be necessary).
  • You've versioned your .sql database schema migration according to Flyway's naming convention (if relevant)
  • You've included a header in any source code files (if relevant)

@boring-cyborg boring-cyborg bot added the web label Aug 5, 2024
Copy link

netlify bot commented Aug 5, 2024

Deploy Preview for peppy-sprite-186812 canceled.

Name Link
🔨 Latest commit 49bcd9c
🔍 Latest deploy log https://app.netlify.com/sites/peppy-sprite-186812/deploys/66b0e33537083f0008684c02

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.47%. Comparing base (94ec22e) to head (49bcd9c).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2866      +/-   ##
============================================
+ Coverage     84.80%   85.47%   +0.67%     
+ Complexity     1469     1228     -241     
============================================
  Files           256      213      -43     
  Lines          6615     5619     -996     
  Branches        308      268      -40     
============================================
- Hits           5610     4803     -807     
+ Misses          852      692     -160     
+ Partials        153      124      -29     

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

@dolfinus dolfinus force-pushed the bugfix/encode-job-name branch 2 times, most recently from 1b86cf7 to a3b65bc Compare August 5, 2024 14:27
Signed-off-by: Martynov Maxim <martinov_m_s_@mail.ru>
@dolfinus dolfinus force-pushed the bugfix/encode-job-name branch from a3b65bc to 49bcd9c Compare August 5, 2024 14:35
Copy link
Member

@phixMe phixMe left a comment

Choose a reason for hiding this comment

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

Thanks, this is the kind of issue that we keep getting back to with every path we have. We really need some unit test coverage on this. @wslulciuc We should come up with something here.

@phixMe phixMe merged commit 2c4d271 into MarquezProject:main Aug 5, 2024
16 checks passed
@dolfinus dolfinus deleted the bugfix/encode-job-name branch August 5, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants