Skip to content

Simplify merge strategy for staging #373

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 59 commits into from
Sep 23, 2024
Merged

Simplify merge strategy for staging #373

merged 59 commits into from
Sep 23, 2024

Conversation

nrichers
Copy link
Collaborator

@nrichers nrichers commented Sep 17, 2024

Internal Notes for Reviewers

This PR simplifies the merge strategy for our staging branch. It uses:

  • The same git merge --no-ff strategy as other ValidMind repos
  • PR merging with --merge to preserve the original commit history

Testing

There are three branches for testing, all originally copies of main:

  • main-test — Test branch into which you can merge changes
  • staging-test — Staging test branch into which the workflow merges your commits from main-test
  • prod-test — Prod test branch into which you can manually merge PRs from staging-test to simulate deployment to production

Additionally, 7e948dd enables testing with these branches.

Merging into staging-test

  1. Commit a change to main-test, either directly or via PR
  2. Make a change to the PR branch and push

After, the workflow completes, the new commit will show up in staging-test, along with merge commits that get created by the workflow.

Merging into prod-test

Open a PR to merge staging-test into prod-test, merge, and then compare the commits. You should see the commits from staging-test, plus a merge commit from the PR.

Here's what the git history for each test repo looks like after an afternoon of testing — note that I experimented with different strategies but you can see patterns similar to what I highlighted:

image

Switching over

After this PR gets approved:

  • Merge Use Quarto profiles for rendering the site on GitHub and locally #372 first
  • Test the new merge strategy in the main-test, staging-test, and prod-test branches
  • Pause all merging into main
  • Recreate the staging and prod branches with a shared history:
    • Create staging-archive and prod-archive branches as a backup
    • Delete staging and prod
    • Create new staging and prod from main
    • Verify the histories between main, staging, and prod match
  • This PR:
    • Undo the changes to enable testing from 7e948dd
    • Remove any test comments in the workflow
    • Merge
  • Delete the main-test, staging-test, and prod-test branches
  • Merge a test PR into main, check it gets auto-merged into staging, and open a PR to check that merging into prod works

External Release Notes

@nrichers nrichers added infrastructure Docs infra changes internal Not to be externalized in the release notes labels Sep 17, 2024
Copy link
Contributor

A PR preview is available: Preview URL

Copy link
Contributor

A PR preview is available: Preview URL

1 similar comment
Copy link
Contributor

A PR preview is available: Preview URL

Copy link
Contributor

A PR preview is available: Preview URL

1 similar comment
Copy link
Contributor

A PR preview is available: Preview URL

Copy link
Contributor

A PR preview is available: Preview URL

Copy link
Contributor

A PR preview is available: Preview URL

Copy link
Contributor

A PR preview is available: Preview URL

2 similar comments
Copy link
Contributor

A PR preview is available: Preview URL

Copy link
Contributor

A PR preview is available: Preview URL

Copy link
Contributor

A PR preview is available: Preview URL

Copy link
Contributor

A PR preview is available: Preview URL

1 similar comment
Copy link
Contributor

A PR preview is available: Preview URL

Copy link
Contributor

A PR preview is available: Preview URL

Copy link
Contributor

A PR preview is available: Preview URL

