Shopify / shipit-engine

Deployment coordination
https://shopify.engineering/introducing-shipit
MIT License
1.42k stars 144 forks source link

Run git commands less noisily #1219

Closed atesgoral closed 3 years ago

atesgoral commented 3 years ago

The initial git clone spams the log with progress output:

$ git clone --single-branch --recursive --branch master https://github.com/shopify/shipit.git /app/data/stacks/shopify/shipit/production/git
pid: 32373
Cloning into '/app/data/stacks/shopify/shipit/production/git'...
remote: Enumerating objects: 21925, done.        
remote: Counting objects:   0% (1/2009)        
remote: Counting objects:   1% (21/2009)        
remote: Counting objects:   2% (41/2009)        
...

many many lines later

...
Resolving deltas:  99% (14043/14182)   
Resolving deltas: 100% (14182/14182)   
Resolving deltas: 100% (14182/14182), done.

Adding a --quiet to keep git quieter.

The commit hash checkout results in git giving us a lecture about detached heads:

$ git checkout 0216b407c09b8198caec9ec12786e3c6a952cb1c
pid: 32416

Note: checking out '0216b407c09b8198caec9ec12786e3c6a952cb1c'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

Adding --config advice.detachedHead=false to turn off this advisory.

benlangfeld commented 3 years ago

Relevant precedent in https://github.com/Shopify/shipit-engine/pull/1062

atesgoral commented 3 years ago

I haven't tophatted this locally yet.

atesgoral commented 3 years ago

I haven't tophatted this locally yet.

Is there even a way to tophat this locally? Or should I merge + monitor?

casperisfine commented 3 years ago

Is there even a way to tophat this locally?

Yeah, you can setup a stack with a public repo etc. But seems fine to me feel free to merge.

atesgoral commented 3 years ago

/shipit

atesgoral commented 3 years ago

@casperisfine A codeowner will have to merge, it seems.

DazWorrall commented 3 years ago

🤔 you should definitely be able to merge @atesgoral, what do you see in the merge area?

atesgoral commented 3 years ago

@DazWorrall I see:

The base branch restricts merging to authorized users.

image

DazWorrall commented 3 years ago

@atesgoral should be hopefully fixed :shipit:

atesgoral commented 3 years ago

@DazWorrall Fixed. Thanks!