- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
🐛 GitExcluder should not ignore .git directories that belong to packages installed by Composer Fixed is postponed again on another issue, so matching that increase in blockers.
- Status changed to Active
almost 2 years ago 8:16pm 10 February 2023 - 🇺🇸United States tedbow Ithaca, NY, USA
- Assigned to yash.rode
- Status changed to Needs work
over 1 year ago 11:57am 31 March 2023 - 🇮🇳India yash.rode pune
Before starting with this I have a thought about how can we achieve this,
one way is to check each and every test and destroy the stage where it is not destroyed already.
the other way can be using tearDown() but I don't know how can we get the stage in that case? - 🇮🇳India yash.rode pune
As discussed in meet one ways to do this are,
- In assertResults() we can add a finally block and delete stage in that
- In teardown we can delete the stage directory
- 🇺🇸United States tedbow Ithaca, NY, USA
#12
I think we want to go with 2)but slightly different in tearDown() we should delete `\Drupal\package_manager\PathLocator::getStagingRoot()`
and \Drupal\package_manager\PathLocator::getProjectRoot() but we should only delete getProjectRoot() if is directory that is under `DrupalFileSystem::getOsTemporaryDirectory()` which will be the case if it is created in `\Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase::createTestProject` - 🇺🇸United States phenaproxima Massachusetts
and \Drupal\package_manager\PathLocator::getProjectRoot() but we should only delete getProjectRoot() if is directory that is under `DrupalFileSystem::getOsTemporaryDirectory()` which will be the case if it is created in `\Drupal\Tests\package_manager\Kernel
I think we could probably simplify this; if the project root is not the same as
$this->getDrupalRoot()
, we can delete it. I think this is the case because, in a core clone,$this->getDrupalRoot()
is what the path locator will report as the project root, by default, unless we specifically override it. - @yashrode opened merge request.
- Assigned to tedbow
- 🇮🇳India yash.rode pune
Need help with the test failure,
\Drupal\Tests\package_manager\Kernel\SymlinkValidatorTest::testSymlinkToDirectory
is failing with rmdir(/private/tmp/package_manager_testing_roottest95214460/active): Directory not empty, is it because we are trying to delete symlink? or something else? - Issue was unassigned.
- Status changed to Needs review
over 1 year ago 12:03pm 4 April 2023 - 🇮🇳India yash.rode pune
Right now I am skipping
\Drupal\Tests\package_manager\Kernel\StageOwnershipTest::testStageDestroyedWithFileSystemError
because we are overriding chmod(), unlink(), rmdir() which we need in tearDown(), is there a way to not skip this test? - Status changed to Needs work
over 1 year ago 12:17pm 4 April 2023 - 🇺🇸United States phenaproxima Massachusetts
We shouldn't use the Drupal file_system service to do the delete, precisely because, in some situations, we override and mock it. Instead, we should use Symfony's Filesystem class, which has a
remove()
method which can do this for us cleanly. - Status changed to Needs review
over 1 year ago 12:35pm 5 April 2023 - Assigned to yash.rode
- Status changed to Needs work
over 1 year ago 12:43pm 5 April 2023 - 🇺🇸United States phenaproxima Massachusetts
This looks straightforward but there are some things there that I don't understand why they're necessary...
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 1:25pm 5 April 2023 - Assigned to phenaproxima
- Status changed to Needs work
over 1 year ago 1:29pm 5 April 2023 - 🇺🇸United States phenaproxima Massachusetts
I don't think we want to be modifying permissions of the system-wide temp directory.
If NOT doing that causes some tests to fail, I'd say that points to a flaw in those tests. I will take this on to figure out why we'd need to do that, and fix the affected tests.
- Assigned to tedbow
- Status changed to Needs review
over 1 year ago 4:42pm 5 April 2023 - 🇺🇸United States phenaproxima Massachusetts
Assigning to @tedbow for final review.
- Assigned to phenaproxima
- Status changed to RTBC
over 1 year ago 8:41pm 5 April 2023 - 🇺🇸United States tedbow Ithaca, NY, USA
This looks good. I pushed up 1 commit because there was 1 folder not being deleted. @phenaproxima if this looks good and tests pass, feel free to commit.
-
phenaproxima →
committed 5f9901ee on 3.0.x authored by
yash.rode →
Issue #3334552 by yash.rode, phenaproxima, Wim Leers, tedbow: Ensure...
-
phenaproxima →
committed 5f9901ee on 3.0.x authored by
yash.rode →
- Status changed to Fixed
over 1 year ago 9:19pm 19 April 2023 Automatically closed - issue fixed for 2 weeks with no activity.