- Issue created by @tcrawford
The artifact deployment tool sensibly does a shall clone/fetch of the artifact repository.
This causes platform.sh to error (not on the first, but on subsequent pushes).
This is a known issue with platform.sh: https://support.platform.sh/hc/en-us/requests/332594?page=1
Push to an existing branch.
Get error:
send-pack: unexpected disconnect while reading sideband packet.
fatal: the remote end hung up unexpectedly
At present I have just removed the shallow clone with a local project patch.
Should we consider making the shallow clone optional? I am happy to do this pending on your feedback.
The patch is on top of another patch for issue #3481055 and I have not yet created a clean patch against the head of this branch.
From 5f207271da2aa6480a310e08f9701da9cc150b4c Mon Sep 17 00:00:00 2001
From: Trent Crawford <trent.crawford@liip.ch>
Date: Thu, 24 Oct 2024 17:52:02 +0200
Subject: [PATCH] Don't shallow clone as it causes platform.sh to hang up.
---
ArtifactDeploymentCommands.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ArtifactDeploymentCommands.php b/ArtifactDeploymentCommands.php
index ce0cd68..1d83f77 100644
--- a/ArtifactDeploymentCommands.php
+++ b/ArtifactDeploymentCommands.php
@@ -244,14 +244,14 @@ final class ArtifactDeploymentCommands extends DrushCommands {
$outputCallback('out', "Initializing Git in $artifactDir");
$this->localMachineHelper->checkRequiredBinariesExist(['git']);
- $process = $this->localMachineHelper->execute(['git', 'clone', '--depth=1', $vcsUrl, $artifactDir],
+ $process = $this->localMachineHelper->execute(['git', 'clone', $vcsUrl, $artifactDir],
$outputCallback,
NULL,
($this->output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL));
if (!$process->isSuccessful()) {
throw new \RuntimeException(sprintf('Failed to clone repository from the Cloud Platform: %s', $process->getErrorOutput()));
}
- $process = $this->localMachineHelper->execute(['git', 'fetch', '--depth=1', '--update-head-ok', $vcsUrl, $vcsPath . ':' . $vcsPath],
+ $process = $this->localMachineHelper->execute(['git', 'fetch', '--update-head-ok', $vcsUrl, $vcsPath . ':' . $vcsPath],
$outputCallback,
$artifactDir,
($this->output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL));
--
2.47.0
Consider what is the most sustainable solution.
Potential method signatures will change if we make the shallow clone optional.
None
Active
1.0
Code