Skip to content

Experimenting New Release Process #1013

Closed

Description

@shizhMSFT

As documented in Release checklist, we need to update the oras version to the upcoming release version before voting as oras maintains a linear commit history. However, there is a risk that we might need to revert the version update commit if the vote gets rejected.

Success scenario:

gitGraph
  commit tag: "v1.0.0"
  commit
  commit id: "bump: update to v1.1.0-rc.1" tag: "v1.1.0-rc.1" type: HIGHLIGHT
  branch release-1.1
  checkout main
  commit
  commit id: "fix: fix a bug"
  commit
  checkout release-1.1
  cherry-pick id: "fix: fix a bug"
  commit id: "bump: update to v1.1.0-rc.2" tag: "v1.1.0-rc.2" type: HIGHLIGHT
  checkout main
  cherry-pick id: "bump: update to v1.1.0-rc.2"
  checkout release-1.1
  commit id: "bump: update to v1.1.0" tag: "v1.1.0" type: HIGHLIGHT
  checkout main
  cherry-pick id: "bump: update to v1.1.0"
  commit
Loading

Bad scenario where releasing v1.1.0-rc.1 is rejected once:

gitGraph
  commit tag: "v1.0.0"
  commit
  commit id: "bump: update to v1.1.0-rc.1"
  commit
  commit id: "revert: bump: update to v1.1.0-rc.1" type: REVERSE
  commit
  commit id: "fix: address vote comments"
  commit id: "bump: update to v1.1.0-rc.1 again" tag: "v1.1.0-rc.1" type: HIGHLIGHT
  commit
Loading

As inspired by opencontainers/image-spec, #1002 and #1010, the above risk can be mitigated by cutting from a PR branch (and then merge back) where the PR approval is treated as a vote although it makes oras commit history non-linear.

Success scenario:

%%{init: { 'theme': 'base' } }%%
gitGraph
  commit tag: "v1.0.0"
  commit
  branch fork/release-vote
  commit id: "bump: update to v1.1.0-rc.1" tag: "v1.1.0-rc.1" type: HIGHLIGHT
  branch release-1.1
  checkout main
  merge fork/release-vote
  commit
  commit id: "fix: fix a bug"
  commit
  checkout release-1.1
  cherry-pick id: "fix: fix a bug"
  branch fork/release-vote-2
  commit id: "bump: update to v1.1.0-rc.2" tag: "v1.1.0-rc.2" type: HIGHLIGHT
  checkout release-1.1
  merge fork/release-vote-2
  checkout main
  cherry-pick id: "bump: update to v1.1.0-rc.2"
  checkout release-1.1
  branch fork/release-vote-3
  commit id: "bump: update to v1.1.0" tag: "v1.1.0" type: HIGHLIGHT
  checkout release-1.1
  merge fork/release-vote-3
  checkout main
  cherry-pick id: "bump: update to v1.1.0"
  commit
Loading

Bad scenario where releasing v1.1.0-rc.1 is rejected once:

%%{init: { 'theme': 'base' } }%%
gitGraph
  commit tag: "v1.0.0"
  commit
  branch fork/release-vote
  commit id: "bump: update to v1.1.0-rc.1"
  checkout main
  commit
  commit
  commit id: "fix: address vote comments"
  branch fork/release-vote-2
  commit id: "bump: update to v1.1.0-rc.1 again" tag: "v1.1.0-rc.1" type: HIGHLIGHT
  checkout main
  merge fork/release-vote-2
  commit
Loading

@qweeah @TerryHowe @sajayantony @SteveLasker I think we can reset releasing v1.1.0-rc.1 and start experimenting with the new approach. If it works perfect, we can update the release checklist accordingly.

Activity

  1. shizhMSFT commented on Jul 9, 2023

    @shizhMSFT
    ContributorAuthor

    Since the commit history of the new approach is non-linear but GitHub shows the non-linear commits in a linear way, PR reviewers are required to be careful about the following situation where feat: A is before the v1.1.0-rc.1 (in terms of commit time) but not included in v1.1.0-rc.1 (as they are in different branches).

    %%{init: { 'theme': 'base' } }%%
    gitGraph
      commit tag: "v1.0.0"
      commit
      branch fork/release-vote
      checkout main
      commit id: "feat: A"
      checkout fork/release-vote
      commit id: "bump: update to v1.1.0-rc.1" tag: "v1.1.0-rc.1" type: HIGHLIGHT
      checkout main
      commit id: "feat: B"
      merge fork/release-vote
      checkout main
      commit
    
    Loading
  2. shizhMSFT commented on Jul 9, 2023

    @shizhMSFT
    ContributorAuthor

    /cc @FeynmanZhou @yizha1 as notation may also adopt this approach.

  3. qweeah commented on Jul 10, 2023

    @qweeah
    Contributor

    Since the commit history of the new approach is non-linear but GitHub shows the non-linear commits in a linear way, PR reviewers are required to be careful about the following situation where feat: A is before the v1.1.0-rc.1 (in terms of commit time) but not included in v1.1.0-rc.1 (as they are in different branches).

    %%{init: { 'theme': 'base' } }%%
    gitGraph
      commit tag: "v1.0.0"
      commit
      branch fork/release-vote
      checkout main
      commit id: "feat: A"
      checkout fork/release-vote
      commit id: "bump: update to v1.1.0-rc.1" tag: "v1.1.0-rc.1" type: HIGHLIGHT
      checkout main
      commit id: "feat: B"
      merge fork/release-vote
      checkout main
      commit
    
    Loading

    How can we deal with this situation? If we cannot pick feat: A and feat: B out, should we disallow code merge into main branch until cutting from a PR branch is done?

    Update: This is not an issue. I realized that the v1.1.0-rc.1 doesn't include feat: A and feat: B, so voting for branch cutting won't block merging new codes.

  4. shizhMSFT commented on Jul 10, 2023

    @shizhMSFT
    ContributorAuthor

    As alternative solution to cherry picking, we can merge main in the release branch if all new commits should be included, and then merge back.

    Cherry pick version:

    %%{init: { 'theme': 'base' } }%%
    gitGraph
      commit tag: "v1.0.0"
      commit
      branch fork/release-vote
      commit id: "bump: update to v1.1.0-rc.1" tag: "v1.1.0-rc.1" type: HIGHLIGHT
      branch release-1.1
      checkout main
      merge fork/release-vote
      commit id: "fix: fix a bug"
      checkout release-1.1
      cherry-pick id: "fix: fix a bug"
      branch fork/release-vote-2
      commit id: "bump: update to v1.1.0-rc.2" tag: "v1.1.0-rc.2" type: HIGHLIGHT
      checkout release-1.1
      merge fork/release-vote-2
      checkout main
      cherry-pick id: "bump: update to v1.1.0-rc.2"
      checkout release-1.1
      branch fork/release-vote-3
      commit id: "bump: update to v1.1.0" tag: "v1.1.0" type: HIGHLIGHT
      checkout release-1.1
      merge fork/release-vote-3
      checkout main
      cherry-pick id: "bump: update to v1.1.0"
      commit
    
    Loading

    Merge version

    %%{init: { 'theme': 'base' } }%%
    gitGraph
      commit tag: "v1.0.0"
      commit
      branch fork/release-vote
      commit id: "bump: update to v1.1.0-rc.1" tag: "v1.1.0-rc.1" type: HIGHLIGHT
      branch release-1.1
      checkout main
      merge fork/release-vote
      commit id: "fix: fix a bug"
      checkout release-1.1
      merge main
      branch fork/release-vote-2
      commit id: "bump: update to v1.1.0-rc.2" tag: "v1.1.0-rc.2" type: HIGHLIGHT
      checkout release-1.1
      merge fork/release-vote-2
      checkout main
      merge release-1.1
      checkout release-1.1
      branch fork/release-vote-3
      commit id: "bump: update to v1.1.0" tag: "v1.1.0" type: HIGHLIGHT
      checkout release-1.1
      merge fork/release-vote-3
      checkout main
      merge release-1.1
      commit
    
    Loading
  5. sajayantony commented on Jul 12, 2023

    @sajayantony
    Contributor

    Do we need to update - https://github.com/oras-project/oras-www/blob/main/docs/community/developer_guide.mdx#L79
    Honestly I haven't found non-linear merge an issue as long as the person knows that the release commit always must merged and not squashed.

    Another recommendation would be to include the diff from the last tag (major or minor)
    v1.0.0...v1.1.0-rc.1

    ❯ git log --pretty --graph --oneline -n7
    * 21d0b71c (HEAD -> main, upstream/main) test: add unit test for error scenario in `internal/credential/store.go` (#982)
    * ed3fbcc1 chore: update container build prepare job output in Github Actions (#1019)
    * 46780e70 chore: fix the links in project readme (#1012)
    * 5194c2ec (origin/main, origin/HEAD, release_v1.1.0-rc1) chore: fix lint warning (#1001)
    *   ef6e0222 bump: tag and release ORAS CLI v1.1.0-rc.1 (#1016)
    |\
    | * edfc253f (tag: v1.1.0-rc.1, upstream/release-1.1) bump: update oras version to 1.1.0-rc.1
    |/
    * 57c63b84 bump: update golang from 1.20.2 to 1.20.5 (#1015)
    
  6. qweeah commented on Jul 13, 2023

    @qweeah
    Contributor
  7. github-actions commented on Sep 12, 2023

    @github-actions

    This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

  8. added
    stale
    on Sep 12, 2023
  9. removed
    stale
    on Sep 12, 2023
  10. github-actions commented on Nov 12, 2023

    @github-actions

    This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

  11. added
    stale
    on Nov 12, 2023
  12. removed
    stale
    on Nov 13, 2023
  13. TerryHowe commented on Nov 13, 2023

    @TerryHowe
    Member

    Do we need this?

  14. qweeah commented on Nov 14, 2023

    @qweeah
    Contributor

    This is already applied and documented in here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions