-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Add log.go back to core of e2e test framework #81426
Conversation
/assign @timothysc @andrewsykim @johnSchnake |
/test pull-kubernetes-integration |
/hold |
@johnSchnake Thank you for your comments.
That could be a nice idea, it would be easy to be created/reviewed if these PRs are just for reverting.
I cannot follw above your point. The PR makes e2elog into the core framework itself, not into sub package |
4a47bb5
to
e23c4e5
Compare
So we have 3 options: put this outside of the framework entirely, put it in the framework, or under the framework as a "subpackage". This PR puts it back into core, which prevents some cyclical deps but also means that if you just want to import the logging, you have to import all of Putting it under the framework as a subpackage is exactly what you're wanting to move away from. The last option, which I'm at least curious about, is moving it out of the framework entirely. It would be as if some 3rd party wrapped ginkgo and provided pass/fail/log messages and we just vendored that. It seems like that solves the concerns you have but also keeps it separate from the framework. The framework would import it so the "size" of importing the framework wouldn't get smaller even though the code got removed, but it would enable you to vendor the logging without the framework if you wanted. I was just curious if we might prefer that? |
That is a nice point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
test/e2e/framework/log/logger.go
Outdated
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and | |||
limitations under the License. | |||
*/ | |||
|
|||
// TODO(oomichi): Package log should be removed after switching to use core framework log. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I misunderstood the following error message
test/e2e/framework/log/logger.go:17:1: package comment should be of the form "Package log ..."
I should remove TODO(oomichi):
also..
We tried to separate logger functionality as subpackage of e2e test framework, but we've recognized that should be core functionality and we should keep it as core of e2e test framework after facing circular dependency issues. So this adds log.go back to core of e2e test framework. In addition, this makes volume sub package use the core logger as a sample.
e23c4e5
to
5e1743c
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fejta, oomichi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I don't have any reason to hold now; it seemed like there might still be some conversations ongoing about this though (I saw a few random messages in slack)? I'm OK if others want to remove the hold and merge though. |
It seems fine to merge this at this time. /hold cancel |
This continues the work in kubernetes#81426 by also moving the logger_test.go, moving the log helper code from util.go to log.go (a more logical place, as it is only used there) and updating comments.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
We tried to separate logger functionality as subpackage of e2e test
framework, but we've recognized that should be core functionality
and we should keep it as core of e2e test framework after facing
circular dependency issues.
So this adds log.go back to core of e2e test framework. In addition,
this makes volume sub package use the core logger as a sample.
Ref: #81245
Does this PR introduce a user-facing change?:
/sig testing