Fix sdk/spring/README.md not found error in non-spring ci pipelines#29013
Conversation
…g/README.md not exists
|
/azp run java - resourcemanager - ci |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
|
API change check API changes are not detected in this pull request. |
|
/azp run java - resourcemanager - ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The resource manager build passed. |
|
Thanks! |
sdk/spring/spring-cloud-azure-starter-active-directory-b2c/pom.xml
Outdated
Show resolved
Hide resolved
| ${project.basedir}/javadocTemp/README.md | ||
| </echo> | ||
| <copy file="${project.basedir}/../README.md" tofile="${project.basedir}/javadocTemp/README.md"/> | ||
| <copy file="${project.basedir}/../README.md" tofile="${project.basedir}/javadocTemp/README.md" failonerror="false"/> |
There was a problem hiding this comment.
Maybe we should update the sparse checkout instead of setting failonerror="false" here.
Setting failonerror="false" may cause the released javadoc / sourcejar does not contains README.md.
We should avoid uncertain behavior.
There was a problem hiding this comment.
I think it's okay, the sdk/spring/REAME.md will always be there, and what we want to achieve here is to avoid exceptions when sparse checkout does not include the sdk/spring/README.md file.
There was a problem hiding this comment.
What we also want to avoid is adding a README.md in each starter's folder.
There was a problem hiding this comment.
And even if we ship some Javadoc and source jar files without the README, I think it'll still be ok. The starters don't have any source code or Javadoc.
There was a problem hiding this comment.
The key point is We should avoid uncertain behavior.
Consider this conversation:
Customer: Does the source jar contains README?
We: We are not sure.
That's not professional.
chenrujun
left a comment
There was a problem hiding this comment.
I'll approve this PR to quick fix pipeline failure.
But whether we should contain s README.md in source-jar and java-doc-jar need more discussion
|
@chenrujun, you can help create another PR to remove the README file from the Javadoc and sources jar files. |
|
But I think this will provide more context on what's a usable Javadoc jar file, like this https://azuresdkdocs.blob.core.windows.net/$web/java/azure-storage-blob/12.16.1/index.html.
I have no preference for whether our starter Javadoc jar must have a README.md file or not, but if removing the README logic could simplify our pom files, it would be great and worth a try. |
Description
We added the empty Javadoc and sources jar files in #28988, but it will use the README file in
sdk/springfolder, which will be an issue whenbuild from sourcepipelines run in the non-spring service directory, for the sparse checkout won't check out thesdk/springfolder, like this failure. This PR will fix this issue by disabling throwing exceptions when the file can't be found. This PR will also fix the bug of not cleaning thesourceTempfolder for each run.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines