-
Notifications
You must be signed in to change notification settings - Fork 14k
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
KAFKA-17767 Extract test catalog from JUnit output [1/n] #17397
Changes from 8 commits
d44f547
c87d942
40c21ad
0b79087
a1a8980
d67731e
ce798ce
bc1aa94
c18f854
4a6a9b1
889f7a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 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. | ||
PyYAML~=6.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,7 +212,22 @@ def determineCommitId() { | |
} | ||
} | ||
|
||
|
||
/** | ||
* For a given Project, compute a nice dash separated directory name | ||
* to store the JUnit XML files in. E.g., Project ":connect:api" -> "connect-api" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't have consistent sub-module naming. The connect-related modules don't have a prefix, while other sub-modules must include a prefix to avoid conflicts to connect's sub modules. This means the helper should only revise the module names for the connect modules. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I considered this, but didn't want to add special cases to the "module name finding" method. The module name computed here (e.g., Another option here would be to reflect the actual module paths in the output directory paths. So, |
||
*/ | ||
static def projectToJUnitXmlPath(project) { | ||
var p = project | ||
var projectNames = [] | ||
while (p != null) { | ||
projectNames.push(p.name) | ||
p = p.parent | ||
if (p.name == "kafka") { | ||
break; | ||
} | ||
} | ||
return projectNames.join("-") | ||
} | ||
|
||
|
||
apply from: file('wrapper.gradle') | ||
|
@@ -526,7 +541,8 @@ subprojects { | |
// were not run, but instead were restored via FROM-CACHE. See KAFKA-17479 for more details. | ||
doLast { | ||
if (ext.isGithubActions) { | ||
def dest = rootProject.layout.buildDirectory.dir("junit-xml/${project.name}").get().asFile | ||
def moduleDirPath = projectToJUnitXmlPath(project) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we apply this change to quarantinedTest as well? |
||
def dest = rootProject.layout.buildDirectory.dir("junit-xml/${moduleDirPath}").get().asFile | ||
println "Copy JUnit XML for ${project.name} to $dest" | ||
ant.copy(todir: "$dest/test") { | ||
ant.fileset(dir: "${test.reports.junitXml.entryPoint}") | ||
|
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.
Should we export the artifact url for this task?
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.
I'm not sure we'll keep this step in long term since it is ~50Mb compressed (~1GB decompressed!).