You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by "zhuqi-lucas (via GitHub)" <gi...@apache.org> on 2023/05/12 05:10:47 UTC

[GitHub] [yunikorn-core] zhuqi-lucas opened a new pull request, #545: [YUNIKORN-1734] Missing headers in REST response

zhuqi-lucas opened a new pull request, #545:
URL: https://github.com/apache/yunikorn-core/pull/545

   ### What is this PR for?
   REST responses should have the content type header set to JSON, this PR solve the following two problems:
   
   1. The usage REST responses, users; user; groups and group, do not have any headers set as they do not call writeHeaders(w).
   
   2. Also in case that the parameters are not set we return a JSON error response object without setting the header (introduced in [YUNIKORN-1472](https://issues.apache.org/jira/browse/YUNIKORN-1472)). The JSON error response is written before without ever calling writeHeaders(w).  
   
   We should make sure writeHeaders(w) at the first of the function.
   
   
   ### What type of PR is it?
   * [ ] - Bug Fix
   * [ ] - Improvement
   * [ ] - Feature
   * [ ] - Documentation
   * [ ] - Hot Fix
   * [ ] - Refactoring
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   * Open an issue on Jira https://issues.apache.org/jira/browse/YUNIKORN-1734
   * Put link here, and add [YUNIKORN-*Jira number*] in PR title, eg. `[YUNIKORN-2] Gang scheduling interface parameters`
   
   ### How should this be tested?
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * [ ] - The licenses files need update.
   * [ ] - There is breaking changes for older versions.
   * [ ] - It needs documentation.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [yunikorn-core] wilfred-s closed pull request #545: [YUNIKORN-1734] Missing headers in REST response

Posted by "wilfred-s (via GitHub)" <gi...@apache.org>.
wilfred-s closed pull request #545: [YUNIKORN-1734] Missing headers in REST response
URL: https://github.com/apache/yunikorn-core/pull/545


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [yunikorn-core] codecov[bot] commented on pull request #545: [YUNIKORN-1734] Missing headers in REST response

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #545:
URL: https://github.com/apache/yunikorn-core/pull/545#issuecomment-1545172507

   ## [Codecov](https://app.codecov.io/gh/apache/yunikorn-core/pull/545?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#545](https://app.codecov.io/gh/apache/yunikorn-core/pull/545?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e72fb63) into [master](https://app.codecov.io/gh/apache/yunikorn-core/commit/bca7e88ee78b280e7e2d5da8abf942add86a71dc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bca7e88) will **increase** coverage by `0.06%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #545      +/-   ##
   ==========================================
   + Coverage   74.98%   75.04%   +0.06%     
   ==========================================
     Files          70       70              
     Lines       11365    11369       +4     
   ==========================================
   + Hits         8522     8532      +10     
   + Misses       2543     2539       -4     
   + Partials      300      298       -2     
   ```
   
   
   | [Impacted Files](https://app.codecov.io/gh/apache/yunikorn-core/pull/545?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/webservice/handlers.go](https://app.codecov.io/gh/apache/yunikorn-core/pull/545?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3dlYnNlcnZpY2UvaGFuZGxlcnMuZ28=) | `80.23% <100.00%> (+0.11%)` | :arrow_up: |
   
   ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/apache/yunikorn-core/pull/545/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org