Skip to content

ci: Setup gitflow process #6890

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

Merged
merged 1 commit into from
Jan 31, 2023
Merged

ci: Setup gitflow process #6890

merged 1 commit into from
Jan 31, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Jan 20, 2023

This PR (WIP) sets up some Gitflow processes.

Some requirements that need to be done in order for this to work/make sense:

  • Extend all branch protection settings we have for master to develop (so have them for both branches)
  • Make develop the default branch in Github
  • Either make sure that approval of the "github-actions" bot user is OK to merge a PR, or we need to provide a github token of a user in whose name the approvals will be in

How it should work (overview)

  • We develop on the new develop branch. Any PRs are merged into develop
  • When we want to do a release, we merge develop into master and trigger a release from there.
  • While a release is pending, PRs can still be merged into develop (they will just not go into the ongoing release anymore)

gitflow-sentry-javascript (1)

How to do a release going forward?

  • Create a meta changelog PR to develop (as before)
  • When this is merged, we'll automatically create a PR from develop->master, auto-approve it, and automerge it when CI passed
  • Trigger a release from master branch (as before)
  • When this is merged, we'll automatically create a PR from master->develop, auto-approve it, and automerge it when CI passed
  • Now everything should be in sync again!

Potential streamlining/improvement?

One way in which this could be improved, is to auto-trigger the release whenever we merge into master.
In order to do this, we'll need to somehow know at this point:

  • the version to release
  • force if there are release blockers (optional)

We may be able to parse this somehow, but I'd say this is an area for future improvement, if we decide so.

What's missing?

We'll probably have to tweak caching etc. settings a bit to streamline this - e.g. what needs to run when merging develop-> master, what needs to run when merging master->develop, etc.

@mydea mydea added the Dev: CI label Jan 20, 2023
@mydea mydea self-assigned this Jan 20, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.87 KB (added)
@sentry/browser - ES5 CDN Bundle (minified) 61.57 KB (added)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.54 KB (added)
@sentry/browser - ES6 CDN Bundle (minified) 54.88 KB (added)
@sentry/browser - Webpack (gzipped + minified) 20.29 KB (added)
@sentry/browser - Webpack (minified) 66.37 KB (added)
@sentry/react - Webpack (gzipped + minified) 20.31 KB (added)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.6 KB (added)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.79 KB (added)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.08 KB (added)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 44.15 KB (added)
@sentry/replay - Webpack (gzipped + minified) 38.9 KB (added)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 61.5 KB (added)

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Seems like a good workflow to me!

Also, great diagram! Once we all agree on this, let's make sure to document this flow in our docs directory and maybe link to it from CONTRIBUTING or similar?

@mydea mydea force-pushed the fn/gitflow branch 2 times, most recently from 0507cec to 929e5a3 Compare January 30, 2023 11:46
@mydea mydea changed the title ci: Setup gitflow process (WIP) ci: Setup gitflow process Jan 30, 2023
@mydea mydea marked this pull request as ready for review January 30, 2023 11:47
@mydea
Copy link
Member Author

mydea commented Jan 30, 2023

Added docs here: https://github.com/getsentry/sentry-javascript/blob/fn/gitflow/CONTRIBUTING.md

Note: I took this opportunity and extracted the publishing stuff out as well.

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

LGTM. I like the automatic approach master/develop syncing approach and I think going forward, moving to gitflow will solve our release blocking/multiple teams working on the repo problem. Thanks for updating documentation, I think it makes a lot of sense now.

@mydea
Copy link
Member Author

mydea commented Jan 31, 2023

FYI I updated this slightly:

  1. Added the gitflow image to the docs
  2. Made it so we can manually trigger a sync between develop/master via GHA workflow_dispatch

@mydea mydea merged commit 121c2c9 into master Jan 31, 2023
@mydea mydea deleted the fn/gitflow branch January 31, 2023 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants