Skip to content

use official images #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 2, 2025
Merged

use official images #49

merged 6 commits into from
Aug 2, 2025

Conversation

bserem
Copy link
Contributor

@bserem bserem commented Jul 9, 2024

Switch to official image

The Issue

#47

How This PR Solves The Issue

Changes the image used

Manual Testing Instructions

Automated Testing Overview

Related Issue Link(s)

Release/Deployment Notes

@cboyden-ucb
Copy link

I did some testing on this - the latest version of the seleniarm image that works without any changes to DDEV settings is seleniarm/standalone-chromium:4.6.0-20221104. Some changes may be needed in order to get later versions working.

@weitzman
Copy link
Collaborator

@MurzNN
Copy link
Contributor

MurzNN commented Mar 21, 2025

The problem with Drupal was that the Drupal 10.x versions used the outdated Nightwatch.js version 2.x (actually even locked to the 2.4.x version) that doesn't support the W3C protocol (which is the default for new Selenium).

And starting from the Drupal 11.1.0 release - they updated Nightwatch to 3.7 so it started to work well with the fresh Selenium: https://www.drupal.org/node/3467273

So, the outdated Selenium image doesn't work with Drupal 11.1, and we have to update it because Drupal 11.1.0 was released on 16 Dec 2024 and is well-used.

But maybe add a caveat that for the Drupal versions lower 11.1.0, we need to use the older image.

@MurzNN
Copy link
Contributor

MurzNN commented Mar 21, 2025

Drupal 11.1.x Nightwatch tests also work well even with the latest version of the Selenium image, if you set the DRUPAL_TEST_WEBDRIVER_W3C=true environment variable (or uncomment it in the [drupal_root]/core/.env file).

So, maybe set the latest in the PR too?

@rfay
Copy link
Member

rfay commented Mar 21, 2025

Rebased to run tests again.

@weitzman
Copy link
Collaborator

But maybe add a caveat that for the Drupal versions lower 11.1.0, we need to use the older image.

Sounds like a use case for a composer conflict statement

@weitzman
Copy link
Collaborator

Looks like the tests are hanging, like they have in all previous effots. i dont know why. See #42

@weitzman
Copy link
Collaborator

I am trying a bump to Drupal 11 during testing in #58. Would be nice if I could get push permission to bserem:patch-2 instead.

@star-szr
Copy link
Contributor

Just want to note that FunctionalJavascript tests also need Drupal core 11.1.x for W3C protocol support with newer selenium containers. There is an issue to back port those changes but it has stalled out for now: https://www.drupal.org/node/3421202

Legacy protocol support was dropped from Selenium in 2022 from what I could dig up: https://www.selenium.dev/blog/2022/legacy-protocol-support/

@stasadev
Copy link
Member

stasadev commented Jul 4, 2025

Rebased to include the latest changes. Not sure it's necessary since we have other PRs to bump chromium, but I did it anyway.

@mxr576
Copy link
Collaborator

mxr576 commented Jul 16, 2025

Just want to note that FunctionalJavascript tests also need Drupal core 11.1.x for W3C protocol support with newer selenium containers. There is an issue to back port those changes but it has stalled out for now: https://www.drupal.org/node/3421202

I wonder if can implement a similar BC bridge for older Drupal versions than what was added here. Seems possible on the first sight

https://git.drupalcode.org/project/gitlab_templates/-/commit/b6f6c6f96f6d625afcf24ac5ae80f3dc4331cd55#43d67bc931cefd24f13e24bc547132e1d13a7ced_1177_1183

mxr576 added 2 commits July 21, 2025 11:52
which also adds consistent chrome arg ordering among different env vars
@mxr576
Copy link
Collaborator

mxr576 commented Jul 21, 2025

Now finally a green build!
So the only remaining question is the BC bridge...

@weitzman
Copy link
Collaborator

weitzman commented Jul 22, 2025

Nice work!

I'm fine with releasing a new major version without that bridge, if you prefer. Also a mention in the README would be helpful.

@mxr576
Copy link
Collaborator

mxr576 commented Jul 22, 2025

I was also thinking about creating a new major for Drupal >= 11.1 and providing a (best effort? on-demand?) support for Drupal <10.x branch as long as it is supported in 1.x. What do you think?

@weitzman
Copy link
Collaborator

Its a bummer that ddev add-ons dont have something like composer conflict statements. We have no way to prevent D10 sites from upgrading. Still, I think your plan is reasonable. Lets do it.

@mxr576
Copy link
Collaborator

mxr576 commented Jul 22, 2025

Maybe a pre-install action could prevent the update?

https://github.com/ddev/ddev-addon-template/blob/98c9daf1359fbd63587346c4b516b9a8ef592bee/install.yaml#L10

But creating a bulletproof solution consumes more time (than I currently have) so maybe I would just start with documentation and improve if necessary.

@weitzman
Copy link
Collaborator

That works. In the error message, lets help the user build an add-on get command that will work.

I hope we didn't make a mistake by making this project a dependency of https://github.com/ddev/ddev-drupal-contrib/. We just added a core-version command there but it wont automatically switch the version of this add-on. I think its OK but something to consider.

@weitzman
Copy link
Collaborator

Since maintainers often commit their project's add-ons to the repo, its problematic to have the add-on's version vary by Drupal core version. I think we should explore that backward compat bridge, unfortunately. That gitlab_templates link does look promising. I will try to get to this; I encourage others to also try.

@weitzman
Copy link
Collaborator

weitzman commented Aug 1, 2025

I looked at at backward compat and I dont really feel like writing it. If anyone submits a PR, I'd be thankful. until then, we probably have to go with merging this and issueing a new major version.

@weitzman weitzman merged commit 696c509 into ddev:main Aug 2, 2025
2 checks passed
@weitzman
Copy link
Collaborator

weitzman commented Aug 2, 2025

I created a 1.x branch and then merged this PR into main. 1.x will get minimal maintenance. Also, I also released 2.0.0-rc1. That can be installed via ddev add-on get ddev/ddev-selenium-standalone-chrome --version 2.0.0-rc1. Please report any issues.

@weitzman
Copy link
Collaborator

weitzman commented Aug 2, 2025

Also note that I used the new release with my keycdn contrib project and my WebDriverTestBase test is passing along with Drupal 10.5. Is the backward compat issue limited to Nightwatch?

@weitzman
Copy link
Collaborator

weitzman commented Aug 2, 2025

It looks like ddev add-on get is fetching 2.0.0-rc1 by default even though its marked as pre-release. Not my intention, but its OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants