Web: encode job name in API requests #2866
Merged
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.
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
CHANGELOG.md
(Depending on the change, this may not be necessary)..sql
database schema migration according to Flyway's naming convention (if relevant)