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

ci: update caskroom/cask/perforce to new location #400

Closed
wants to merge 1 commit into from

Conversation

derrickstolee
Copy link

@derrickstolee derrickstolee commented Oct 15, 2019

Running CI on Mac OS X in Azure Pipelines is currently broken due to a moved homebrew package.

Change since v2:

  • The commit message was improved (thanks Gábor).

Change since v1:
-The step is now more robust (by pulling homebrew-cask and trying again if the pull failed).

Thanks,
-Stolee

Cc: [email protected]

@derrickstolee derrickstolee force-pushed the ci-caskroom branch 2 times, most recently from aa9359c to 84830d8 Compare October 15, 2019 17:27
@derrickstolee
Copy link
Author

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Oct 15, 2019

Submitted as [email protected]

@gitgitgadget
Copy link

gitgitgadget bot commented Oct 16, 2019

This branch is now known as js/azure-ci-osx-fix.

@gitgitgadget
Copy link

gitgitgadget bot commented Oct 16, 2019

This patch series was integrated into pu via git@2e41ca7.

@gitgitgadget
Copy link

gitgitgadget bot commented Oct 17, 2019

On the Git mailing list, Johannes Schindelin wrote (reply to this):

Hi Stolee,

On Tue, 15 Oct 2019, Derrick Stolee via GitGitGadget wrote:

> Running CI on Mac OS X in Azure Pipelines is currently broken due to a m=
oved
> homebrew package.

It seems that the exact problem we tried to avoid by staying on caskroom
rears its ugly head: all of the macOS jobs are failing in Git for
Windows' builds (but not in GitGitGadget's, which is probably due to
differences in the "up to date"-ness used build agents).

I am investigating here:
https://github.com/git-for-windows/git/pull/2359

Ciao,
Dscho

>
> Thanks, -Stolee
>
> Johannes Schindelin (1):
>   ci(osx): use new location of the `perforce` cask
>
>  ci/install-dependencies.sh | 1 +
>  1 file changed, 1 insertion(+)
>
>
> base-commit: 108b97dc372828f0e72e56bbb40cae8e1e83ece6
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-400%2F=
derrickstolee%2Fci-caskroom-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-400/derri=
ckstolee/ci-caskroom-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/400
> --
> gitgitgadget
>
>

@derrickstolee
Copy link
Author

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Oct 17, 2019

Submitted as [email protected]

@gitgitgadget
Copy link

gitgitgadget bot commented Oct 18, 2019

This patch series was integrated into pu via git@3acc818.

derrickstolee added a commit to microsoft/git that referenced this pull request Oct 18, 2019
…cask

This fix is a rebase of gitgitgadget#400.

The CI builds are failing for Mac OS X due to a change in the
location of the perforce cask. The command outputs the following
error:

    + brew install caskroom/cask/perforce
    Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.

So let's try to call `brew cask install perforce` first (which is what
that error message suggests, in a most round-about way).

The "caskroom" way was added in 672f51c (travis-ci:
fix Perforce install on macOS, 2017-01-22) and the justification
is that the call "brew cask install perforce" can fail due to a checksum
mismatch: the recipe simply downloads the official Perforce distro, and
whenever that is updated, the recipe needs to be updated, too.

CI servers are typically fresh virtual machines, but not always. To
accommodate for that, let's try harder if `brew cask install perforce`
fails, by specifically pulling the latest `master` of the
`homebrew-cask` repository.

This will still fail, of course, when `homebrew-cask` falls behind
Perforce's release schedule. But once it is updated, we can now simply
re-run the failed jobs and they will pick up that update.

As for updating `homebrew-cask`: the beginnings of automating this in
https://dev.azure.com/gitgitgadget/git/_build?definitionId=11&_a=summary
will be finished once the next Perforce upgrade comes around.
derrickstolee added a commit to microsoft/git that referenced this pull request Oct 18, 2019
…cask

This fix is a rebase of gitgitgadget#400.

The CI builds are failing for Mac OS X due to a change in the
location of the perforce cask. The command outputs the following
error:

    + brew install caskroom/cask/perforce
    Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.

So let's try to call `brew cask install perforce` first (which is what
that error message suggests, in a most round-about way).

The "caskroom" way was added in 672f51c (travis-ci:
fix Perforce install on macOS, 2017-01-22) and the justification
is that the call "brew cask install perforce" can fail due to a checksum
mismatch: the recipe simply downloads the official Perforce distro, and
whenever that is updated, the recipe needs to be updated, too.

CI servers are typically fresh virtual machines, but not always. To
accommodate for that, let's try harder if `brew cask install perforce`
fails, by specifically pulling the latest `master` of the
`homebrew-cask` repository.

This will still fail, of course, when `homebrew-cask` falls behind
Perforce's release schedule. But once it is updated, we can now simply
re-run the failed jobs and they will pick up that update.

As for updating `homebrew-cask`: the beginnings of automating this in
https://dev.azure.com/gitgitgadget/git/_build?definitionId=11&_a=summary
will be finished once the next Perforce upgrade comes around.
@gitgitgadget
Copy link

gitgitgadget bot commented Oct 18, 2019

This patch series was integrated into pu via git@a1a9749.

@gitgitgadget
Copy link

gitgitgadget bot commented Oct 18, 2019

This patch series was integrated into next via git@bc6a502.

@gitgitgadget gitgitgadget bot added the next label Oct 18, 2019
@@ -40,6 +40,11 @@ osx-clang|osx-gcc)
test -z "$BREW_INSTALL_PACKAGES" ||
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, SZEDER Gábor wrote (reply to this):

On Thu, Oct 17, 2019 at 12:47:33PM +0000, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <[email protected]>
> 
> The CI builds are failing for Mac OS X due to a change in the

s/CI/Azure Pipelines/

Our Travis CI builds are fine.

> location of the perforce cask. The command outputs the following
> error:
> 
>     + brew install caskroom/cask/perforce
>     Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.
> 
> So let's try to call `brew cask install perforce` first (which is what
> that error message suggests, in a most round-about way).
> 
> The "caskroom" way was added in 672f51cb (travis-ci:
> fix Perforce install on macOS, 2017-01-22) and the justification
> is that the call "brew cask install perforce" can fail due to a checksum
> mismatch: the recipe simply downloads the official Perforce distro, and
> whenever that is updated, the recipe needs to be updated, too.

This paragraph is wrong, it mixes up things too much.

Prior to 672f51cb we used to install the 'perforce' _package_ with
'brew install perforce' (note: no 'cask' in there).  The justification
for 672f51cb was that the command 'brew install perforce' simply
stopped working, after Homebrew folks decided that it's better to move
the 'perforce' package to a "cask".  It was _their_ justification for
this move that 'brew install perforce' "can fail due to a checksum
mismatch ...", and casks can be installed without checksum
verification.  And indeed, both 'brew cask install perforce' and 'brew
install caskroom/cask/perforce' printed something along the lines of:

  ==> No checksum defined for Cask perforce, skipping verification

It's unclear to me why 672f51cb used 'brew install
caskroom/cask/perforce' instead of 'brew cask install perforce'.  It
appears (by running both commands on old Travis CI macOS images) that
both commands worked all the same already back then.

Anyway, as the error message at the top of the log message shows,
'brew install caskroom/cask/perforce' has stopped working recently,
but 'brew cask install perforce' still does, so let's use that.

Note that on Travis CI we explicitly specify which macOS image to use,
and nowadays we don't run 'brew update' during the build process [1],
so both commands work in our builds there.

[1] f2f4715033 (ci: don't update Homebrew, 2019-07-03)

> CI servers are typically fresh virtual machines, but not always. To
> accommodate for that, let's try harder if `brew cask install perforce`
> fails, by specifically pulling the latest `master` of the
> `homebrew-cask` repository.

Homebrew didn't record a checksum for Perforce versions r17.1, r17.2
and r18.1, so installing those still works fine.  Our Travis CI images
install r18.1.

However, when Homebrew updated to Perforce r19.1, they included the
checksum again for some reason (intentional or accidental; I didn't
look why).  This worked fine for a while, until a couple of days ago
Perforce updated the r19.1 binaries in place, breaking those
checksums.

If we were to still run 'brew update', then it would shortly fix the
checksum mismatch.  But we don't run it, and we do not want to run it
because it takes ages.  Falling back to pull from the 'homebrew-cask'
repository could be a reasonable and quick workaround.

> This will still fail, of course, when `homebrew-cask` falls behind
> Perforce's release schedule. But once it is updated, we can now simply
> re-run the failed jobs and they will pick up that update.

In our CI builds we don't at all care what the checksums of the
Perforce binaries are, so I would really like to tell 'brew' to ignore
any checksum mismatch when installing 'perforce'.  Alas, it appears
that 'brew' has no public options to turn of or to ignore checksum
verification.

Now, let's take a step back.

All 'brew cask install perforce' really does is run 'curl' to download
a tar.gz from the Perforce servers, verify its checksum, unpack it,
and put the executables somewhere on $PATH.  That's not rocket
science, we could easily do that ourselves; we don't even have to deal
with a tar.gz, the 'p4' and 'p4d' binaries for mac are readily
available for download at:

  http://filehost.perforce.com/perforce/r19.1/bin.macosx1010x86_64/

And, in fact, that's what we have been doing in some of our Linux jobs
since the very beginning, so basically only the download URL has to be
adjusted.


> As for updating `homebrew-cask`: the beginnings of automating this in
> https://dev.azure.com/gitgitgadget/git/_build?definitionId=11&_a=summary
> will be finished once the next Perforce upgrade comes around.
> 
> Signed-off-by: Johannes Schindelin <[email protected]>
> Signed-off-by: Derrick Stolee <[email protected]>
> ---
>  ci/install-dependencies.sh | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> index 85a9d6b15c..ce149ed39c 100755
> --- a/ci/install-dependencies.sh
> +++ b/ci/install-dependencies.sh
> @@ -40,6 +40,11 @@ osx-clang|osx-gcc)
>  	test -z "$BREW_INSTALL_PACKAGES" ||
>  	brew install $BREW_INSTALL_PACKAGES
>  	brew link --force gettext
> +	brew cask install perforce || {
> +		# Update the definitions and try again
> +		git -C "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask pull &&
> +		brew cask install perforce
> +	} ||
>  	brew install caskroom/cask/perforce
>  	case "$jobname" in
>  	osx-gcc)
> -- 
> gitgitgadget

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

SZEDER G=C3=A1bor <[email protected]> writes:

> On Thu, Oct 17, 2019 at 12:47:33PM +0000, Johannes Schindelin via GitGi=
tGadget wrote:
>> From: Johannes Schindelin <[email protected]>
>>=20
>> The CI builds are failing for Mac OS X due to a change in the
>
> s/CI/Azure Pipelines/
>
> Our Travis CI builds are fine.
>
>> location of the perforce cask. The command outputs the following
>> error:
>>=20
>>     + brew install caskroom/cask/perforce
>>     Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.
>>=20
>> So let's try to call `brew cask install perforce` first (which is what
>> that error message suggests, in a most round-about way).
>>=20
>> The "caskroom" way was added in 672f51cb (travis-ci:
>> fix Perforce install on macOS, 2017-01-22) and the justification
>> is that the call "brew cask install perforce" can fail due to a checks=
um
>> mismatch: the recipe simply downloads the official Perforce distro, an=
d
>> whenever that is updated, the recipe needs to be updated, too.
>
> This paragraph is wrong, it mixes up things too much.
>
> Prior to 672f51cb we used to install the 'perforce' _package_ with
> 'brew install perforce' (note: no 'cask' in there).  The justification
> for 672f51cb was that the command 'brew install perforce' simply
> stopped working, after Homebrew folks decided that it's better to move
> the 'perforce' package to a "cask".  It was _their_ justification for
> this move that 'brew install perforce' "can fail due to a checksum
> mismatch ...", and casks can be installed without checksum
> verification.  And indeed, both 'brew cask install perforce' and 'brew
> install caskroom/cask/perforce' printed something along the lines of:
>
>   =3D=3D> No checksum defined for Cask perforce, skipping verification
>
> It's unclear to me why 672f51cb used 'brew install
> caskroom/cask/perforce' instead of 'brew cask install perforce'.  It
> appears (by running both commands on old Travis CI macOS images) that
> both commands worked all the same already back then.
>
> Anyway, as the error message at the top of the log message shows,
> 'brew install caskroom/cask/perforce' has stopped working recently,
> but 'brew cask install perforce' still does, so let's use that.
>
> Note that on Travis CI we explicitly specify which macOS image to use,
> and nowadays we don't run 'brew update' during the build process [1],
> so both commands work in our builds there.
> ...
> Now, let's take a step back.
>=20
> All 'brew cask install perforce' really does is ...
> ... in fact, that's what we have been doing in some of our Linux jobs
> since the very beginning, so basically only the download URL has to be
> adjusted.

This is already in 'next' X-<; reverting a merge is cheap but I
prefer to do so when we already have a replacement.

Thanks for taking a closer look.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Johannes Schindelin wrote (reply to this):

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-104843895-1571786621=:46
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi G=C3=A1bor,

On Fri, 18 Oct 2019, SZEDER G=C3=A1bor wrote:

> On Thu, Oct 17, 2019 at 12:47:33PM +0000, Johannes Schindelin via GitGit=
Gadget wrote:
> > From: Johannes Schindelin <[email protected]>
> >
> > The CI builds are failing for Mac OS X due to a change in the
>
> s/CI/Azure Pipelines/
>
> Our Travis CI builds are fine.

For the moment ;-)

> > location of the perforce cask. The command outputs the following
> > error:
> >
> >     + brew install caskroom/cask/perforce
> >     Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.
> >
> > So let's try to call `brew cask install perforce` first (which is what
> > that error message suggests, in a most round-about way).
> >
> > The "caskroom" way was added in 672f51cb (travis-ci:
> > fix Perforce install on macOS, 2017-01-22) and the justification
> > is that the call "brew cask install perforce" can fail due to a checks=
um
> > mismatch: the recipe simply downloads the official Perforce distro, an=
d
> > whenever that is updated, the recipe needs to be updated, too.
>
> This paragraph is wrong, it mixes up things too much.
>
> Prior to 672f51cb we used to install the 'perforce' _package_ with
> 'brew install perforce' (note: no 'cask' in there).  The justification
> for 672f51cb was that the command 'brew install perforce' simply
> stopped working, after Homebrew folks decided that it's better to move
> the 'perforce' package to a "cask".  It was _their_ justification for
> this move that 'brew install perforce' "can fail due to a checksum
> mismatch ...", and casks can be installed without checksum
> verification.  And indeed, both 'brew cask install perforce' and 'brew
> install caskroom/cask/perforce' printed something along the lines of:
>
>   =3D=3D> No checksum defined for Cask perforce, skipping verification
>
> It's unclear to me why 672f51cb used 'brew install
> caskroom/cask/perforce' instead of 'brew cask install perforce'.  It
> appears (by running both commands on old Travis CI macOS images) that
> both commands worked all the same already back then.
>
> Anyway, as the error message at the top of the log message shows,
> 'brew install caskroom/cask/perforce' has stopped working recently,
> but 'brew cask install perforce' still does, so let's use that.

If you don't mind, I am going to copy/edit these three paragraphs into
the commit message,

> Note that on Travis CI we explicitly specify which macOS image to use,
> and nowadays we don't run 'brew update' during the build process [1],
> so both commands work in our builds there.
>
> [1] f2f4715033 (ci: don't update Homebrew, 2019-07-03)
>
> > CI servers are typically fresh virtual machines, but not always. To
> > accommodate for that, let's try harder if `brew cask install perforce`
> > fails, by specifically pulling the latest `master` of the
> > `homebrew-cask` repository.
>
> Homebrew didn't record a checksum for Perforce versions r17.1, r17.2
> and r18.1, so installing those still works fine.  Our Travis CI images
> install r18.1.
>
> However, when Homebrew updated to Perforce r19.1, they included the
> checksum again for some reason (intentional or accidental; I didn't
> look why).  This worked fine for a while, until a couple of days ago
> Perforce updated the r19.1 binaries in place, breaking those
> checksums.
>
> If we were to still run 'brew update', then it would shortly fix the
> checksum mismatch.  But we don't run it, and we do not want to run it
> because it takes ages.  Falling back to pull from the 'homebrew-cask'
> repository could be a reasonable and quick workaround.

Okay, good.

> > This will still fail, of course, when `homebrew-cask` falls behind
> > Perforce's release schedule. But once it is updated, we can now simply
> > re-run the failed jobs and they will pick up that update.
>
> In our CI builds we don't at all care what the checksums of the
> Perforce binaries are, so I would really like to tell 'brew' to ignore
> any checksum mismatch when installing 'perforce'.  Alas, it appears
> that 'brew' has no public options to turn of or to ignore checksum
> verification.

Sad, yet true, that we indeed have no command-line option to say "you
know what, your checksum possibly mismatches, but we really don't care".

> Now, let's take a step back.
>
> All 'brew cask install perforce' really does is run 'curl' to download
> a tar.gz from the Perforce servers, verify its checksum, unpack it,
> and put the executables somewhere on $PATH.  That's not rocket
> science, we could easily do that ourselves; we don't even have to deal
> with a tar.gz, the 'p4' and 'p4d' binaries for mac are readily
> available for download at:
>
>   http://filehost.perforce.com/perforce/r19.1/bin.macosx1010x86_64/
>
> And, in fact, that's what we have been doing in some of our Linux jobs
> since the very beginning, so basically only the download URL has to be
> adjusted.

I'd rather not.

Just because there is no better way on Linux, and just because the
current `perforce` cask recipe happens to just download and unpack that
file does not mean that this won't change.

And if it changes, we will be a lot better off by using the provided
package.

As I wrote here:

> > As for updating `homebrew-cask`: the beginnings of automating this in
> > https://dev.azure.com/gitgitgadget/git/_build?definitionId=3D11&_a=3Ds=
ummary
> > will be finished once the next Perforce upgrade comes around.

I am quite willing to do my share to keep the Homebrew recipe for
`perforce` up to date. We'll all be better off that way.

Ciao,
Dscho

> >
> > Signed-off-by: Johannes Schindelin <[email protected]>
> > Signed-off-by: Derrick Stolee <[email protected]>
> > ---
> >  ci/install-dependencies.sh | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> > index 85a9d6b15c..ce149ed39c 100755
> > --- a/ci/install-dependencies.sh
> > +++ b/ci/install-dependencies.sh
> > @@ -40,6 +40,11 @@ osx-clang|osx-gcc)
> >  	test -z "$BREW_INSTALL_PACKAGES" ||
> >  	brew install $BREW_INSTALL_PACKAGES
> >  	brew link --force gettext
> > +	brew cask install perforce || {
> > +		# Update the definitions and try again
> > +		git -C "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask p=
ull &&
> > +		brew cask install perforce
> > +	} ||
> >  	brew install caskroom/cask/perforce
> >  	case "$jobname" in
> >  	osx-gcc)
> > --
> > gitgitgadget
>

--8323328-104843895-1571786621=:46--

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Johannes Schindelin wrote (reply to this):

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-1209363107-1571786899=:46
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi Junio,

On Mon, 21 Oct 2019, Junio C Hamano wrote:

> SZEDER G=C3=A1bor <[email protected]> writes:
>
> > On Thu, Oct 17, 2019 at 12:47:33PM +0000, Johannes Schindelin via GitG=
itGadget wrote:
> >> From: Johannes Schindelin <[email protected]>
> >>
> >> The CI builds are failing for Mac OS X due to a change in the
> >
> > s/CI/Azure Pipelines/
> >
> > Our Travis CI builds are fine.
> >
> >> location of the perforce cask. The command outputs the following
> >> error:
> >>
> >>     + brew install caskroom/cask/perforce
> >>     Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.
> >>
> >> So let's try to call `brew cask install perforce` first (which is wha=
t
> >> that error message suggests, in a most round-about way).
> >>
> >> The "caskroom" way was added in 672f51cb (travis-ci:
> >> fix Perforce install on macOS, 2017-01-22) and the justification
> >> is that the call "brew cask install perforce" can fail due to a check=
sum
> >> mismatch: the recipe simply downloads the official Perforce distro, a=
nd
> >> whenever that is updated, the recipe needs to be updated, too.
> >
> > This paragraph is wrong, it mixes up things too much.
> >
> > Prior to 672f51cb we used to install the 'perforce' _package_ with
> > 'brew install perforce' (note: no 'cask' in there).  The justification
> > for 672f51cb was that the command 'brew install perforce' simply
> > stopped working, after Homebrew folks decided that it's better to move
> > the 'perforce' package to a "cask".  It was _their_ justification for
> > this move that 'brew install perforce' "can fail due to a checksum
> > mismatch ...", and casks can be installed without checksum
> > verification.  And indeed, both 'brew cask install perforce' and 'brew
> > install caskroom/cask/perforce' printed something along the lines of:
> >
> >   =3D=3D> No checksum defined for Cask perforce, skipping verification
> >
> > It's unclear to me why 672f51cb used 'brew install
> > caskroom/cask/perforce' instead of 'brew cask install perforce'.  It
> > appears (by running both commands on old Travis CI macOS images) that
> > both commands worked all the same already back then.
> >
> > Anyway, as the error message at the top of the log message shows,
> > 'brew install caskroom/cask/perforce' has stopped working recently,
> > but 'brew cask install perforce' still does, so let's use that.
> >
> > Note that on Travis CI we explicitly specify which macOS image to use,
> > and nowadays we don't run 'brew update' during the build process [1],
> > so both commands work in our builds there.
> > ...
> > Now, let's take a step back.
> >
> > All 'brew cask install perforce' really does is ...
> > ... in fact, that's what we have been doing in some of our Linux jobs
> > since the very beginning, so basically only the download URL has to be
> > adjusted.
>
> This is already in 'next' X-<; reverting a merge is cheap but I
> prefer to do so when we already have a replacement.

I force-pushed (see https://github.com/gitgitgadget/git/pull/400), and
once Stolee approves, he will submit v3. This will only change the
commit message, though, as I disagree that hard-coding the URL would be
an improvement: the nice thing about a package management system is that
the user does not need to know the details (or need to know if the
details change, like, ever).

Ciao,
Dscho

>
> Thanks for taking a closer look.
>

--8323328-1209363107-1571786899=:46--

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

Johannes Schindelin <[email protected]> writes:

>> This is already in 'next' X-<; reverting a merge is cheap but I
>> prefer to do so when we already have a replacement.
>
> I force-pushed (see https://github.com/gitgitgadget/git/pull/400), and
> once Stolee approves, he will submit v3. This will only change the
> commit message, though, as I disagree that hard-coding the URL would be
> an improvement: the nice thing about a package management system is that
> the user does not need to know the details (or need to know if the
> details change, like, ever).

If this were meant for the upcoming release, I would rather see us
copy a butt-ugly-but-known-working procedure if we have one this
close to -rc1.  If the hard-coded URL ever changes, the procedure
we would be copying from would be broken anyway.

But I agree 100% that we should take a conceptually cleaner approach
for the longer term.  Let's replace the original one with this and
cook in 'next'---it would be ideal if the ugly-but-know-working one
be updated to match in the meantime, but if it is bypassing package
management for a reason (the upstream just publishes the URL to
download from without packaging it properly, for example?), that
would not be possible, and it is OK if that is the case.

Thanks.



Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, SZEDER Gábor wrote (reply to this):

On Wed, Oct 23, 2019 at 01:23:25AM +0200, Johannes Schindelin wrote:
> On Fri, 18 Oct 2019, SZEDER Gábor wrote:
> 
> > On Thu, Oct 17, 2019 at 12:47:33PM +0000, Johannes Schindelin via GitGitGadget wrote:
> > > From: Johannes Schindelin <[email protected]>
> > >
> > > The CI builds are failing for Mac OS X due to a change in the
> >
> > s/CI/Azure Pipelines/
> >
> > Our Travis CI builds are fine.
> 
> For the moment ;-)

Touché.
Believe it or not, I did wrote "at least for now" at the end of that
sentence, but then deleted it.  Serves me right, now there is some new
breakage with gcc@8... :)

> If you don't mind, I am going to copy/edit these three paragraphs into
> the commit message,

Sure, go ahead.

> > In our CI builds we don't at all care what the checksums of the
> > Perforce binaries are, so I would really like to tell 'brew' to ignore
> > any checksum mismatch when installing 'perforce'.  Alas, it appears
> > that 'brew' has no public options to turn of or to ignore checksum
> > verification.
> 
> Sad, yet true, that we indeed have no command-line option to say "you
> know what, your checksum possibly mismatches, but we really don't care".

Actually, 'brew' does have some undocumented options, but I didn't
even bothered to check, because it's not really sensible to rely on an
undocumented option (especially when even the documented options break
every once in a while...).

> > Now, let's take a step back.
> >
> > All 'brew cask install perforce' really does is run 'curl' to download
> > a tar.gz from the Perforce servers, verify its checksum, unpack it,
> > and put the executables somewhere on $PATH.  That's not rocket
> > science, we could easily do that ourselves; we don't even have to deal
> > with a tar.gz, the 'p4' and 'p4d' binaries for mac are readily
> > available for download at:
> >
> >   http://filehost.perforce.com/perforce/r19.1/bin.macosx1010x86_64/
> >
> > And, in fact, that's what we have been doing in some of our Linux jobs
> > since the very beginning, so basically only the download URL has to be
> > adjusted.
> 
> I'd rather not.
> 
> Just because there is no better way on Linux, and just because the
> current `perforce` cask recipe happens to just download and unpack that
> file does not mean that this won't change.

Yeah, I'm fairly sure that the way Homebrew installs Perforce will
change, but if we download Perforce ourselves, then it won't matter at
all.

Downloading the Perforce binaries with 'wget' worked fairly well for
almost four years, except from that server glitch a couple of weeks
ago; I think downloading the macOS binaries from the same server would
work just as well.  OTOH, this is the fourth time that we have to
tweak how we install Perforce via Homebrew.

FWIW, it looks like this:

https://github.com/szeder/git/blob/ci-osx-wget-perforce/ci/install-dependencies.sh#L11

dscho added a commit to dscho/git that referenced this pull request Oct 18, 2019
We need this to make the CI/PR builds green. This was also submitted to
git.git via gitgitgadget#400 (which already
made it to `next` and hopefully will make it into v2.24.0-rc1).

Signed-off-by: Johannes Schindelin <[email protected]>
@gitgitgadget
Copy link

gitgitgadget bot commented Oct 22, 2019

This patch series was integrated into pu via git@65d716b.

git-for-windows-ci pushed a commit to git-for-windows/git that referenced this pull request Oct 22, 2019
We need this to make the CI/PR builds green. This was also submitted to
git.git via gitgitgadget#400 (which already
made it to `next` and hopefully will make it into v2.24.0-rc1).

Signed-off-by: Johannes Schindelin <[email protected]>
The Azure Pipelines builds are failing for macOS due to a change in the
location of the perforce cask. The command outputs the following error:

    + brew install caskroom/cask/perforce
    Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.

So let's try to call `brew cask install perforce` first (which is what
that error message suggests, in a most round-about way).

Prior to 672f51c we used to install the 'perforce' package with 'brew
install perforce' (note: no 'cask' in there). The justification for
672f51c was that the command 'brew install perforce' simply stopped
working, after Homebrew folks decided that it's better to move the
'perforce' package to a "cask". Their justification for this move was
that 'brew install perforce' "can fail due to a checksum mismatch ...",
and casks can be installed without checksum verification. And indeed,
both 'brew cask install perforce' and 'brew install
caskroom/cask/perforce' printed something along the lines of:

  ==> No checksum defined for Cask perforce, skipping verification

It is unclear why 672f51c used 'brew install caskroom/cask/perforce'
instead of 'brew cask install perforce'. It appears (by running both
commands on old Travis CI macOS images) that both commands worked all
the same already back then.

In any case, as the error message at the top of this commit message
shows, 'brew install caskroom/cask/perforce' has stopped working
recently, but 'brew cask install perforce' still does, so let's use
that.

CI servers are typically fresh virtual machines, but not always. To
accommodate for that, let's try harder if `brew cask install perforce`
fails, by specifically pulling the latest `master` of the
`homebrew-cask` repository.

This will still fail, of course, when `homebrew-cask` falls behind
Perforce's release schedule. But once it is updated, we can now simply
re-run the failed jobs and they will pick up that update.

As for updating `homebrew-cask`: the beginnings of automating this in
https://dev.azure.com/gitgitgadget/git/_build?definitionId=11&_a=summary
will be finished once the next Perforce upgrade comes around.

Helped-by: SZEDER Gábor <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
@derrickstolee
Copy link
Author

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Oct 23, 2019

Submitted as [email protected]

@@ -40,6 +40,11 @@ osx-clang|osx-gcc)
test -z "$BREW_INSTALL_PACKAGES" ||
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

"Johannes Schindelin via GitGitGadget" <[email protected]>
writes:

> From: Johannes Schindelin <[email protected]>
>
> The Azure Pipelines builds are failing for macOS due to a change in the
> location of the perforce cask. The command outputs the following error:
>
>     + brew install caskroom/cask/perforce
>     Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.
> ...
> In any case, as the error message at the top of this commit message
> shows, 'brew install caskroom/cask/perforce' has stopped working
> recently, but 'brew cask install perforce' still does, so let's use
> that.

It appears that OSX jobs at Travis are getting hit by this issue.
Here is what our failed build ends with, for example:

    +brew install caskroom/cask/perforce
    Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.

    cf. https://travis-ci.org/git/git/jobs/601697815

Today's 'pu' has this topic queued, and it seems to help even the
builds at Travis ('pu' seems to fail the test for totally different
reason, though):

    +brew link gcc@8
    Error: No such keg: /usr/local/Cellar/gcc@8

    cf. https://travis-ci.org/git/git/jobs/601697903

Thanks.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, SZEDER Gábor wrote (reply to this):

On Wed, Oct 23, 2019 at 07:05:04PM +0900, Junio C Hamano wrote:
> "Johannes Schindelin via GitGitGadget" <[email protected]>
> writes:
> 
> > From: Johannes Schindelin <[email protected]>
> >
> > The Azure Pipelines builds are failing for macOS due to a change in the
> > location of the perforce cask. The command outputs the following error:
> >
> >     + brew install caskroom/cask/perforce
> >     Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.
> > ...
> > In any case, as the error message at the top of this commit message
> > shows, 'brew install caskroom/cask/perforce' has stopped working
> > recently, but 'brew cask install perforce' still does, so let's use
> > that.
> 
> It appears that OSX jobs at Travis are getting hit by this issue.
> Here is what our failed build ends with, for example:
> 
>     +brew install caskroom/cask/perforce
>     Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.
> 
>     cf. https://travis-ci.org/git/git/jobs/601697815
> 
> Today's 'pu' has this topic queued, and it seems to help even the
> builds at Travis ('pu' seems to fail the test for totally different
> reason, though):
> 
>     +brew link gcc@8
>     Error: No such keg: /usr/local/Cellar/gcc@8
> 
>     cf. https://travis-ci.org/git/git/jobs/601697903

Yeah, that's a new one, so we don't get too bored.  We'll need the
patch below as well:

 --- >8 ---

Subject: [PATCH] ci: fix GCC install in the GCC OSX job

A few days ago Travis CI updated their existing OSX images, including
the Homebrew database in the xcode10.1 OSX image that we use.  Since
then installing dependencies in the 'osx-gcc' job fails when it tries
to link gcc@8:

  + brew link gcc@8
  Error: No such keg: /usr/local/Cellar/gcc@8

Apparently 'brew link gcc' works, so let's do that then, and fall back
to linking gcc@8 if it doesn't.

Signed-off-by: SZEDER Gábor <[email protected]>
---
 ci/install-dependencies.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index ce149ed39c..4e64a19112 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -48,6 +48,7 @@ osx-clang|osx-gcc)
 	brew install caskroom/cask/perforce
 	case "$jobname" in
 	osx-gcc)
+		brew link gcc ||
 		brew link gcc@8
 		;;
 	esac
-- 
2.24.0.rc0.502.g7008375535

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, SZEDER Gábor wrote (reply to this):

A few days ago Travis CI updated their existing OSX images, including
the Homebrew database in the xcode10.1 OSX image that we use.  Since
then installing dependencies in the 'osx-gcc' job fails when it tries
to link gcc@8:

  + brew link gcc@8
  Error: No such keg: /usr/local/Cellar/gcc@8

GCC8 is still installed but not linked to '/usr/local' in the updated
image, as it was before this update, but now we have to link it by
running 'brew link gcc'.  So let's do that then, and fall back to
linking gcc@8 if it doesn't, just to be sure.

Our builds on Azure Pipelines are unaffected by this issue.  The OSX
image over there doesn't contain the gcc@8 package, so we have to
'brew install' it, which already takes care of linking it to
'/usr/local'.  After that the 'brew link gcc' command added by this
patch fails, but the ||-chained fallback 'brew link gcc@8' command
succeeds with an "already linked" warning.

Signed-off-by: SZEDER Gábor <[email protected]>
---

Same patch, updated commit message.

 ci/install-dependencies.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index ce149ed39c..4e64a19112 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -48,6 +48,7 @@ osx-clang|osx-gcc)
 	brew install caskroom/cask/perforce
 	case "$jobname" in
 	osx-gcc)
+		brew link gcc ||
 		brew link gcc@8
 		;;
 	esac
-- 
2.24.0.rc0.502.g7008375535

dscho added a commit to git-for-windows/git that referenced this pull request Oct 23, 2019
We need this to make the CI/PR builds green. This was also submitted to
git.git via gitgitgadget#400 (which already
made it to `next` and hopefully will make it into v2.24.0-rc1).

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member

dscho commented Oct 24, 2019

Seems that this made it into master: 0eb3671 (no idea why GitGitGadget missed that update, and I sadly lack the time to investigate that, still busy with -rc1 work).

@dscho dscho closed this Oct 24, 2019
dscho added a commit to git-for-windows/git that referenced this pull request Oct 25, 2019
We need this to make the CI/PR builds green. This was also submitted to
git.git via gitgitgadget#400 (which already
made it to `next` and hopefully will make it into v2.24.0-rc1).

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git that referenced this pull request Oct 30, 2019
We need this to make the CI/PR builds green. This was also submitted to
git.git via gitgitgadget#400 (which already
made it to `next` and hopefully will make it into v2.24.0-rc1).

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git that referenced this pull request Nov 2, 2019
We need this to make the CI/PR builds green. This was also submitted to
git.git via gitgitgadget#400 (which already
made it to `next` and hopefully will make it into v2.24.0-rc1).

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git that referenced this pull request Nov 6, 2019
We need this to make the CI/PR builds green. This was also submitted to
git.git via gitgitgadget#400 (which already
made it to `next` and hopefully will make it into v2.24.0-rc1).

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git that referenced this pull request Nov 16, 2019
We need this to make the CI/PR builds green. This was also submitted to
git.git via gitgitgadget#400 (which already
made it to `next` and hopefully will make it into v2.24.0-rc1).

Signed-off-by: Johannes Schindelin <[email protected]>
@@ -40,6 +40,11 @@ osx-clang|osx-gcc)
test -z "$BREW_INSTALL_PACKAGES" ||
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, SZEDER Gábor wrote (reply to this):

On Wed, Oct 23, 2019 at 12:19:38AM +0000, Johannes Schindelin via GitGitGadget wrote:
> CI servers are typically fresh virtual machines, but not always. To
> accommodate for that, let's try harder if `brew cask install perforce`
> fails, by specifically pulling the latest `master` of the
> `homebrew-cask` repository.

> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> index 85a9d6b15c..ce149ed39c 100755
> --- a/ci/install-dependencies.sh
> +++ b/ci/install-dependencies.sh
> @@ -40,6 +40,11 @@ osx-clang|osx-gcc)
>  	test -z "$BREW_INSTALL_PACKAGES" ||
>  	brew install $BREW_INSTALL_PACKAGES
>  	brew link --force gettext
> +	brew cask install perforce || {
> +		# Update the definitions and try again
> +		git -C "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask pull &&

In the build of v2.24.0 this 'git pull' printed just short of 600
lines worth of diffstat.  Two weeks went by since then, and in today's
'pu' build that diffstat is already over 1000 lines long.

Perhaps we could use --quiet here, though that would suppress the
transfer progress as well.

> +		brew cask install perforce
> +	} ||
>  	brew install caskroom/cask/perforce
>  	case "$jobname" in
>  	osx-gcc)
> -- 
> gitgitgadget

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Johannes Schindelin wrote (reply to this):

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-377742872-1574197178=:15956
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi G=C3=A1bor,

On Mon, 18 Nov 2019, SZEDER G=C3=A1bor wrote:

> On Wed, Oct 23, 2019 at 12:19:38AM +0000, Johannes Schindelin via GitGit=
Gadget wrote:
> > CI servers are typically fresh virtual machines, but not always. To
> > accommodate for that, let's try harder if `brew cask install perforce`
> > fails, by specifically pulling the latest `master` of the
> > `homebrew-cask` repository.
>
> > diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> > index 85a9d6b15c..ce149ed39c 100755
> > --- a/ci/install-dependencies.sh
> > +++ b/ci/install-dependencies.sh
> > @@ -40,6 +40,11 @@ osx-clang|osx-gcc)
> >  	test -z "$BREW_INSTALL_PACKAGES" ||
> >  	brew install $BREW_INSTALL_PACKAGES
> >  	brew link --force gettext
> > +	brew cask install perforce || {
> > +		# Update the definitions and try again
> > +		git -C "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask p=
ull &&
>
> In the build of v2.24.0 this 'git pull' printed just short of 600
> lines worth of diffstat.  Two weeks went by since then, and in today's
> 'pu' build that diffstat is already over 1000 lines long.
>
> Perhaps we could use --quiet here, though that would suppress the
> transfer progress as well.

Isn't there an option to suppress the diffstat specifically?

*clicketyclick*

Ah yes: we can just pass `-c merge.stat=3Dfalse` to that `pull` command.

Feel free to submit a patch, as I won't really have time to take care of
this any time soon.

Ciao,
Dscho

> > +		brew cask install perforce
> > +	} ||
> >  	brew install caskroom/cask/perforce
> >  	case "$jobname" in
> >  	osx-gcc)
> > --
> > gitgitgadget
>

--8323328-377742872-1574197178=:15956--

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

Johannes Schindelin <[email protected]> writes:

>> > +	brew cask install perforce || {
>> > +		# Update the definitions and try again
>> > +		git -C "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask=
 pull &&
>>
>> In the build of v2.24.0 this 'git pull' printed just short of 600
>> lines worth of diffstat.  Two weeks went by since then, and in today's
>> 'pu' build that diffstat is already over 1000 lines long.
>>
>> Perhaps we could use --quiet here, though that would suppress the
>> transfer progress as well.
>
> Isn't there an option to suppress the diffstat specifically?

-- >8 --
Subject: ci(osx): update homebrew-cask repository with less noise

The OSX CI build procedure updates the homebrew-cask repository
before attempting to install perforce again, after seeing an
installation failure.  This involves a "git pull" that by default
computes and outputs diffstat, which would only grow as the time
goes by and the repository cast in stone in the CI build image
becomes more and more stale relative to the upstream repository in
the outside world.

Suppress the diffstat to both save cycles to generate it, and strain
on the eyeballs to skip it.

Reported-by: SZEDER G=C3=A1bor <[email protected]>
Helped-by: Johannes Schindelin <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
---
 ci/install-dependencies.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 4e64a19112..b6b4f4707f 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -42,7 +42,8 @@ osx-clang|osx-gcc)
 	brew link --force gettext
 	brew cask install perforce || {
 		# Update the definitions and try again
-		git -C "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask pull=
 &&
+		cask_repo=3D"$(brew --repository)"/Library/Taps/homebrew/homebrew-cask=
 &&
+		git -C "$cask_repo" pull --no-stat &&
 		brew cask install perforce
 	} ||
 	brew install caskroom/cask/perforce

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Johannes Schindelin wrote (reply to this):

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-1389521074-1574247578=:15956
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi Junio,

On Wed, 20 Nov 2019, Junio C Hamano wrote:

> -- >8 --
> Subject: ci(osx): update homebrew-cask repository with less noise
>
> The OSX CI build procedure updates the homebrew-cask repository
> before attempting to install perforce again, after seeing an
> installation failure.  This involves a "git pull" that by default
> computes and outputs diffstat, which would only grow as the time
> goes by and the repository cast in stone in the CI build image
> becomes more and more stale relative to the upstream repository in
> the outside world.
>
> Suppress the diffstat to both save cycles to generate it, and strain
> on the eyeballs to skip it.
>
> Reported-by: SZEDER G=C3=A1bor <[email protected]>
> Helped-by: Johannes Schindelin <[email protected]>
> Signed-off-by: Junio C Hamano <[email protected]>
> ---
>  ci/install-dependencies.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> index 4e64a19112..b6b4f4707f 100755
> --- a/ci/install-dependencies.sh
> +++ b/ci/install-dependencies.sh
> @@ -42,7 +42,8 @@ osx-clang|osx-gcc)
>  	brew link --force gettext
>  	brew cask install perforce || {
>  		# Update the definitions and try again
> -		git -C "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask pul=
l &&
> +		cask_repo=3D"$(brew --repository)"/Library/Taps/homebrew/homebrew-cas=
k &&
> +		git -C "$cask_repo" pull --no-stat &&

Even better! I missed that option because I usually read
`Documentation/git-<command>.txt` directly, and of course that is in the
included `Documentation/merge-options.txt`...

Thank you,
Dscho

>  		brew cask install perforce
>  	} ||
>  	brew install caskroom/cask/perforce
>

--8323328-1389521074-1574247578=:15956--

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

