Problem/Motivation
Drupal\Tests\automatic_updates\Build\CoreUpdateTest::testApi is failing on 8.x-2.x
found while working on https://www.drupal.org/project/automatic_updates/issues/3354827
Steps to reproduce
Proposed resolution
Make it pass.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork automatic_updates-3358878
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
yash.rode commentedComment #4
yash.rode commentedComment #5
wim leersTests are passing on
9.5.x, so clarifying.Comment #6
wim leers10.1failures, see commit fb6d0d7f5ae3ca612a93b755716c23de4c15acd2 for #3314137: Make Automatic Updates Drupal 10-compatible.10.0.5failure: I bet that this is due to 10.0.5 itself being insecure (10.0.8 is a security release). That in turn means that the test is NOT actually testing a mocked core version. I previously discovered this >3 months ago and reported it: #3337049: Assert no errors after creating the test project in ModuleUpdateTest.Comment #7
wim leersBased on the red test runs on
10.0.5and the green ones after88a29e25 - fix from 3320792(that message is misleading, because it's actually a fix copied from the MR at #3337049! 😅🙈) I think we can conclude that #3337049: Assert no errors after creating the test project in ModuleUpdateTest is a must-have now, for both the8.x-3.xbranch (that issue) and8.x-2.x(this issue).Comment #8
yash.rode commentedtests for 10.0.5 are passing now but for the fix recommended in #6 for 10.1 was already part of the upstream and it is not able to fix the test failures on Drupal 10.1.
Comment #9
wim leershttps://git.drupalcode.org/project/automatic_updates/-/merge_requests/86... is not the solution I suggested in #6 😅
I referred to https://git.drupalcode.org/project/automatic_updates/-/merge_requests/52....
Why that commit?
Because the test failure you're seeing on this issue for
10.1has this output:and that commit contains:
… but turns out that that is already present in the
8.x-2.xbranch too…Notice how the only difference is
symfony/polyfill-php80vssymfony/polyfill-php81? Let's apply the same pattern for10.1and that new version :)Comment #10
yash.rode commentedI think the test failure is because, we are not mocking the core version which we did in this? but I am not sure if this is the actual problem and I tried using mockActiveCoreVersion() to set the core version but it's not able to find the 'update_test.settings' schema.
Comment #11
wim leersWhere is this
mockActiveCoreVersion()? It's not in the MR.The remaining failure is
Line 77 of that test.
These are lines 70 through 77:
So we see that a key-value pair for the key
status_check_last_runexists, despite it NOT being expected.So what is setting it? When is that happening? The comments on lines 70–75 provide helpful pointers and have commit/issue history associated with them.
Please follow the breadcrumbs. This is also what @tedbow, @phenaproxima or I would need to do!
Comment #12
yash.rode commented#3314137-20: Make Automatic Updates Drupal 10-compatible is mind blowing, trying to catch up with it.
Comment #13
yash.rode commentedAs discussed in https://www.drupal.org/project/automatic_updates/issues/3314137#comment-...
for 10.1 now it works same as it used to work for 9.5 I tried locally and step 4. which triggers
automatic_updates_modules_installed()is happening now for 10.1 also, so I think we should be re-rolling the fix for this test.Comment #14
yash.rode commented#13 is causing the failure in 10.0.5 and 9.5.
Comment #15
yash.rode commentedDiscussed this in the meet just now and we(@phenaproxima and @tedbow) have decided to add a workaround for now as 8.x-2.x is not maintained. doing that in the next commit.
Comment #16
yash.rode commentedComment #17
wim leersAlmost there!
Now this just needs to pass the code quality checks 😊 As soon as those pass too, this is RTBC!
Comment #18
yash.rode commentedComment #19
wim leersComment #22
tedbow@yash.rode @Wim Leers thanks for working on this. Good to get the 8.x-2.x tests passing again!