You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/02/13 19:11:19 UTC

[GitHub] [incubator-yunikorn-k8shim] lowc1012 opened a new pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

lowc1012 opened a new pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368


   ### What is this PR for?
   Add the e2e test for the admission controller to increase test coverage.
   
   ### What type of PR is it?
   * [ ] - Bug Fix
   * [ x] - 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/
   * 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] [incubator-yunikorn-k8shim] lowc1012 commented on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
lowc1012 commented on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046473728


   @wilfred-s Thanks for your explanation.
   About the second comment, Do we have the health check API endpoint for admission controller? If not, should I implement it in the PR or create another JIRA for that? Thank you!


-- 
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] [incubator-yunikorn-k8shim] wilfred-s commented on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
wilfred-s commented on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046393441


   One other thing: should we check that the admission controller is up and running by calling the health check before we run these tests or is that called earlier in the e2e tests?


-- 
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] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046474300


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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 [#368](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9c5e209) into [master](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/5e9b99733d36bbbd0c79a8baff34a0c0a8c87f10?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5e9b997) will **increase** coverage by `0.61%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 9c5e209 differs from pull request most recent head 05c50c5. Consider uploading reports for the commit 05c50c5 to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #368      +/-   ##
   ==========================================
   + Coverage   64.87%   65.49%   +0.61%     
   ==========================================
     Files          41       41              
     Lines        6255     6219      -36     
   ==========================================
   + Hits         4058     4073      +15     
   + Misses       2042     1993      -49     
   + Partials      155      153       -2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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/cache/context.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2NvbnRleHQuZ28=) | `41.56% <0.00%> (-1.34%)` | :arrow_down: |
   | [pkg/cache/context\_recovery.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2NvbnRleHRfcmVjb3ZlcnkuZ28=) | `40.67% <0.00%> (-1.07%)` | :arrow_down: |
   | [pkg/cache/node\_coordinator.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL25vZGVfY29vcmRpbmF0b3IuZ28=) | `66.21% <0.00%> (+0.93%)` | :arrow_up: |
   | [pkg/cache/external/scheduler\_cache.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2V4dGVybmFsL3NjaGVkdWxlcl9jYWNoZS5nbw==) | `58.55% <0.00%> (+15.28%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5e9b997...05c50c5](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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



[GitHub] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046474300


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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 [#368](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9c5e209) into [master](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/1493a59fcc072000ea39dd74b855acc90c06991c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1493a59) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #368   +/-   ##
   =======================================
     Coverage   65.49%   65.49%           
   =======================================
     Files          41       41           
     Lines        6219     6219           
   =======================================
     Hits         4073     4073           
     Misses       1993     1993           
     Partials      153      153           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1493a59...9c5e209](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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



[GitHub] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046474300


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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 [#368](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (05c50c5) into [master](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/5e9b99733d36bbbd0c79a8baff34a0c0a8c87f10?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5e9b997) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #368   +/-   ##
   =======================================
     Coverage   64.87%   64.87%           
   =======================================
     Files          41       41           
     Lines        6255     6255           
   =======================================
     Hits         4058     4058           
     Misses       2042     2042           
     Partials      155      155           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5e9b997...05c50c5](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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



[GitHub] [incubator-yunikorn-k8shim] craigcondit commented on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
craigcondit commented on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1054624523


   @lowc1012 can you re-base this on current master? I think all the admission controller fixes are in now, so hopefully the tests pass.


-- 
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] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046474300


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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 [#368](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9c5e209) into [master](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/1493a59fcc072000ea39dd74b855acc90c06991c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1493a59) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #368   +/-   ##
   =======================================
     Coverage   65.49%   65.49%           
   =======================================
     Files          41       41           
     Lines        6219     6219           
   =======================================
     Hits         4073     4073           
     Misses       1993     1993           
     Partials      153      153           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1493a59...9c5e209](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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



[GitHub] [incubator-yunikorn-k8shim] craigcondit closed pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
craigcondit closed pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368


   


-- 
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] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046474300


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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 [#368](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9c5e209) into [master](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/1493a59fcc072000ea39dd74b855acc90c06991c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1493a59) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #368   +/-   ##
   =======================================
     Coverage   65.49%   65.49%           
   =======================================
     Files          41       41           
     Lines        6219     6219           
   =======================================
     Hits         4073     4073           
     Misses       1993     1993           
     Partials      153      153           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1493a59...9c5e209](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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



[GitHub] [incubator-yunikorn-k8shim] lowc1012 commented on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
lowc1012 commented on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046504358


   I have no idea why the test for namespaceBlacklist failed.
   In the test, I created a pod in kube-system namespace, it should not be mutated by admission controller. 
   [YUNIKORN-1084](https://issues.apache.org/jira/projects/YUNIKORN/issues/YUNIKORN-1084) may address this problem.


-- 
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] [incubator-yunikorn-k8shim] craigcondit commented on a change in pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
craigcondit commented on a change in pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#discussion_r817639292



##########
File path: test/e2e/admission_controller/admission_controller_test.go
##########
@@ -0,0 +1,86 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package admission_controller_test
+
+import (
+	"fmt"
+
+	"github.com/onsi/ginkgo"
+	"github.com/onsi/gomega"
+	v1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	"github.com/apache/incubator-yunikorn-k8shim/pkg/common/constants"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/configmanager"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/helpers/common"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/helpers/k8s"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/helpers/yunikorn"
+)
+
+var _ = ginkgo.Describe("AdmissionController", func() {
+
+	ginkgo.BeforeEach(func() {
+		kubeClient = k8s.KubeCtl{}
+		gomega.Expect(kubeClient.SetClient()).To(gomega.BeNil())
+	})
+
+	ginkgo.It("Verifying a pod is created in the test namespace", func() {
+
+		ginkgo.By("has 1 running pod whose SchedulerName is yunikorn")
+		sleepPodConfigs := common.SleepPodConfig{Name: sleepPodName, NS: ns}
+		sleepRespPod, err := kubeClient.CreatePod(common.InitSleepPod(sleepPodConfigs), ns)
+		gomega.Ω(err).ShouldNot(gomega.HaveOccurred())
+
+		// Wait for pod to move into running state
+		err = kubeClient.WaitForPodBySelectorRunning(ns,
+			fmt.Sprintf("app=%s", sleepRespPod.ObjectMeta.Labels["app"]), 10)
+		gomega.Ω(err).ShouldNot(gomega.HaveOccurred())
+		gomega.Ω(sleepRespPod.Spec.SchedulerName).Should(gomega.BeEquivalentTo(constants.SchedulerName))
+	})
+
+	ginkgo.It("Verifying a pod is created on namespace blacklist", func() {
+		ginkgo.By("Create a pod in namespace blacklist")
+		podConfigs := common.SleepPodConfig{Name: sleepPodName, NS: blackNs}
+		pod, err := kubeClient.CreatePod(common.InitSleepPod(podConfigs), blackNs)

Review comment:
       Using `InitSleepPod()` here will explicitly set `schedulerName`: `yunikorn`. This prevents the test from passing.




-- 
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] [incubator-yunikorn-k8shim] craigcondit commented on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
craigcondit commented on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1056867968


   @lowc1012 I think the test failures come from your use of `InitSleepPod()`. That calls `InitTestPod()`, which explicitly sets `schedulerName` to `yunikorn`. You will need to unset that property before initializing the pod. You can also run the e2e tests locally using kind via the script in `scripts/run-e2e-tests.sh`.


-- 
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] [incubator-yunikorn-k8shim] codecov[bot] commented on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046474300


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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 [#368](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7a35ccf) into [master](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/87050bb340d1f6228c736a1c1d8a41978e30d6dd?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (87050bb) will **increase** coverage by `2.01%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #368      +/-   ##
   ==========================================
   + Coverage   62.41%   64.43%   +2.01%     
   ==========================================
     Files          41       41              
     Lines        6152     6144       -8     
   ==========================================
   + Hits         3840     3959     +119     
   + Misses       2160     2032     -128     
   - Partials      152      153       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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/cache/node\_coordinator.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL25vZGVfY29vcmRpbmF0b3IuZ28=) | `66.21% <0.00%> (+2.92%)` | :arrow_up: |
   | [pkg/cache/context.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2NvbnRleHQuZ28=) | `41.56% <0.00%> (+6.86%)` | :arrow_up: |
   | [pkg/cache/external/scheduler\_cache.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2V4dGVybmFsL3NjaGVkdWxlcl9jYWNoZS5nbw==) | `58.55% <0.00%> (+27.63%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [87050bb...7a35ccf](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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



[GitHub] [incubator-yunikorn-k8shim] craigcondit commented on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
craigcondit commented on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1050058525


   > @craigcondit can you please check if the e2e test failed as expected and that this will work in combination with your changes. If we need changes for YUNIKORN-1084 I think we need to commit this first and add changes to that PR.
   
   Yes, this test will fail currently because the changes from YUNIKORN-1084 have not yet been merged (the existing behavior is not correct, but this test assumes it is). I don't think we need changes to this, but YUNIKORN-1084 needs to go in first to get the admission controller to exhibit the correct behavior.


-- 
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] [incubator-yunikorn-k8shim] wilfred-s commented on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
wilfred-s commented on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1049544516


   @craigcondit can you please check if the e2e test failed as expected and that this will work in combination with your changes. If we need changes for YUNIKORN-1084 I think we need to commit this first and add changes to that PR.


-- 
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] [incubator-yunikorn-k8shim] wilfred-s commented on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
wilfred-s commented on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046385616


   @lowc1012 can you have a look at the two lint issues?
   The kClient is a strange one to get. Not something you would expect. It is linked to not using the Hungarian notation. The go lint code specifically picks up on the `k` which stands for kind in that case. Rename the variable to kubeClient or just to client can be used.


-- 
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] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046474300


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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 [#368](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7a35ccf) into [master](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/87050bb340d1f6228c736a1c1d8a41978e30d6dd?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (87050bb) will **increase** coverage by `2.01%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #368      +/-   ##
   ==========================================
   + Coverage   62.41%   64.43%   +2.01%     
   ==========================================
     Files          41       41              
     Lines        6152     6144       -8     
   ==========================================
   + Hits         3840     3959     +119     
   + Misses       2160     2032     -128     
   - Partials      152      153       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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/cache/node\_coordinator.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL25vZGVfY29vcmRpbmF0b3IuZ28=) | `66.21% <0.00%> (+2.92%)` | :arrow_up: |
   | [pkg/cache/context.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2NvbnRleHQuZ28=) | `41.56% <0.00%> (+6.86%)` | :arrow_up: |
   | [pkg/cache/external/scheduler\_cache.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2V4dGVybmFsL3NjaGVkdWxlcl9jYWNoZS5nbw==) | `58.55% <0.00%> (+27.63%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [87050bb...7a35ccf](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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



[GitHub] [incubator-yunikorn-k8shim] craigcondit commented on a change in pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
craigcondit commented on a change in pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#discussion_r817805712



##########
File path: test/e2e/admission_controller/admission_controller_test.go
##########
@@ -0,0 +1,86 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package admission_controller_test
+
+import (
+	"fmt"
+
+	"github.com/onsi/ginkgo"
+	"github.com/onsi/gomega"
+	v1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	"github.com/apache/incubator-yunikorn-k8shim/pkg/common/constants"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/configmanager"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/helpers/common"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/helpers/k8s"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/helpers/yunikorn"
+)
+
+var _ = ginkgo.Describe("AdmissionController", func() {
+
+	ginkgo.BeforeEach(func() {
+		kubeClient = k8s.KubeCtl{}
+		gomega.Expect(kubeClient.SetClient()).To(gomega.BeNil())
+	})
+
+	ginkgo.It("Verifying a pod is created in the test namespace", func() {
+
+		ginkgo.By("has 1 running pod whose SchedulerName is yunikorn")
+		sleepPodConfigs := common.SleepPodConfig{Name: sleepPodName, NS: ns}
+		sleepRespPod, err := kubeClient.CreatePod(common.InitSleepPod(sleepPodConfigs), ns)
+		gomega.Ω(err).ShouldNot(gomega.HaveOccurred())
+
+		// Wait for pod to move into running state
+		err = kubeClient.WaitForPodBySelectorRunning(ns,
+			fmt.Sprintf("app=%s", sleepRespPod.ObjectMeta.Labels["app"]), 10)
+		gomega.Ω(err).ShouldNot(gomega.HaveOccurred())
+		gomega.Ω(sleepRespPod.Spec.SchedulerName).Should(gomega.BeEquivalentTo(constants.SchedulerName))
+	})
+
+	ginkgo.It("Verifying a pod is created on namespace blacklist", func() {
+		ginkgo.By("Create a pod in namespace blacklist")
+		podConfigs := common.SleepPodConfig{Name: sleepPodName, NS: blackNs}
+		pod, err := kubeClient.CreatePod(common.InitSleepPod(podConfigs), blackNs)

Review comment:
       No worries! Thanks for the contribution.




-- 
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] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046474300


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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 [#368](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5de2c8e) into [master](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/5e9b99733d36bbbd0c79a8baff34a0c0a8c87f10?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5e9b997) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #368   +/-   ##
   =======================================
     Coverage   64.87%   64.87%           
   =======================================
     Files          41       41           
     Lines        6255     6255           
   =======================================
     Hits         4058     4058           
     Misses       2042     2042           
     Partials      155      155           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5e9b997...5de2c8e](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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



[GitHub] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046474300


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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 [#368](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7a35ccf) into [master](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/1493a59fcc072000ea39dd74b855acc90c06991c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1493a59) will **decrease** coverage by `1.05%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 7a35ccf differs from pull request most recent head 9c5e209. Consider uploading reports for the commit 9c5e209 to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #368      +/-   ##
   ==========================================
   - Coverage   65.49%   64.43%   -1.06%     
   ==========================================
     Files          41       41              
     Lines        6219     6144      -75     
   ==========================================
   - Hits         4073     3959     -114     
   - Misses       1993     2032      +39     
     Partials      153      153              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...missioncontrollers/webhook/admission\_controller.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3BsdWdpbi9hZG1pc3Npb25jb250cm9sbGVycy93ZWJob29rL2FkbWlzc2lvbl9jb250cm9sbGVyLmdv) | `36.90% <0.00%> (-26.07%)` | :arrow_down: |
   | [pkg/cache/node.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL25vZGUuZ28=) | `86.43% <0.00%> (-5.24%)` | :arrow_down: |
   | [pkg/shim/scheduler.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NoaW0vc2NoZWR1bGVyLmdv) | `76.85% <0.00%> (-0.75%)` | :arrow_down: |
   | [pkg/conf/schedulerconf.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbmYvc2NoZWR1bGVyY29uZi5nbw==) | `66.35% <0.00%> (ø)` | |
   | [pkg/schedulerplugin/conf/pluginconf.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlcnBsdWdpbi9jb25mL3BsdWdpbmNvbmYuZ28=) | `86.36% <0.00%> (ø)` | |
   | [pkg/plugin/admissioncontrollers/webhook/webhook.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3BsdWdpbi9hZG1pc3Npb25jb250cm9sbGVycy93ZWJob29rL3dlYmhvb2suZ28=) | `0.00% <0.00%> (ø)` | |
   | [pkg/appmgmt/general/general.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwcG1nbXQvZ2VuZXJhbC9nZW5lcmFsLmdv) | `72.58% <0.00%> (+0.55%)` | :arrow_up: |
   | [pkg/common/si\_helper.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbW1vbi9zaV9oZWxwZXIuZ28=) | `63.81% <0.00%> (+0.82%)` | :arrow_up: |
   | [pkg/cache/nodes.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL25vZGVzLmdv) | `78.28% <0.00%> (+1.12%)` | :arrow_up: |
   | [pkg/common/node.go](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbW1vbi9ub2RlLmdv) | `85.71% <0.00%> (+14.28%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1493a59...9c5e209](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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



[GitHub] [incubator-yunikorn-k8shim] wilfred-s edited a comment on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
wilfred-s edited a comment on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046393441


   One other thing: should we check that the admission controller is up and running by calling the health check before we run these tests or is that called earlier in the e2e tests? Since YUNIKORN-941 we expose a health check for the admission controller.


-- 
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] [incubator-yunikorn-k8shim] lowc1012 commented on a change in pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
lowc1012 commented on a change in pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#discussion_r817705480



##########
File path: test/e2e/admission_controller/admission_controller_test.go
##########
@@ -0,0 +1,86 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package admission_controller_test
+
+import (
+	"fmt"
+
+	"github.com/onsi/ginkgo"
+	"github.com/onsi/gomega"
+	v1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	"github.com/apache/incubator-yunikorn-k8shim/pkg/common/constants"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/configmanager"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/helpers/common"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/helpers/k8s"
+	"github.com/apache/incubator-yunikorn-k8shim/test/e2e/framework/helpers/yunikorn"
+)
+
+var _ = ginkgo.Describe("AdmissionController", func() {
+
+	ginkgo.BeforeEach(func() {
+		kubeClient = k8s.KubeCtl{}
+		gomega.Expect(kubeClient.SetClient()).To(gomega.BeNil())
+	})
+
+	ginkgo.It("Verifying a pod is created in the test namespace", func() {
+
+		ginkgo.By("has 1 running pod whose SchedulerName is yunikorn")
+		sleepPodConfigs := common.SleepPodConfig{Name: sleepPodName, NS: ns}
+		sleepRespPod, err := kubeClient.CreatePod(common.InitSleepPod(sleepPodConfigs), ns)
+		gomega.Ω(err).ShouldNot(gomega.HaveOccurred())
+
+		// Wait for pod to move into running state
+		err = kubeClient.WaitForPodBySelectorRunning(ns,
+			fmt.Sprintf("app=%s", sleepRespPod.ObjectMeta.Labels["app"]), 10)
+		gomega.Ω(err).ShouldNot(gomega.HaveOccurred())
+		gomega.Ω(sleepRespPod.Spec.SchedulerName).Should(gomega.BeEquivalentTo(constants.SchedulerName))
+	})
+
+	ginkgo.It("Verifying a pod is created on namespace blacklist", func() {
+		ginkgo.By("Create a pod in namespace blacklist")
+		podConfigs := common.SleepPodConfig{Name: sleepPodName, NS: blackNs}
+		pod, err := kubeClient.CreatePod(common.InitSleepPod(podConfigs), blackNs)

Review comment:
       I see and am sorry for my mistake.
   Thank you.




-- 
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] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #368: [YUNIKORN-979] Add e2e test coverage for the admission controller

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #368:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/368#issuecomment-1046474300


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?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 [#368](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (05c50c5) into [master](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/5e9b99733d36bbbd0c79a8baff34a0c0a8c87f10?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5e9b997) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 05c50c5 differs from pull request most recent head 5de2c8e. Consider uploading reports for the commit 5de2c8e to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #368   +/-   ##
   =======================================
     Coverage   64.87%   64.87%           
   =======================================
     Files          41       41           
     Lines        6255     6255           
   =======================================
     Hits         4058     4058           
     Misses       2042     2042           
     Partials      155      155           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5e9b997...5de2c8e](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/368?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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