@nrichers nrichers merged commit 34d2759 into main Sep 23, 2024
4 checks passed
@nrichers nrichers deleted the simplify-merge-strategy branch September 23, 2024 21:38
nrichers added a commit that referenced this pull request Sep 23, 2024
* Fix staging deploy in Makefile (#428)

* Simplify merge strategy for staging (#373)

* Simplify merge strategy

* Minor workflow tweaks

* Switch to test branches

* Add comment to trigger workflow

* Add comment to trigger workflow

* Add comment to trigger workflow

* Switch to squash merge

* Add comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Try --ff strategy

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Revert to --no-ff strategy

* Try reset --hard

* Switch to --merge for PRs

* Switch back to merge --no-ff

* Try merge --ff again

* Add test comment to trigger workflow

* Switch back to merge --no-ff

* Add test comment to trigger workflow

* Switch back to squash merging for PRs

* Add test comment to trigger workflow

* Remove test comments

* Revert to --merge for PRs

* Testing PR#373 - push to branch from local

* Add comment to trigger workflow

* Add comment to trigger workflow

* Add comment to trigger workflow

* Switch to squash merge

* Add comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Switch to --merge for PRs

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Switch back to squash merging for PRs

* Add test comment to trigger workflow

* Remove test comments

* Revert to --merge for PRs

* Undo test changes

* Undo test comment

---------

Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com>

* I'm dumb (#431)

* Fix branch in merge-main-into-staging.yaml (#432)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com>
validbeck added a commit that referenced this pull request Sep 23, 2024
* Fix staging deploy in Makefile (#428)

* Simplify merge strategy for staging (#373)

* Simplify merge strategy

* Minor workflow tweaks

* Switch to test branches

* Add comment to trigger workflow

* Add comment to trigger workflow

* Add comment to trigger workflow

* Switch to squash merge

* Add comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Try --ff strategy

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Revert to --no-ff strategy

* Try reset --hard

* Switch to --merge for PRs

* Switch back to merge --no-ff

* Try merge --ff again

* Add test comment to trigger workflow

* Switch back to merge --no-ff

* Add test comment to trigger workflow

* Switch back to squash merging for PRs

* Add test comment to trigger workflow

* Remove test comments

* Revert to --merge for PRs

* Testing PR#373 - push to branch from local

* Add comment to trigger workflow

* Add comment to trigger workflow

* Add comment to trigger workflow

* Switch to squash merge

* Add comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Switch to --merge for PRs

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Switch back to squash merging for PRs

* Add test comment to trigger workflow

* Remove test comments

* Revert to --merge for PRs

* Undo test changes

* Undo test comment

---------

Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com>

* I'm dumb (#431)

* Fix branch in merge-main-into-staging.yaml (#432)

* Styled screenshots & cleaned up current screenshots (#420)

* Added a .screenshot CSS class

* Sample image

* Changed class for About -releases

* Changed class for Get Started & edited images to be uniform

* Changed class for guides/configuration

* Changed class for guides/model-workflows

* Changed class for guides/model-inventory

* Changed class for guides/model-documentation

* Changed class for guides/model-validation

* Changed class for guides/monitoring

* Changed class for developer/

* Changed class for releases/ 1st pass

* Cropped images for 2024-may-22 -1 gif

* Reverting changes for a gif to crop again

* Cropped images for releases 2nd pass

* Cropped images for releases 3rd  pass

* Cropped images for releases 4th pass

* More tweaks

* Videos styling

* Tweaks to JH quickstart

* More cropping

* Applied class to training

* Annotated screenshots in guides/

* Currency field type (#423)

* Preview of Generate with AI docs sections (#419)

* Preview of Generate with AI docs sections

* Release notes draft

* Image edits

* Editing release

* Release notes done

* Final tweaks + new gif

* Oops I lied

* anchor links

---------

Co-authored-by: Nik Richers <nik@validmind.ai>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
nrichers added a commit that referenced this pull request Oct 3, 2024
* Fix staging deploy in Makefile (#428)

* Simplify merge strategy for staging (#373)

* Simplify merge strategy

* Minor workflow tweaks

* Switch to test branches

* Add comment to trigger workflow

* Add comment to trigger workflow

* Add comment to trigger workflow

* Switch to squash merge

* Add comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Try --ff strategy

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Revert to --no-ff strategy

* Try reset --hard

* Switch to --merge for PRs

* Switch back to merge --no-ff

* Try merge --ff again

* Add test comment to trigger workflow

* Switch back to merge --no-ff

* Add test comment to trigger workflow

* Switch back to squash merging for PRs

* Add test comment to trigger workflow

* Remove test comments

* Revert to --merge for PRs

* Testing PR#373 - push to branch from local

* Add comment to trigger workflow

* Add comment to trigger workflow

* Add comment to trigger workflow

* Switch to squash merge

* Add comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Remove comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Switch to --merge for PRs

* Add test comment to trigger workflow

* Add test comment to trigger workflow

* Switch back to squash merging for PRs

* Add test comment to trigger workflow

* Remove test comments

* Revert to --merge for PRs

* Undo test changes

* Undo test comment

---------

Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com>

* I'm dumb (#431)

* Fix branch in merge-main-into-staging.yaml (#432)

* Styled screenshots & cleaned up current screenshots (#420)

* Added a .screenshot CSS class

* Sample image

* Changed class for About -releases

* Changed class for Get Started & edited images to be uniform

* Changed class for guides/configuration

* Changed class for guides/model-workflows

* Changed class for guides/model-inventory

* Changed class for guides/model-documentation

* Changed class for guides/model-validation

* Changed class for guides/monitoring

* Changed class for developer/

* Changed class for releases/ 1st pass

* Cropped images for 2024-may-22 -1 gif

* Reverting changes for a gif to crop again

* Cropped images for releases 2nd pass

* Cropped images for releases 3rd  pass

* Cropped images for releases 4th pass

* More tweaks

* Videos styling

* Tweaks to JH quickstart

* More cropping

* Applied class to training

* Annotated screenshots in guides/

* Currency field type (#423)

* Preview of Generate with AI docs sections (#419)

* Preview of Generate with AI docs sections

* Release notes draft

* Image edits

* Editing release

* Release notes done

* Final tweaks + new gif

* Oops I lied

* anchor links

* Added attachment field type (#442)

* Added attachment field type

* Wording tweak

* Missed one

* Pulling in latest from developer-framework PR#195 (#438)

* Pulling in latest from developer-framework

* Added .screenshot class to model inventory fields

* Added aliases for index.html & training-overview.html (#444)

* Docs: Work with metrics over time (#449)

* WIP

* Key concepts draft

* Clarified  monitoring instructions now w/ accurate default permissions

* Final draft of Work with metrics over time

* Adjusted Work with content blocks

* Fixing display issue for test description listings on monitoring

* Update site/guide/monitoring/work-with-metrics-over-time.qmd

Co-authored-by: John Halz <johnwalz97@gmail.com>

---------

Co-authored-by: John Halz <johnwalz97@gmail.com>

* Templates for videos (#415)

* Add docs.validmind.ai/training redirect

* Update backgrounds, remove slide numbering, add slide links

* Add initial presentation with sample intro slides

* Add slides

* Update video slides

* Hide controls

* Organize slides into sections by type

* Minor update for adding tests

* Calculation field instructions & example (#443)

* Calculation field instructions & example

* Tweak

* Moved calculation screenshot into its own line

* Added Juan's magic formula

* Set up backfilled redirects for renamed pages (#454)

* 1st pass of links that used to be on developer-framework

* 1st pass of other external links to docs

* 1st pass of newer renames

* Big restructure of guides alias links 1st pass

* Restructure of Documenting models 1st pass

* 2nd pass of big restructure

* Final pass of big restructure

* Added alias redirects to style guide

* Embed Validating Models 101 playlist into Guides section (#446)

* Embed Validating Models 101 playlist into Guides section

* Remove whitespace

* Update site/guide/guides.qmd

Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com>

* Update site/guide/guides.qmd

Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com>

* Undo lead-in text for video

---------

Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com>

* Embed "How do I ... add tests?" video in developer docs (#450)

* Add how do I add test video

* Switch to iframe for video embed

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Beck <164545837+validbeck@users.noreply.github.com>
Co-authored-by: John Halz <johnwalz97@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Docs infra changes internal Not to be externalized in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants