Drupal 11 compatibility

Created on 10 October 2024, 8 months ago

Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom nicrodgers Monmouthshire, UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @nicrodgers
  • πŸ‡¬πŸ‡§United Kingdom nicrodgers Monmouthshire, UK

    Created an MR and attached a patch (same thing) with necessary changes for Upgrade Status to be happy.

  • Merge request !7d11 compatibility updates β†’ (Merged) created by nicrodgers
  • πŸ‡¬πŸ‡§United Kingdom nicrodgers Monmouthshire, UK

    You need the D10 compatibility patch as well, from #3289374

  • πŸ‡ΊπŸ‡ΈUnited States sarahwylie

    Combined D10 compatibility patch (from 3289374 πŸ“Œ Automated Drupal 10 compatibility fixes Needs review ) with D11 patch from here. I'm not having any issues with this solution.

  • Merge request !8D10 and D11 updates β†’ (Open) created by sarahwylie
  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States byrond

    I merged the MR from the D10 update (6) into 7 and resolved the conflict.

    This will allow everyone who contributed to them to maintain their commit authorship, as well as eliminate the need to install two conflicting patches.

  • Status changed to Needs review 6 months ago
  • πŸ‡·πŸ‡ΊRussia zniki.ru

    nikolay shapovalov β†’ made their first commit to this issue’s fork.

  • πŸ‡·πŸ‡ΊRussia zniki.ru

    Added gitlab ci integration from πŸ“Œ Adopt Gitlab CI Active to MR 7, to test changes.

  • Pipeline finished with Failed
    6 months ago
    Total: 297s
    #368338
  • Pipeline finished with Failed
    6 months ago
    Total: 303s
    #368346
  • πŸ‡·πŸ‡ΊRussia zniki.ru

    nikolay shapovalov β†’ changed the visibility of the branch D11-fix to hidden.

  • πŸ‡·πŸ‡ΊRussia zniki.ru

    MR 7 and MR 8 are identical, I hide MR 8 branch.
    Let's focus on MR 7.

  • Pipeline finished with Failed
    6 months ago
    Total: 245s
    #368354
  • Pipeline finished with Failed
    6 months ago
    Total: 370s
    #368364
  • Pipeline finished with Failed
    6 months ago
    Total: 247s
    #368372
  • Pipeline finished with Failed
    6 months ago
    #368385
  • πŸ‡·πŸ‡ΊRussia zniki.ru

    I spent some time trying to fix failed tests, but it looks like running tests on my local enviroment and on gitlab ci leads to different results. Not sure the reason. Myabe gitlab-ci.yml need some changes.

  • πŸ‡·πŸ‡ΊRussia zniki.ru

    I found that at Giltab CI used IPv6

    Your current IP address is ::1. If this is wrong, make sure you have the correct header configured in general settings.
    

    Source you can find at artifacts Drupal_Tests_restrict_by_ip_Functional_RedirectTest-14.

  • Pipeline finished with Failed
    6 months ago
    #368562
  • Pipeline finished with Failed
    6 months ago
    #368563
  • Pipeline finished with Failed
    6 months ago
    Total: 132s
    #368569
  • πŸ‡·πŸ‡ΊRussia zniki.ru

    nikolay shapovalov β†’ changed the visibility of the branch 3479940-research-gitlab-tests to hidden.

  • πŸ‡·πŸ‡ΊRussia zniki.ru

    Provide MR review.

  • πŸ‡·πŸ‡ΊRussia zniki.ru

    Hide patch files, please use MR.

  • Assigned to nicrodgers
  • Status changed to Active about 1 month ago
  • πŸ‡¬πŸ‡§United Kingdom nicrodgers Monmouthshire, UK
  • Pipeline finished with Failed
    about 1 month ago
    Total: 279s
    #481121
  • Pipeline finished with Failed
    about 1 month ago
    Total: 206s
    #481136
  • πŸ‡¬πŸ‡§United Kingdom nicrodgers Monmouthshire, UK

    The d10 compatibility patch from https://www.drupal.org/project/restrict_by_ip/issues/3289374 πŸ“Œ Automated Drupal 10 compatibility fixes Needs review has been merged in to 8.x-4.x-dev so i've merged that branch back in to here and resolved the conflicts. This has reduced the number of changes in this issue quite considerably. All but one of the comments on the MR from the last review related to the D10 changes. I've implemented property promotion as per the last review in the relevant file. Setting back to need review.

  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    @nicrodgers hi, new maintainer here. I agree with your assessment on the comments on the MR - I am concerned about the failing phpunit tests though, particularly as this is a module people will be using for security purposes. We need to resolve those before merging any of this.

    It may be that the tests are out of date in some fashion but that needs to be thoroughly researched.

    No stress about the linting errors, those can be a follow-up.

  • πŸ‡¬πŸ‡§United Kingdom nicrodgers Monmouthshire, UK

    @daraven maybe we should revert @nikolay shapovalov's commit in this issue that enables gitlab ci, and add it in a separate issue?

    Whilst I agree having gitlab ci running automated tests would be a great position to be in, we don't have to do it as part of the Drupal 11 compatibility work. If we can get another pair of eyes testing the MR manually then we could get it RTBC'd and a Drupal 11 release shipped. We have been using the MR in production on various high traffic sites without issue for a while now.

  • πŸ‡¬πŸ‡§United Kingdom nicrodgers Monmouthshire, UK

    @daraven - hi, btw :-) huge thanks for taking on maintainership of this module.

  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    @nicrodgers if I was more familiar with the source code I might agree with you but it is a long time since I interacted with or even used this module. I put my hand up to maintain years ago and it just resolved - not a complaint, just explanation. I intend to take my custodial duties seriously.

    The tests are failing which either means:

    • the tests are not D11 compatible, or
    • the ecosystem has changed enough that they're legitimately failing

    It's good to know that you have been using this patch for a long time (and presumably so have others) but I'm not willing to cut a release based on that alone. I want people picking up the module or returning to it to have the most possible confidence in the new release.

    I will be looking at the tests when I can manage to do so, I'm not putting this off awaiting someone else to fix them - though help is welcome :)

  • πŸ‡ΊπŸ‡ΈUnited States rocketeerbkw Austin, Tx

    I just cut beta2 where I fixed/verified all tests as run by phpunit locally. It's certainly possible that chnages would be needed to get tests running on gitlab CI since there is a lot of work needed to mess with IPs and requests.

    But at the least I can confirm that the tests are not bad.

  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    Thanks very much @rocketeerbkw that's really good to know - may I ask which version of core you ran them against?

  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    Tested locally on Drupal 11:

    I can confirm the UI tests are passing locally, happy to let those be a follow-up. However it looks like the destination parameter is overriding the redirect to the access denied page which is something the tests seem to be there to ensure doesn't happen. Going to dig a little deeper into that.

    All other tests are running fine so I don't think we need to mess with IPs and requests.

  • πŸ‡ΊπŸ‡ΈUnited States rocketeerbkw Austin, Tx

    may I ask which version of core you ran them against?

    Sorry that wasn't clear. I was verifying the Drupal 10 issue I merged in march and testing on HEAD, so I used 10.4.7.

    It may be that the tests are out of date in some fashion but that needs to be thoroughly researched.

    I Just wanted to mention here that the tests are working correctly outside of this issue and gitlab CI.

  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    @rocketeerbkw thanks for the follow-up

    I Just wanted to mention here that the tests are working correctly outside of this issue and gitlab CI. I haven't reviewed/tested this issue.

    This is what I took your comment to mean, I really appreciate knowing that they're functioning correctly - my only concern is what may have changed in Drupal 11 that might have caused failures.

    On that note I've tracked down the failure of the redirect test to the redirect function failing when the destination parameter is set to an invalid path - 'node' doesn't exist on minimal install in Drupal 11.

    I confirmed the same behaviour on Drupal 10 (with a different destination param) so I've pushed a tiny change to use '/' instead on those two test and will open a follow-up issue to fix the existing bug.

  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    The UITests are throwing ipv6 related errors on gitlab, we already have a follow-up for that: ✨ Not IPv6 compatible Needs work

  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    I've rolled back the changes I made as they didn't help.

    I've also rebased on the latest work on 8.x-1.x which I should have done in the beginning.

    @rocketeerbkw's changes for beta2 solved the redirect issue which only leaves some UI tests. I'm going to commit this and move to managing follow-ups.

  • πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

    Release to come when ✨ Not IPv6 compatible Needs work goes in.

Production build 0.71.5 2024