Johannes Schindelin <[email protected]> writes:

>> Subject: ci(osx): update homebrew-cask repository with less noise
>>
>> The OSX CI build procedure updates the homebrew-cask repository
>> before attempting to install perforce again, after seeing an
>> installation failure.  This involves a "git pull" that by default
>> computes and outputs diffstat, which would only grow as the time
>> goes by and the repository cast in stone in the CI build image
>> becomes more and more stale relative to the upstream repository in
>> the outside world.
>>
>> Suppress the diffstat to both save cycles to generate it, and strain
>> on the eyeballs to skip it.
>>
>> Reported-by: SZEDER G=C3=A1bor <[email protected]>
>> Helped-by: Johannes Schindelin <[email protected]>
>> Signed-off-by: Junio C Hamano <[email protected]>

Log of tonight's 'pu' https://travis-ci.org/git/git/jobs/614370507
shows me that this did the job, compared to tonight's 'next' that
does not have it, https://travis-ci.org/git/git/jobs/614370474

So let me merge it down to 'next' and further soonish.

Thanks.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, SZEDER Gábor wrote (reply to this):

On Wed, Nov 20, 2019 at 10:18:39AM +0900, Junio C Hamano wrote:
> Subject: ci(osx): update homebrew-cask repository with less noise
> 
> The OSX CI build procedure updates the homebrew-cask repository
> before attempting to install perforce again, after seeing an
> installation failure.  This involves a "git pull" that by default
> computes and outputs diffstat, which would only grow as the time
> goes by and the repository cast in stone in the CI build image
> becomes more and more stale relative to the upstream repository in
> the outside world.

Minor clarification: I, too, thought that the CI build images are cast
in stone, but the Travis CI build images are definitely not (don't
know about Azure Pipelines), but receive smaller updates from time to
time, including updates to their Homebrew database.  Such a recent
update necessitated commit 7d4733c501 (ci: fix GCC install in the
Travis CI GCC OSX job, 2019-10-24).  I contacted Travis CI support
about it, and they confirmed.

> Suppress the diffstat to both save cycles to generate it, and strain
> on the eyeballs to skip it.
> 
> Reported-by: SZEDER Gábor <[email protected]>
> Helped-by: Johannes Schindelin <[email protected]>
> Signed-off-by: Junio C Hamano <[email protected]>
> ---
>  ci/install-dependencies.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> index 4e64a19112..b6b4f4707f 100755
> --- a/ci/install-dependencies.sh
> +++ b/ci/install-dependencies.sh
> @@ -42,7 +42,8 @@ osx-clang|osx-gcc)
>  	brew link --force gettext
>  	brew cask install perforce || {
>  		# Update the definitions and try again
> -		git -C "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask pull &&
> +		cask_repo="$(brew --repository)"/Library/Taps/homebrew/homebrew-cask &&
> +		git -C "$cask_repo" pull --no-stat &&

Oh, a '--no-stat' option; I looked at the man page, but stopped
scrolling after finding '--quiet'...

The patch looks obviously good, thanks.

>  		brew cask install perforce
>  	} ||
>  	brew install caskroom/cask/perforce

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

SZEDER G=C3=A1bor <[email protected]> writes:

> On Wed, Nov 20, 2019 at 10:18:39AM +0900, Junio C Hamano wrote:
>> ...
>> computes and outputs diffstat, which would only grow as the time
>> goes by and the repository cast in stone in the CI build image
>> becomes more and more stale relative to the upstream repository in
>> the outside world.
>
> Minor clarification: I, too, thought that the CI build images are cast
> in stone, but the Travis CI build images are definitely not (don't
> know about Azure Pipelines), but receive smaller updates from time to
> time, including updates to their Homebrew database.  Such a recent
> update necessitated commit 7d4733c501 (ci: fix GCC install in the
> Travis CI GCC OSX job, 2019-10-24).  I contacted Travis CI support
> about it, and they confirmed.

I do recall that their images are moving targets and updates to them
did disrupt our tasks in the past.  How about

    ..., which would grow as the repository that comes with the CI
    build image goes stale relative to ...

to tone it down?

Thanks.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Johannes Schindelin wrote (reply to this):

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-817254985-1574334774=:31080
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi,

On Wed, 20 Nov 2019, SZEDER G=C3=A1bor wrote:

> On Wed, Nov 20, 2019 at 10:18:39AM +0900, Junio C Hamano wrote:
> > Subject: ci(osx): update homebrew-cask repository with less noise
> >
> > The OSX CI build procedure updates the homebrew-cask repository
> > before attempting to install perforce again, after seeing an
> > installation failure.  This involves a "git pull" that by default
> > computes and outputs diffstat, which would only grow as the time
> > goes by and the repository cast in stone in the CI build image
> > becomes more and more stale relative to the upstream repository in
> > the outside world.
>
> Minor clarification: I, too, thought that the CI build images are cast
> in stone, but the Travis CI build images are definitely not (don't
> know about Azure Pipelines),

Judging from
https://github.com/microsoft/azure-pipelines-image-generation/commits/mast=
er/images/macos/macos-10.14-Readme.md
it looks like they are updated weekly, although I have to admit that I do
not know whether the Homebrew packages are updated as regularly (I would
wager they are). The latest update to Homebrew itself came in 21 days ago:
https://github.com/microsoft/azure-pipelines-image-generation/commit/866b3=
68747a064f22ecfb7061e9034e3e21c63d4#diff-fb7f82d5a779a32aabccaad5bb9ab35c

Ciao,
Johannes

--8323328-817254985-1574334774=:31080--

dscho added a commit to git-for-windows/git that referenced this pull request Nov 25, 2019
We need this to make the CI/PR builds green. This was also submitted to
git.git via gitgitgadget#400 (which already
made it to `next` and hopefully will make it into v2.24.0-rc1).

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to git-for-windows/git that referenced this pull request Nov 26, 2019
We need this to make the CI/PR builds green. This was also submitted to
git.git via gitgitgadget#400 (which already
made it to `next` and hopefully will make it into v2.24.0-rc1).

Signed-off-by: Johannes Schindelin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants