Skip to content
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

Document release steps #476

Merged
merged 3 commits into from
May 8, 2020
Merged

Document release steps #476

merged 3 commits into from
May 8, 2020

Conversation

ches
Copy link
Member

@ches ches commented Feb 13, 2020

What this PR does / why we need it:

Attempts to document release procedure, and separate what concerns contributors (versioning policy and branch workflow) versus what concerns maintainers.

This doc is in GitBook but these changes need discussion: the procedure is my guess, I haven't done it so I'll need your help to correct errors and omissions.

A couple of remarks or observations with what I have here:

  • I'm not sure that the conventional Maven SNAPSHOT dance has been practiced consistently to this point. We could discuss alternatives, but so long as we intend to use it, tagged release commits ideally ought to not contain -SNAPSHOT in the POM. I've suggested a procedure that maintains this, but it's unfortunately a lot of ceremony when you have branch protection, the snapshot dance, and changelog update (2 PRs, several redundant CI builds). Some ceremony is warranted for major releases I think, but it'd be nice if it could be one PR somehow.

    One redundant build is inevitable with the snapshot convention I think, even if branch protection was skipped: CI passed on latest master, but a commit is needed to remove -SNAPSHOT before tagging.

  • A shortcoming with the changelog generator seems to be that, as far as I understand, the released version needs to be tagged (and pushed to GitHub?) before you run it. Ideally IMO changelog would precede the tagged commit, even makes a good candidate to be the tagged release commit along with version string updates.

    Having a changelog to scan is helpful before making a version number decision, to review the Semantic Versioning implications of the release. You could run the tool in dry-run stdout mode for that I guess, but if you wanted to commit it before the act of tagging, you'll be left manually editing the file with the intended version number.

Which issue(s) this PR fixes:

Relates to #442, subsequent private conversation about whether others with certain maintainer rights are able to make releases.

Does this PR introduce a user-facing change?:

NONE

@khorshuheng
Copy link
Collaborator

/test test-end-to-end-batch

For Feast maintainers, these are the concrete steps for making a new release.

1. For a major or minor release, create and check out the release branch for the new stream, e.g. `v0.6-branch`. For a patch version, check out the stream's release branch.
1. In the root `pom.xml`, remove `-SNAPSHOT` from the `<revision>` property, and commit.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any other places that version strings need to be updated?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too many unfortunately. Let me see if I can source these. As long as we have the complete list we can always try to reduce it over time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed version for Helm charts on #477

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, it's not actually looking too bad. These are the ones I found.

  • pom.xml
  • infra/charts/feast/requirements.yaml
  • infra/charts/feast/Chart.yaml
  • infra/charts/feast/values.yaml
  • infra/charts/feast/charts/feast-core/Chart.yaml
  • infra/charts/feast/charts/feast-serving/Chart.yaml

1. Bump to the next working version and append `-SNAPSHOT` in `pom.xml`.
1. Update the [CHANGELOG.md]:

$ docker run -it --rm -e CHANGELOG_GITHUB_TOKEN="[Token]" -v "$(pwd)":/usr/local/src/your-app ferrarimarco/github-changelog-generator --user gojek --project feast
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can set options to map Feast's label conventions to the generator's grouping ones, like --enhancement-labels kind/feature --bug-labels kind/bug

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be super cool.

I am just a bit worried that we havent been tagging everything diligently yet. Perhaps we should add this a bit later.

@woop
Copy link
Member

woop commented Feb 14, 2020

@ches I need to merge some changes into this same markdown doc, although its more structural. You will probably have to refactor your PR slightly, but it shouldnt be too hard.

@ches
Copy link
Member Author

ches commented Feb 14, 2020

I need to merge some changes into this same markdown doc, although its more structural. You will probably have to refactor your PR slightly, but it shouldnt be too hard.

No worries, let me know when it's in. If you're not already doing something similar, as per #420 (comment) I was going to basically pull out everything above the "Development" header to a new Getting Started or Quick Start page, then tweak Contributing with some new introduction.

Those are probably fairly uncontroversial changes / can be iterated on without discussion through GitBook, unlike the release procedure.

@woop
Copy link
Member

woop commented Feb 14, 2020

I need to merge some changes into this same markdown doc, although its more structural. You will probably have to refactor your PR slightly, but it shouldnt be too hard.

No worries, let me know when it's in. If you're not already doing something similar, as per #420 (comment) I was going to basically pull out everything above the "Development" header to a new Getting Started or Quick Start page, then tweak Contributing with some new introduction.

