- Issue created by @tedbow
- last update
over 1 year ago 798 pass - @tedbow opened merge request.
- Status changed to Needs review
over 1 year ago 4:30pm 31 May 2023 - last update
over 1 year ago 798 pass - last update
over 1 year ago 799 pass - πΊπΈUnited States tedbow Ithaca, NY, USA
Ok added a test. The test fails on 3.0.x
- last update
over 1 year ago 799 pass - Status changed to RTBC
over 1 year ago 5:33pm 31 May 2023 - last update
over 1 year ago 799 pass -
phenaproxima β
committed 7e87dcff on 3.0.x authored by
tedbow β
Issue #3363937 by tedbow: Failure marker file should be excluded using a...
-
phenaproxima β
committed 7e87dcff on 3.0.x authored by
tedbow β
- Status changed to Fixed
over 1 year ago 5:50pm 31 May 2023 - Status changed to Needs work
over 1 year ago 1:29pm 1 June 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
- How is it possible that this was never noticed? π±
- How will we prevent this from reoccurring in the future? (No generic test coverage was added here, only test coverage for this one specific case.)
\PhpTuf\ComposerStager\Domain\Value\PathList\PathListInterface::add()
has as a default implementation\PhpTuf\ComposerStager\Infrastructure\Value\PathList\PathList::add()
which looks like this:public function add(array $paths): void { $this->assertValidInput($paths); $this->paths = array_merge($this->paths, $paths); }
which does:
/** * @param array<string> $paths * * @throws \PhpTuf\ComposerStager\Domain\Exception\InvalidArgumentException */ private function assertValidInput(array $paths): void { foreach ($paths as $path) { /** @psalm-suppress DocblockTypeContradiction */ if (!is_string($path)) { $given = is_object($path) ? $path::class : gettype($path); throw new InvalidArgumentException(sprintf( 'Paths must be strings. Given %s.', $given, )); } } }
So it just validates that it receives strings. Not relative paths. IOW: this needs an upstream bugfix in Composer Stager, because the input validation is inadequate.
Reopening for that.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
β¦ and we need a follow-up to either convert the test that was added here to a generic test, or to remove the test that was introduced here.
- Assigned to tedbow
- πΊπΈUnited States tedbow Ithaca, NY, USA
Yep sorry I meant make upstream bug report.
from chatting with @travis.carden the intend behavior for exclusions is
- Paths can be relative or absolute
- but absolute paths should only be used if they are within the source directory.
In our case on
apply()
the source directory is our stage directory so this should have always been relative.Not sure why this worked before with php. The rsync copier acts as intended.
will make follow-ups
- πΊπΈUnited States tedbow Ithaca, NY, USA
Upstream follow-up Exclude paths act differently between PHP and Rsync file copier
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
but absolute paths should only be used if they are within the source directory.
Makes sense. And that's indeed the upstream bug. Clarified that at https://github.com/php-tuf/composer-stager/issues/176#issuecomment-15733....
- Issue was unassigned.
- Status changed to Fixed
over 1 year ago 5:13pm 21 June 2023 - πΊπΈUnited States tedbow Ithaca, NY, USA
Closing since we have upstream issue
- Assigned to tedbow
- Status changed to Needs review
over 1 year ago 10:01am 5 July 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
In which issue did Automatic Updates start requiring a Composer Stager version that includes this fix, which is what allowed us to close this?
- πΊπΈUnited States tedbow Ithaca, NY, USA
We can leave this open for committing the requirement change when https://github.com/php-tuf/composer-stager/issues/176 is committed.
I think though we should consider why
CollectPathsToExcludeEvent
needs to implementPathListInterface
.PathListInterface
only has to methodsgetAll()
andadd()
for
add() we already have 2 methods on <code>CollectPathsToExcludeEvent
,addPathsRelativeToWebRoot()
andaddPathsRelativeToProjectRoot()
so we never callCollectPathsToExcludeEvent::add()
- Issue was unassigned.
- πΊπΈUnited States phenaproxima Massachusetts
I suspect this is now a duplicate of π FailureMarker should be responsible for excluding the marker file from stage operations Fixed .
- Status changed to Closed: duplicate
over 1 year ago 6:24pm 6 September 2023 - πΊπΈUnited States phenaproxima Massachusetts
This is a duplicate of a fixed issue, which had upstream aspects which were also corrected months ago. I think this is thoroughly done.