Hello all,
Today is automation fixing day and in this context I’d like to work on the automation of the list of contributors in the release note.
This step is closely followed by other manual tasks such as adding the list of translated languages, or setting the release date. They are not in the direct scope of this proposal, but I’d like to aim for a general approach that would help to automate other aspects more easily.
Currently, as you can see in the release plan guide, this step is done by running the ~/xwiki-dev-tools/xwiki-release-scripts/list_contributors.sh script on the ~/releases/xwiki-trunks directory. This involves resolving two tags, the previous release tag (i.e., the value of the xwiki.compatibility.previous.version property in xwiki-commons pom) and the current release value.
Then, manually clean up the list (e.g., for bots or user displayed with several names), and finally edit the release page.
The goal of this proposal is to automate the resolution of the tags, the resolution of the list of contributors, and it’s insertion in the release notes. But, not the manual clean up that would still be required before checking the Ensure that the Release Notes are complete and nice-looking for version 18.5.0 step.
Option A - Extend the existing release script and push content to xwiki.org
Improve xwiki-dev-tools to automate:
- The previous tag resolution (by reading
xwiki.compatibility.previous.versionin the root pom of xwiki-commons). To be confirmed that this is always the right value, of it we need a prompt in the release script to ask for an override if needed. - Optionally, have a mechanism to have list of known bots, and automatically clean them up (e.g., renovate).
- Performing a REST request to add a newly defined XObject (e.g.,
ReleaseNotes.ContributorsList, with a singlecontributortext field) to the release note.
Update the release notes template to display the list of contributors only if a ReleaseNotes.ContributorsList XObject is found, and a warning otherwise.
Optionally, improve the template to allow editing the list of contributors in-place when manually fixing duplicates and bots.
Pros:
- Can be integrated in the existing release scripts, either as a much more automated manual step or fully integrated in the build script
Cons:
- Requires to give write access to the wiki on behalf of the release manager by asking for a token. This requires some configuration change in the authentication section of xwiki.org administration.
Option B - Improve the release note template and pull content from the tag
The idea is to inspire from what’s done for backwardCompatibilityReport134.
When the macro is executed, it checks for the presence of a given XObject on the page (ReleaseNotes.BackwardCompatibility). If absent, computes and add the XObject. Then, renders based on the content of the XObject.
For the backward compatibility report, the results can be resolved by a single GET query on the release tag on each repository, for a total of 3 query.
In the case of the contributors we need to fetch the full list of commits since the previous release. Even if paginated this can sum up to a significant amount of GET requests. This can be an acceptable slowness as this needs to be computed only once. This can also be mitigated by providing a token, since iirc authenticated users can query larger page size and less throttled.
The main con of this approach is that we’d need to re-implement the logic of the bash script we currently use in a language that can be executed on the wiki (e.g., Groovy or Java).
Option C - a github action pushed content to xwiki.org
Mentioning it for exhaustiveness. A GitHub action is trigger when a new release if added on xwiki-platform.
This is close to Option A, and the existing bash script can probably be reused.
The main con is GitHub vendor lock in, and I fail to see real benefits in comparison to Option A.
Conclusion
I’m +1 for option A as I believe is the more promising to move toward Continuous Delivery (CD).
By carefully splitting the work in small tasks, a lot of the work done to automate the listing of contributions can be reused for the list of translated languages.
WDYT? Thanks