Those are probably fairly uncontroversial changes / can be iterated on without discussion through GitBook, unlike the release procedure.

I submitted my changes. Gitbook also has "dropdown" menu items now, so we can organize all of this information under a nice heading if you think that makes sense.

Feel free to make edits as necessary.

@woop
Copy link
Member

woop commented Feb 14, 2020

What this PR does / why we need it:

Attempts to document release procedure, and separate what concerns contributors (versioning policy and branch workflow) versus what concerns maintainers.

This doc is in GitBook but these changes need discussion: the procedure is my guess, I haven't done it so I'll need your help to correct errors and omissions.

A couple of remarks or observations with what I have here:

  • I'm not sure that the conventional Maven SNAPSHOT dance has been practiced consistently to this point. We could discuss alternatives, but so long as we intend to use it, tagged release commits ideally ought to not contain -SNAPSHOT in the POM. I've suggested a procedure that maintains this, but it's unfortunately a lot of ceremony when you have branch protection, the snapshot dance, and changelog update (2 PRs, several redundant CI builds). Some ceremony is warranted for major releases I think, but it'd be nice if it could be one PR somehow.

The release automation right now is a little bit manual still. Do you have examples of how this can be rolled into a single PR? Perhaps just making sure everyone agrees to and follows a process is a start, which is why I like this PR. Ideally this would be automated away from people, but I think we have lower hanging fruit right now.

One redundant build is inevitable with the snapshot convention I think, even if branch protection was skipped: CI passed on latest master, but a commit is needed to remove -SNAPSHOT before tagging.

  • A shortcoming with the changelog generator seems to be that, as far as I understand, the released version needs to be tagged (and pushed to GitHub?) before you run it. Ideally IMO changelog would precede the tagged commit, even makes a good candidate to be the tagged release commit along with version string updates.

Yes, having it be the tagged commit makes sense to me as well.

@stale
Copy link

stale bot commented Apr 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Apr 14, 2020
@woop woop added the keep-open label Apr 15, 2020
@stale stale bot removed the wontfix This will not be worked on label Apr 15, 2020
@ches
Copy link
Member Author

ches commented Apr 21, 2020

Quoting @woop from #442 because I think it's more contextual here:

I'm trying to figure out what all the missing pieces are here. @ches is it possible for you to enumerate your uncertainties? Or if you have certainties (like access you need) then you could also let me know and I will try to address them.

I think what I'd like to suggest at this point is for someone who has actually released Feast before to follow this PR's guide to make a release for v0.3.6 / 0.3.7, fill in anything missing in my doc as you go, and send a PR against this one that fills in the gaps. Basically, I don't know what I don't know 😊

Before we postulate how process/automation could potentially be improved, let's first accurately capture how it actually works at present. Hopefully that breaks the impasse.

@woop
Copy link
Member

woop commented Apr 23, 2020

I don't know what I don't know

Touché.

follow this PR's guide to make a release for v0.3.6 / 0.3.7, fill in anything missing in my doc as you go

Sure, makes sense. We are also in a bit of crunch mode right now, so I do apologize for the lack of attention here. I've not gone through the complete cycle myself so I will defer to @davidheryanto and @khorshuheng here.

@woop
Copy link
Member

woop commented Apr 30, 2020

A shortcoming with the changelog generator seems to be that, as far as I understand, the released version needs to be tagged (and pushed to GitHub?) before you run it.

It seems like the changelog generator has an unreleased section that it generates. If we are assuming that all unreleased changes would make it into the release, then I think it solves the problem.

For example I just ran it

Changelog

Unreleased

Full Changelog

Closed issues:

  • Feast Core: Dataflow Runner fails to start job with no translator registered error. #642
  • Feast Serving not registering store in Feast Core #640
    [SNIP]

Merged pull requests:

Even makes a good candidate to be the tagged release commit along with version string updates.

If the above holds true, then we could use the changelog generator to create the changelog. Push it with the version string updates. Review it. Get it merged. Push the tag.

But the problem is we still need the pom.xml / Snapshot addition after that, right? I don't see a way around having two PRs, unless we just want to push straight to master to add that back in.

Overall I think the process you have described makes sense. Changes/additions

  1. Update the order of events to include the changelog in the release commit
  2. Add more details on how to generate the changelog. I think this can be a different section altogether. You can just link to the header.
  3. Add more details on how to document the GitHub release summary page.

I can help with (2) and (3)

Once we have updated the above, somebody should then walk through it.

