[DATAFU-185]fix(build): resolve rat license-check paths against project root#53
Conversation
|
Interesting, I don't see this occurring on my computer, but I do see this line in our Actions CI report: Is this what you were trying to solve? |
The |
|
Yes, if you change the commit message, that will retrigger the CI and we will be able to see whether the ant warnings disappear. I've opened a JIRA issue for it, you can change the commit message to use DATAFU-185 as a prefix. |
|
@eyala so I did some further investigation into this with attempts of building with/without this change, and actually I think these are two separate things, let me reiterate this issue:
This stemmed from the attempt to build in my local environment - in this local environment, the lack of absolute paths lead to the daemon searching in the working directory instead of project root. The stylesheet issue is also what failed my build, not the unlicensed log file.
|
|
Yes, I'm realizing now that I approved the addition of the .asf.yaml file a little while ago when our CI was down, and I didn't notice the rat warnings in the logs. I think adding the license to this file as well as the original change is a good idea. |
The :rat task used relative paths, which resolved against the Gradle daemon's working directory rather than the project root — so it scanned the wrong directory and failed to find the report stylesheet, breaking `./gradlew clean assemble`. Anchor the scan directory, report, and stylesheet paths to the project (project.projectDir / project.buildDir). Additionally, add the missing Apache license header to .asf.yaml, which rat flagged as an unknown license. JIRA: https://issues.apache.org/jira/browse/DATAFU-185
873a541 to
6b98163
Compare
|
@eyala added the license header to Verified with a controlled check on this branch, toggling only the header - with it, there are no warning and rat reports
Without it, we get:
and the Unknown license line returns. I Also got a green CI run in my fork (which was enabled by the recently added workflow_dispatch 🙃). |
The
:rattask used relative paths, which the Gradle daemon's embedded Ant builder resolves against the daemon working directory (~/.gradle/daemon/5.6.4/) instead of the project root - so it scanned the wrong directory and could not find the report stylesheet, failing./gradlew clean assemble.Switched to absolute paths (
project.projectDir/project.buildDir). Verifiedassemblenow passes with:ratsucceeding.Also added the missing Apache license header to
.asf.yaml, which:ratflagged as an unknown license.JIRA: https://issues.apache.org/jira/browse/DATAFU-185