- Issue created by @chrisfromredfin
- ๐บ๐ธUnited States phenaproxima Massachusetts
This isn't a stable blocker for Drupal CMS.
- ๐ช๐ธSpain fjgarlin
- Merge request !659Check if Drupal version is compatible with the Drupal.org API โ (Merged) created by fjgarlin
- ๐ช๐ธSpain fjgarlin
This is ready for review.
I don't think there are any new errors provoked by these changes. The errors shown in the CI pipeline are not related to this issue:
- CSpell: words in files that are not modified by this MR
- Stylelint: CSS files that are not modified by this MR
- Nightwatch: failures already present in 2.0.x
- PHPUnit: failures already present in 2.0.xTested on Drupal 10.3.2:
The message shown comes from https://www.drupal.org/drupalorg-api/project-browser-filters?drupal_vers... โ
When tested on Drupal 11.0.1 the message does not appear.
- ๐ช๐ธSpain fjgarlin
PB wonโt be included as stable and part of core until D11.
In any case, this is not relevant for this issue. This issue is about querying the d.org api endpoint and relaying an error message, if present. Changing the message and/or versions to show the message, would be a drupal.org issue.
- ๐บ๐ธUnited States chrisfromredfin Portland, Maine
So on principle this looks great to me, however - it really needs a test. I assume a FunctionalJavascript so we can test that the message is displayed on the front-end using JS... but I have no idea how to fake/mock the endpoint result.
But we need to test that if we create a results page with an error, that error is displayed.
I would love to (could be in the future/follow-up) add support for warnings in addition to errors (so we could notify of an upcoming deprecation).
But I think the approach is right.
- ๐บ๐ธUnited States chrisfromredfin Portland, Maine
(Also, you'll notice I rebased this but it's failing a bunch of tests now?? Was that me? ๐ฌ)
- ๐ช๐ธSpain fjgarlin
We won't be able to do a FunctionalJavscript test unless we fake the Drupal version as the query to the endpoint sends the "current" installed Drupal version.
It's not possible to change the value of a constant (
Drupall::VERSION
in this case) so I'm not sure which approach to follow. - ๐ช๐ธSpain fjgarlin
Re tests failing, all nightwatch tests seem to be failing in 2.0.x: https://git.drupalcode.org/project/project_browser/-/jobs/3935754
- ๐ช๐ธSpain fjgarlin
Adde a test and altered the fixture regeneration to cater for the new parameter. Ready for review again.
- ๐ฎ๐ณIndia narendraR Jaipur, India
Test added, Changes looks good to me. Moving it to RTBC.
- ๐บ๐ธUnited States chrisfromredfin Portland, Maine
I'm gonna take this for now because I want it in, but I think the test should have been more generic and/or at a minimum doesn't really belong in the TestDrupalOrgJsonApi - really a test that "if any backend gives an error with its response, that error is displayed" - but this test DOES do that, so I think refactoring in a follow-up is best.
But also, I'm speaking a little bit out of my pay grade, so I welcome any response to this idea. :)
-
chrisfromredfin โ
committed aafadfd6 on 2.0.x authored by
fjgarlin โ
Issue #3494819: Display warnings/errors from DrupalOrgJsonApi backend
-
chrisfromredfin โ
committed aafadfd6 on 2.0.x authored by
fjgarlin โ
- ๐ช๐ธSpain fjgarlin
Agree, but as this is the very first plugin to implement this it made sense to do it here. We are not sure which conditions could trigger an error on other plugins, but yeah, in any case, a follow-up can address this if needed.
Automatically closed - issue fixed for 2 weeks with no activity.