@woop woop mentioned this pull request Apr 30, 2020
@woop
Copy link
Member

woop commented Apr 30, 2020

Generating a Change Log

We use an open source change log generator to generate change logs. The process still requires a little bit of manual effort.

  1. Create a GitHub token as per these instructions . The token is used as an input argument (-t) to the changelog generator.
  2. The change log generator will look for unreleased changes on a specific branch. The branch will be master for a major/minor release, or a release branch (v0.4-branch) for a patch release. You will need to set the branch using the --release-branch argument.
  3. It is also advised to set a proposed version. This is the version that you will be releasing. The version can still be changed at a later date. Please use --future-release to set this version using semver format.
  4. Update the arguments below and run the command to generate the change log to the console.
docker run -it --rm ferrarimarco/github-changelog-generator \
--user gojek \
--project feast  \
--release-branch <release-branch-to-find-changes>  \
--future-release <proposed-release-version>  \
--unreleased-only  \
--no-issues  \
--bug-labels kind/bug  \
--enhancement-labels kind/feature  \
--breaking-labels compat/breaking  \
-t <your-github-token>  \
--max-issues 1 \
-o
  1. Please review each change log item.
    • Make sure that sentences are grammatically correct and well formatted (although we will try to enforce this at the PR review stage).
    • Make sure that each item is categorized correctly. You will see the following categories: Breaking changes, Implemented enhancements, Fixed bugs, and Merged pull requests. Any unlabeled PRs will be found in Merged pull requests. It's important to make sure that any breaking changes, enhancements, or bug fixes are pulled up out of merged pull requests into the correct category. Housekeeping, tech debt clearing, infra changes, or refactoring do not count as enhancements. Only enhancements a user benefits from should be listed in that category.

Example (unmodified)

docker run -it --rm ferrarimarco/github-changelog-generator \
--user gojek \
--project feast  \
--future-release 0.5.0  \
--unreleased-only  \
--no-issues  \
--bug-labels kind/bug  \
--enhancement-labels kind/feature  \
--release-branch master  \
--breaking-labels compat/breaking  \
-t <your-github-token>  \
--max-issues 1 -o

Changelog

0.5.0 (2020-04-30)

Full Changelog

Breaking changes:

  • Clean up Feast configuration #611 (woop)

Implemented enhancements:

  • Add Ingestion Job management API for Feast Core #548 (mrzzy)

Fixed bugs:

Merged pull requests:


@woop woop mentioned this pull request May 1, 2020
@woop
Copy link
Member

woop commented May 1, 2020

One open question: Which changelog do we update? Clearly we want to update the master branch, but is it sufficient to only update master and the respective release branch? If we have to update master then we would be updating the change log in three places, and we need 3 PRs.

@woop
Copy link
Member

woop commented May 2, 2020

I've updated the guide. You might want to have a quick look. It works fine for the most part. I think we should perhaps resolve conflicts and merge this in, and then add more details on which artifacts are being produced. That might be a separate section though.

@ches
Copy link
Member Author

ches commented May 4, 2020

Thanks for the updates! LGTM, I will fix the conflicts shortly.

ches and others added 3 commits May 5, 2020 08:26
Separate what concerns contributors versus what concerns maintainers.
On master we still have a monolithic `docs/contributing/contributing.md`
_and_ redundant copies of some of the information in broken out pages
(that have missed some useful updates to the monolith). Needs to get
sorted out, but going ahead and moving release process to the dedicated
page that now exists for it, in part to port easily to v0.4 docs where
the monolith is gone.
@ches
Copy link
Member Author

ches commented May 5, 2020

Rebased, and moved this to the broken out release-process.md that exists now. Master still has the monolithic contributing/contributing.md where this patch still applied and broken out pages with the same information (some of which missed good updates to the monolith I think).

That'll get sorted out, but now it's easier to port to the v0.4-branch docs that are live on GitBook. I can send a PR for that as well.

@woop
Copy link
Member

woop commented May 5, 2020

Thanks @ches. I can help with cleanup. For the time being I'd just like to get this merged in. We won't lose it, I promise :)

@ches ches changed the title [WIP] Document release steps Document release steps May 5, 2020
@woop
Copy link
Member

woop commented May 8, 2020

/lgtm

@woop
Copy link
Member

woop commented May 8, 2020

/approved

@khorshuheng
Copy link
Collaborator

/approve

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ches, khorshuheng, woop

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@woop woop merged commit 90edb71 into feast-dev:master May 8, 2020
@ches ches deleted the release-doc branch May 8, 2020 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants