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/02/15 09:12:14 UTC
[GitHub] [yunikorn-k8shim] zhuqi-lucas opened a new pull request, #534: [YUNIKORN-1578][shim] Use zap.Stringer instead of calling String on object
zhuqi-lucas opened a new pull request, #534:
URL: https://github.com/apache/yunikorn-k8shim/pull/534
### What is this PR for?
Throughout the code we have lots of places where we use the following call structure:
zap.String("text here", object.String())
This causes the object.String() call to happen before we even consider if it needs to be logged. Zap has a lazy way of doing this that removes the call to create the string until it is needed, after the level checks etc. The above call becomes:
zap.Stringer("text here", object)
Affect core and k8shim
### 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/
* 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-k8shim] manirajv06 closed pull request #534: [YUNIKORN-1578][shim] Use zap.Stringer instead of calling String on object
Posted by "manirajv06 (via GitHub)" <gi...@apache.org>.
manirajv06 closed pull request #534: [YUNIKORN-1578][shim] Use zap.Stringer instead of calling String on object
URL: https://github.com/apache/yunikorn-k8shim/pull/534
--
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-k8shim] codecov[bot] commented on pull request #534: [YUNIKORN-1578][shim] Use zap.Stringer instead of calling String on object
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #534:
URL: https://github.com/apache/yunikorn-k8shim/pull/534#issuecomment-1431007621
# [Codecov](https://codecov.io/gh/apache/yunikorn-k8shim/pull/534?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 [#534](https://codecov.io/gh/apache/yunikorn-k8shim/pull/534?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (235f2fb) into [master](https://codecov.io/gh/apache/yunikorn-k8shim/commit/22a00a1940224192c1386d80933a477c5691939d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (22a00a1) will **not change** coverage.
> The diff coverage is `76.92%`.
```diff
@@ Coverage Diff @@
## master #534 +/- ##
=======================================
Coverage 69.55% 69.55%
=======================================
Files 45 45
Lines 7715 7715
=======================================
Hits 5366 5366
Misses 2153 2153
Partials 196 196
```
| [Impacted Files](https://codecov.io/gh/apache/yunikorn-k8shim/pull/534?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/yunikorn-k8shim/pull/534?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=) | `42.42% <40.00%> (ø)` | |
| [pkg/cache/application.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/534?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL2FwcGxpY2F0aW9uLmdv) | `75.36% <100.00%> (ø)` | |
| [pkg/cache/node.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/534?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.77% <100.00%> (ø)` | |
| [pkg/cache/placeholder\_manager.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/534?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL3BsYWNlaG9sZGVyX21hbmFnZXIuZ28=) | `92.03% <100.00%> (ø)` | |
| [pkg/cache/task.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/534?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NhY2hlL3Rhc2suZ28=) | `68.81% <100.00%> (ø)` | |
: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