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

fix: safer re-merging with updated upstream #3499

Merged
merged 15 commits into from
Sep 25, 2023

Commits on Jun 7, 2023

  1. Safer handling of merging with an updated upstream.

    We used to call forceClone() to update with upstream, but this deletes the
    checked out directory. This is inefficient, can delete existing plan files,
    and is very surprising if you are working manually in the working directory.
    
    We now fetch an updated upstream, and re-do the merge operation. This
    leaves any working files intact.
    finnag committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    d9807ca View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2023

  1. Rename SafeToReClone -> CheckForUpstreamChanges

    It's never safe to clone again. But sometimes we need to check
    for upstream changes to avoid reverting changes.
    
    The flag is now used to know when we need to merge
    again non-destructively with new changes.
    finnag committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    e093ca7 View commit details
    Browse the repository at this point in the history
  2. Update fixtures.go

    nitrocode authored Jun 8, 2023
    Configuration menu
    Copy the full SHA
    00ad2bb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f5e9a4c View commit details
    Browse the repository at this point in the history
  4. Add test to make sure plans are not wiped out

    As long as the branch itself has not been updated, plans
    should be kept. Even if upstream has changed.
    finnag committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    c0e6b20 View commit details
    Browse the repository at this point in the history
  5. renamed HasDiverged to MergedAgain in PlanResult and from Clone()

    This flag was only set to true in case a call to Clone()
    ended up merging with an updated upstream, so the
    new name better represents what it means.
    finnag committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    88eac0a View commit details
    Browse the repository at this point in the history
  6. Test that Clone on branch update wipes old plans

    This complements the test that Clone with unmodified
    branch but modified upstream does _not_ wipe plans.
    finnag committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    ef5d2e2 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2023

  1. Configuration menu
    Copy the full SHA
    c94cda5 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2023

  1. Configuration menu
    Copy the full SHA
    218de2a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    74040a7 View commit details
    Browse the repository at this point in the history
  3. Updated template to merged again instead of diverged

    This is no longer a warning, but expected behavior in merge chekout mode
    finnag committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    cf33681 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2023

  1. Configuration menu
    Copy the full SHA
    9634103 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. Rename git wrapper to wrappedGit, add a type for static config

    Every call to wrappedGit for the same PR uses identical setup
    for directory, head repo and PR, so passing the
    finnag committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    2c0260d View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2023

  1. Configuration menu
    Copy the full SHA
    cf6684c View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2023

  1. Configuration menu
    Copy the full SHA
    da1373f View commit details
    Browse the repository at this point in the history