Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Problem/Motivation
https://www.drupal.org/pift-ci-job/2795252
There was just a doc block change that triggered the tests. On retest it passed
There error comes from the first line
$this->assertExpectedStageEventsFired(ConsoleUpdateStage::class, wait: 360);
$this->assertCronUpdateSuccessful();
My guess is the 360 wait not long enough because by the events logged we have not gotten to post-apply.
the other possibility is that randomly there is something that goes wrong with the apply.
but I am leaning towards the wait not being long enough because I have only seen this with cron related build tests we just have to wait and don't get intermittent UI checks.
Steps to reproduce
Proposed resolution
- Run a test run here of just testAutomatedCron but run say 50 times. See if we get random fails
- Try increase wait time and see if it goes away, We could also decrease the wait time and see if it happens more
- If the longer wait time makes the problem go away just increase the wait time.
\Drupal\Tests\package_manager\Build\TemplateProjectTestBase::assertExpectedStageEventsFired
checks every 5 seconds if all the event have fired so increasing the wait time should not actually make the test run longer in most cases(as we very rarely see this error)
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#7 | Screenshot 2024-09-24 at 10.21.26 AM.png | 159.54 KB | samit.310@gmail.com |
Issue fork automatic_updates-3397228
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
tedbowHmmm. with 50 test runs the current tests don't fail.
I think lets just keep an on out for more random failures and re-open this issue if needed
I also wonder if when we finally drop support for Drupalci if this will not happen on gitlabci
Comment #4
tedbowI think this happening again now that we are using gitlab ci https://git.drupalcode.org/project/automatic_updates/-/jobs/1113256
example
Comment #5
tedbowok this is very confusing.
was being hit. but the actually was showing up because
$unknown_packages
was was just strings so\Drupal\package_manager\ValidationResult::__construct
threw an exception because ofassert(Inspector::assertAll(fn ($message) => $message instanceof TranslatableMarkup, $messages));
I fixed this problem by
$unknown_packages
was an array of translatable objects.This would at least let us see what packages where in
$unknown_packages
. Basically why did randomly 1 out of 20 times did\Drupal\Tests\automatic_updates\Build\CoreUpdateTest::testApi
fail.which led to.....
So now that the translation problem has been solved we can see the actual
$unknown_packages
that where change 1 in 20 times of running this test.So we have 2 validation errors here:
StagedProjectsValidator:
and
\Drupal\package_manager\Validator\SupportedReleaseValidator
This is because there is no
project
key in the info file even though it is adrupal-module
since we testing from the git clone.Comment #7
samit.310@gmail.com CreditAttribution: samit.310@gmail.com at Material for Drupal India Association commentedHello,
Fixed the conflicts and refactor the test cases code,
Following test cases are getting failed, not sure why, as i am not able to view errors in the pipeline. getting
The current user is not authorized to access the job log.
error, Attaching the screenshot.Thanks
Samit K.