Skip to content

Remove redundant Git pull during gdk update

Michael Kozono requested to merge remove-redundant-pull into main

What does this merge request do and why?

Remove redundant Git pull during gdk update.

The following line after the removed one is gitlab-update. The first thing gitlab-update does is gitlab/.git/pull.

--------------------------------------------------------------------------------
Updating gitlab-org/gitlab
--------------------------------------------------------------------------------
Successfully fetched and checked out 'master' for 'gitlab/'
Successfully pulled (--ff-only) for 'gitlab/'

--------------------------------------------------------------------------------
Updating gitlab-org/gitlab
--------------------------------------------------------------------------------
Successfully fetched and checked out 'master' for 'gitlab/'

Additionally, the 2nd Updating gitlab-org/gitlab tends to hang for me. I assume GitLab.com doesn't like fetches of the same resource from the same client, in quick succession. Which would be fair. Though I don't know where that throttling logic lives, if it exists. I also notice that git fetch --all --tags --prune is done and then git pull --ff-only, so in total, gdk update does 4 fetches in a row.

Resolves #1705 (closed)

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Run GDK_SELF_UPDATE=0 gdk update to see if it does Updating gitlab-org/gitlab twice in a row or not, with main vs this branch remove-redundant-pull.

Impacted categories

The following categories relate to this merge request:

  • gdk-reliability - e.g. When a GDK action fails to complete. (See my side note above)
  • gdk-usability - e.g. Improvements or suggestions around how the GDK functions.
  • gdk-performance - e.g. When a GDK action is slow or times out.

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • [-] Tests added for new functionality. If not, please raise an issue to follow-up.
  • [-] Documentation added/updated, if needed.
  • [-] Announcement added, if change is notable.
  • [-] gdk doctor test added, if needed.
  • [-] Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Michael Kozono

Merge request reports