- last update
11 months ago Patch Failed to Apply - last update
11 months ago Patch Failed to Apply - π¨π¦Canada joseph.olstad
@sylus, curious to know, which patch did you reroll from? #87 ?
- last update
11 months ago Build Successful - last update
11 months ago 25,781 pass, 1,822 fail - π¨π¦Canada joseph.olstad
Re-queuing tests for 10.2.x , I did a dry run myself, should be no issue applying. We'll see what the results give.
- π¨π¦Canada joseph.olstad
The test failures appear to be a result of some issue with the ci test runner.
Error found: No space left on device
Perhaps turn this into a merge request and use the gitlab pipeline instead
- Merge request !6622Issue #2559833 by piggito, mohit_aghera, larowlan, guptahemant, vakulrai,... β (Closed) created by joseph.olstad
- Status changed to Needs review
10 months ago 11:33pm 15 February 2024 - π¨π¦Canada joseph.olstad
9 years, we've been using this for likely at least 6 years.
The WxT distribution is still using this fix, between 200 and 300 installs (likely many more installs that have uninstalled the update module and aren't reporting), multiple public sector organizations, multiple installs in each organization.
- Status changed to Needs work
10 months ago 1:41am 17 February 2024 - Status changed to Needs review
10 months ago 1:51am 18 February 2024 - πΊπΈUnited States smustgrave
Removed some unused services that were being added. Tests are green thoughts on the change?
- πΊπΈUnited States smustgrave
@joseph.olstad mentioned you've been using this patch for a while. Did the changes in the MR continue to work for you?
- π¨π¦Canada joseph.olstad
@smustgrave, I am unable to test MR 6622
This merge request is way behind head of any current releases and has conflicts with- the HEAD of 10.1.x
- the HEAD of 10.2.x
- the HEAD of 10.3.x
- the HEAD of 11.x
ββββΆ πβΆ β°β― $ patch -p1 --dry-run < 6622.patch
checking file core/modules/comment/comment.services.yml checking file core/modules/comment/src/CommentForm.php checking file core/modules/comment/src/CommentLazyBuilders.php checking file core/modules/comment/tests/src/Functional/CommentBlockTest.php Hunk #1 succeeded at 4 (offset 2 lines). Hunk #2 succeeded at 24 (offset 2 lines). Hunk #3 succeeded at 102 (offset 2 lines). checking file core/modules/comment/tests/src/Functional/CommentTestBase.php Hunk #1 succeeded at 188 (offset 2 lines). checking file core/modules/comment/src/CommentForm.php Hunk #1 FAILED at 7. Hunk #2 FAILED at 49. Hunk #3 FAILED at 101. Hunk #4 FAILED at 113. Hunk #5 FAILED at 160. Hunk #6 FAILED at 458. 6 out of 6 hunks FAILED checking file core/modules/comment/src/CommentLazyBuilders.php Reversed (or previously applied) patch detected! Assume -R? [n]
- π¨π¦Canada joseph.olstad
ah, nevermind, I tried git apply and it went in clean.
- π¨π¦Canada joseph.olstad
The merge request applies cleanly against 11.x and 10.3.x but not 10.2.x.
- Status changed to RTBC
9 months ago 1:51am 11 March 2024 - π¨π¦Canada joseph.olstad
Reviewed the code, it's functionally the same as patch 100 except rerolled.
Test coverage is added and all tests are passing.
Also, phpcs seems to be happy with this.
- Status changed to Needs work
9 months ago 10:51pm 23 March 2024 - π¬π§United Kingdom alexpott πͺπΊπ
If I revert all the changes to core/modules/comment/src/CommentForm.php the tests still pass and reading the code I'm not sure why we're making those changes.
- π¨π¦Canada joseph.olstad
@alexpott, I responded to your concern and pushed up a new commit. Pipeline is running.
- Status changed to Needs review
8 months ago 8:44pm 24 March 2024 - π¨π¦Canada joseph.olstad
LOL, reverting my last commit, that code in question actually does do something.
- π¨π¦Canada joseph.olstad
Hmm, so on "17 February 2024" , the merge request was passing.
I made which seems like a reasonable change to make, the tests fail the failure actually might look like a test bot or ci issue not the actual MR.
Then I reverted the "reasonable" change, same result.
So, it looks like something outside of this merge request changed between February 17th 2024 and today that is affecting the unit tests.
- π¨π¦Canada joseph.olstad
Rebased with the latest 10.3.x
I had a look at patch 100, this is the patch that we've been using for several years.
The code in patch 100 is as follows:
@@ -411,7 +448,11 @@ public function save(array $form, FormStateInterface $form_state) { $this->messenger()->addError($this->t('Comment: unauthorized comment submitted or comment submitted to a closed post %subject.', ['%subject' => $comment->getSubject()])); // Redirect the user to the entity they are commenting on. } - $form_state->setRedirectUrl($uri); + $entity_url = $entity->toUrl(); + if ($entity_url->getRouteName() === $this->routeMatch->getRouteName() && + $entity_url->getRouteParameters() === $this->routeMatch->getRawParameters()) { + $form_state->setRedirectUrl($uri); + } } }
but the code in the MR is like this:
- $form_state->setRedirectUrl($uri); + $entity_url = $entity->toUrl(); + if ($entity_url->getRouteName() === $this->routeMatch->getRouteName() && + $entity_url->getRouteParameters() === $this->routeMatch->getRawParameters()) { + $form_state->setRedirectUrl($uri); + } + $form_state->setRedirectUrl($uri);
Somewhere between patch 100 and the current MR, things went weird.
Specifically according to git blame it is the feb 17th commit by smustgrave f522c159ac3a that brought in this change.
So I pushed up dropping the last setRedirectUrl so that the preceding condition becomes once again meaningful.
- π¨π¦Canada joseph.olstad
ah crap, I made a mistake using 10.3.x , sorry folks
- π¨π¦Canada joseph.olstad
I should have checked that the MR was against 11.x not 10.3.x
Sorry about this. what a mess I just made! - Merge request !7171Resolve #2559833 "Comment form should redirect" β (Open) created by joseph.olstad
- π¨π¦Canada joseph.olstad
ok @smustgrave, I did my best to recuperate your work into the MR 7177 , cherry-picking commits into it.
MR 7177 is based from 11.x
10.3.x was accidentally merged into 6922 by me, sorry.
Trying to fix this up with 7177.
- π¨π¦Canada joseph.olstad
The current failure is completely unrelated to what we're doing here.
Suspect something is going on with the ci system or maybe a patch that was pushed into 11.x
core/tests/Drupal/Tests/Component/Scaffold/Functional/ManageGitIgnoreTest.php
- Status changed to Needs work
8 months ago 2:54pm 26 March 2024 - πΊπΈUnited States smustgrave
Tried rebasing but still getting multiple test failures :(
- π¨π¦Canada joseph.olstad
Current test failures:
1. related to MR 7171
Exception Other phpunit-162.xml 0 Drupal\Tests\comment\Functional\Vie PHPUnit Test failed to complete; Error: PHPUnit 9.6.15 by Sebastian Bergmann and contributors. Testing Drupal\Tests\comment\Functional\Views\CommentAdminTest E. 2 / 2 (100%) Time: 00:24.360, Memory: 4.00 MB There was 1 error: 1) Drupal\Tests\comment\Functional\Views\CommentAdminTest::testApprovalAdminInterface Behat\Mink\Exception\ResponseTextException: The text "zsjfmfvf" was not found anywhere in the text of the current page.
2. This one possibly unrelated(?)
---- Drupal\Tests\filter\Functional\FilterHtmlImageSecureTest ---- Status Group Filename Line Function -------------------------------------------------------------------------------- Fail Other phpunit-172.xml 0 Drupal\Tests\filter\Functional\Filt PHPUnit Test failed to complete; Error: PHPUnit 9.6.15 by Sebastian Bergmann and contributors. Testing Drupal\Tests\filter\Functional\FilterHtmlImageSecureTest F 1 / 1 (100%) Time: 00:06.514, Memory: 4.00 MB There was 1 failure: 1) Drupal\Tests\filter\Functional\FilterHtmlImageSecureTest::testImageSource http://localhost/subdirectory/core/misc/druplicon.png was found. Failed asserting that false is true.