Sure thing! Just submitted a PR here: https://github.com/apache/beam/pull/11918
On Wed, Jun 3, 2020 at 2:00 PM Kyle Weaver <kcwea...@google.com> wrote: > Thanks Julien! Do you mind making a PR for this? > > Also, I filed https://issues.apache.org/jira/browse/BEAM-10188 so we have > a JIRA to track further improvements. > > On Wed, Jun 3, 2020 at 4:39 PM Julien Phalip <jpha...@gmail.com> wrote: > >> I see that Kyle added >> <https://github.com/apache/beam/commit/d8b9d273d614b92557353c76e0a9268960c8b6cc#diff-2192a92042a6ca5c7c7769a10b3dd052> >> some >> steps in the release guide, and the release notes now appear >> <https://github.com/apache/beam/releases/tag/v2.21.0> in Github for the >> recent 2.21.0 release. Thanks for doing that! >> >> If that helps, here are some steps to automate that process using the >> Github API (Some of the environment variables should already be set from >> previous steps in the release guide): >> >> GITHUB_TOKEN=[REDACTED] >> RELEASE=[SET TO RELEASE NUMBER] >> VERSION_TAG="v${RELEASE}" >> RELEASE_NOTES=[PASTE RELEASE NOTES] >> >> RELEASE_JSON="$(cat <<-EOF >> { >> "tag_name": "${VERSION_TAG}", >> "name": "Beam ${RELEASE} release", >> "body": "${RELEASE_NOTES}" >> } >> EOF >> )" >> >> curl https://api.github.com/repos/jphalip/beam/releases \ >> -X POST \ >> -H "Authorization: token ${GITHUB_TOKEN}" \ >> -H "Content-Type:application/json" \ >> -d ${RELEASE_JSON} >> >> >> On Tue, May 19, 2020 at 4:58 PM Brian Hulette <bhule...@google.com> >> wrote: >> >>> I'd be happy to help with code review (tag @TheNeuralBit on github), >>> and/or kick the tires if you have something ready in time for 2.22. >>> >>> Brian >>> >>> On Tue, May 19, 2020 at 4:38 PM Julien Phalip <jpha...@gmail.com> wrote: >>> >>>> That sounds good, I'll see what I can do and maybe write up a script to >>>> automate the release notes publication. >>>> >>>> On Tue, May 19, 2020 at 4:35 PM Kyle Weaver <kcwea...@google.com> >>>> wrote: >>>> >>>>> Sorry, I should have worded that better. What I meant was that Brian >>>>> and I should focus on fixing the existing release process, but we'd >>>>> welcome >>>>> you to add the release notes as a new feature. >>>>> >>>>> On Tue, May 19, 2020 at 7:33 PM Julien Phalip <jpha...@gmail.com> >>>>> wrote: >>>>> >>>>>> Sure, I can try to help :) Can you share some pointers on the things >>>>>> that need fixing? >>>>>> >>>>>> On Tue, May 19, 2020 at 4:17 PM Kyle Weaver <kcwea...@google.com> >>>>>> wrote: >>>>>> >>>>>>> For context, currently, we just create and push the tag using plain >>>>>>> git: >>>>>>> https://github.com/apache/beam/blob/master/website/www/site/content/en/contribute/release-guide.md#git-tag >>>>>>> >>>>>>> > I don't think it would be that complicated to integrate into shell >>>>>>> script based release tooling (maybe I'll have a different opinion in a >>>>>>> few >>>>>>> weeks after 2.22 is out?). >>>>>>> >>>>>>> I have no doubt it's technically possible, but there are a lot of >>>>>>> existing bugs with the release process and we need to prioritize fixing >>>>>>> those over adding new features. >>>>>>> >>>>>>> Julien, do you think this something you'd be willing to help out >>>>>>> with? >>>>>>> >>>>>>> On Tue, May 19, 2020 at 7:05 PM Julien Phalip <jpha...@gmail.com> >>>>>>> wrote: >>>>>>> >>>>>>>> Yes, Markdown is possible when using the Releases API. There I was >>>>>>>> referring to the default behavior, where Github displays the tag >>>>>>>> summary as >>>>>>>> raw text if a formal Github release entry wasn't created for the tag. >>>>>>>> >>>>>>>> To create a formal Github release entry ( >>>>>>>> https://developer.github.com/v3/repos/releases/#create-a-release), >>>>>>>> it should be possible to send a POST request to >>>>>>>> https://api.github.com/repos/apache/beam/releases >>>>>>>> >>>>>>>> On Tue, May 19, 2020 at 3:56 PM Brian Hulette <bhule...@google.com> >>>>>>>> wrote: >>>>>>>> >>>>>>>>> > It seems that Github treats the summary as raw text, so you >>>>>>>>> can't really feed it any complex formatting like Markdown. >>>>>>>>> >>>>>>>>> The Helm project you linked seems to be using markdown formatting. >>>>>>>>> >>>>>>>>> On Tue, May 19, 2020 at 3:52 PM Julien Phalip <jpha...@gmail.com> >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>>> I actually tried that - you can see a quick test here: >>>>>>>>>> https://github.com/jphalip/beam/releases/tag/v9.9.9 >>>>>>>>>> >>>>>>>>>> It seems that Github treats the summary as raw text, so you can't >>>>>>>>>> really feed it any complex formatting like Markdown. That said, that >>>>>>>>>> might >>>>>>>>>> be good enough if the summary just includes some simple content, >>>>>>>>>> which is >>>>>>>>>> in fact typically the case for email announcements (see example >>>>>>>>>> here >>>>>>>>>> <https://lists.apache.org/thread.html/r1ad72fe524a3fbd67a0cc9f0e171e27eba821daa835063267cffdd95%40%3Cuser.beam.apache.org%3E> >>>>>>>>>> for the recent 2.20.0 version). In other words, if the tag summary >>>>>>>>>> simply >>>>>>>>>> included a quick note announcing the new version and a link to the >>>>>>>>>> release >>>>>>>>>> notes (e.g. >>>>>>>>>> https://beam.apache.org/blog/2020/04/15/beam-2.20.0.html), then >>>>>>>>>> that'd work pretty well, I think. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Tue, May 19, 2020 at 3:39 PM Kyle Weaver <kcwea...@google.com> >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Including the release notes in the tag seems like a good idea. >>>>>>>>>>> However, I don't think there is an obvious way to automate the >>>>>>>>>>> process, since Beam's primary release tool is shell scripts :) and >>>>>>>>>>> Github >>>>>>>>>>> tag summaries are a Github feature, not a standard git feature. >>>>>>>>>>> Would it be >>>>>>>>>>> sufficient to manually copy the release notes into the tag summary? >>>>>>>>>>> >>>>>>>>>>> On Tue, May 19, 2020 at 6:18 PM Julien Phalip <jpha...@gmail.com> >>>>>>>>>>> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi, >>>>>>>>>>>> >>>>>>>>>>>> I'm working with customers who would like to be automatically >>>>>>>>>>>> notified when new Beam releases come out. They'd also like to see >>>>>>>>>>>> the >>>>>>>>>>>> release notes so they know what changes were made. >>>>>>>>>>>> >>>>>>>>>>>> I know that these announcements are already sent to the user@ >>>>>>>>>>>> and dev@ mailing lists. However, they're not easy to catch >>>>>>>>>>>> automatically as they're intermingled with lots of other messages >>>>>>>>>>>> in those >>>>>>>>>>>> lists. >>>>>>>>>>>> >>>>>>>>>>>> One possible solution would be to leverage the Beam project's >>>>>>>>>>>> releases Atom feed >>>>>>>>>>>> <https://github.com/apache/beam/releases.atom> on Github (see >>>>>>>>>>>> also the web version <https://github.com/apache/beam/releases>). >>>>>>>>>>>> This allows, for example, to automatically publish a >>>>>>>>>>>> notification in Slack >>>>>>>>>>>> <https://slack.com/help/articles/218688467-Add-RSS-feeds-to-Slack> >>>>>>>>>>>> when a new release comes out. However, the Atom feed only contains >>>>>>>>>>>> the tag >>>>>>>>>>>> names without any description because the release notes aren't >>>>>>>>>>>> recorded in >>>>>>>>>>>> Github. >>>>>>>>>>>> >>>>>>>>>>>> Do you think that the Beam release process could be extended to >>>>>>>>>>>> call the Github Releases API >>>>>>>>>>>> <https://developer.github.com/v3/repos/releases/> to >>>>>>>>>>>> automatically publish the release notes in Github? >>>>>>>>>>>> >>>>>>>>>>>> As an example, see the Helm project's releases page >>>>>>>>>>>> <https://github.com/helm/helm/releases>, where release notes >>>>>>>>>>>> are created using a template >>>>>>>>>>>> <https://github.com/helm/helm/blob/master/scripts/release-notes.sh> >>>>>>>>>>>> and published with a tool called goreleaser >>>>>>>>>>>> <https://goreleaser.com/>. >>>>>>>>>>>> >>>>>>>>>>>> Thank you, >>>>>>>>>>>> >>>>>>>>>>>> Julien >>>>>>>>>>>> >>>>>>>>>>>