Problem/Motivation
Now that the parent is closed, we have a test infrastructure for migrating to a real live Drupal endpoint for querying data for Project Browser.
Proposed resolution
When the Association has appropriately stood up the infrastructure to support that, we can move this plugin out of tests and refactor for production use.
We need to:
1. Move the "DrupalDotOrgJsonApi" source plugin from the test folder to the "src/Plugin\ProjectBrowserSource" folder.
2. Change the namespace to "namespace Drupal\project_browser\Plugin\ProjectBrowserSource;"
3. Change the DRUPAL_ORG_ENDPOINT to the right value.
4. Revise all the other class constants to make sure that they have the right hardcoded values.
5. Change the default plugin in "config/install/project_browser.admin_settings.yml" to "drupalorg_jsonapi"
6. Check if all the tests are running.
7. Not sure about this one: we might need to recreate the fixtures here "tests/fixtures/drupalorg_jsonapi"
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | Screen Recording 2024-07-04 at 11.10.54.mov | 22.04 MB | fjgarlin |
Issue fork project_browser-3371084
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 #2
fjgarlin commentedComment #3
fjgarlin commentedPostponed until we have the live endpoint.
Comment #4
chrisfromredfinComment #5
chrisfromredfinComment #6
fjgarlin commentedUpdate given in slack channel: https://drupal.slack.com/archives/C01UHB4QG12/p1717668171381089
I wanted to give an update on where we are at in regards to the future Project Browser endpoint to read data from www.drupal.org.
PB side
Note that Project Browser is already prepared to consume that data:
www.drupal.org side
We had some blockers that were finally solved and we could pivot back to working on this.
So, we have:
We still don’t have:
More in the coming weeks 🙂
Comment #7
fjgarlin commentedCurrent situation:
Some of the ⚠️ are nearly ✅ but going into the cautious side.
Comment #8
fjgarlin commentedComment #9
fjgarlin commentedComment #10
fjgarlin commentedHi all,
As of today, we have:
🟢 Migrations
- Finally got the first full user migration to run.
- It now follows files (done)
- And then all the projects migrations (running)
- Finally, there is the project_usage migration. This last one has got +40 million rows so we are expecting it to take a long time.
🔴 Elastic Search
- We are awaiting on the Elastic Search server for the production environment.
- We have set it up on development and the infra team is fine-tuning permissions and settings, but it’s not set up in production yet.
- This is currently the main blocker as we cannot index and search the data migrated otherwise.
🟠 PB promoting endpoint issue (aka this issue)
- I will work tomorrow and the day after on it, hoping to have something to be reviewed / tested via drupalpod by the end of the week.
If/when the Elastic Search part is solved, we will be in a position to deliver a “live” endpoint. It will be live in the sense of being a endpoint reading from the d.o database, but note that currently, migrations take “hours” to run and that this is the very first week ever that we have these running on the new infra for the production environment. This also means that we are learning about server requirements, real volume of data, Drupal limitations, etc.
⚠️ So, our ask is that you treat the endpoint as an “alpha” or “beta” version of it, and as such, Project Browser could not be considered stable under we are happy with the stability of the endpoint. I think this makes sense but please let us know if you don’t understand any of the above.
Having said all that, the “alpha” live endpoint will be: https://drupalorg.prod.cluster.drupalsystems.org/jsonapi 🎉🎉
This will change to be www.drupal.org/jsonapi but I think this makes it more obvious that it’s still not the final version.
Comment #13
fjgarlin commentedWIP in the MR.
Not sure why but when adding some filters the result is 0.
Works:
When adding any of the following, it does not:
Comment #14
narendrarIs it related to
sortsomehow? As when I hithttps://drupalorg.prod.cluster.drupalsystems.org/jsonapi/index/project_modules?filter[status]=1&filter[project_type]=full&filter[type]=project_module&page[limit]=12&page[offset]=0&include=field_supporting_organizations,field_supporting_organizations.field_supporting_organization,field_module_categories,field_maintenance_status,field_development_status,uid,field_project_images&sort=titleit is working but not whenhttps://drupalorg.prod.cluster.drupalsystems.org/jsonapi/index/project_modules?filter[status]=1&filter[project_type]=full&filter[type]=project_module&page[limit]=12&page[offset]=0&include=field_supporting_organizations,field_supporting_organizations.field_supporting_organization,field_module_categories,field_maintenance_status,field_development_status,uid,field_project_images&sort=-active_installs_totalComment #15
narendrarMay be it's because
field_active_installs_totalhasnullvalue everywhere. Just a guess 🤔.Comment #16
fjgarlin commentedYup. It’s related and due to that. We’re working on fixing the endpoint issue. It’s not because it’s null as it happens with other fields with data.
It’s related to Elastic vs Open Search and the Drupal modules we use.
WIP.
Comment #17
fjgarlin commentedhttps://drupalorg.prod.cluster.drupalsystems.org/jsonapi/index/project_m...
works now. Will continue work on this tomorrow.
Comment #18
fjgarlin commentedLive endpoint plugin in action (recording): https://www.drupal.org/files/issues/2024-07-04/Screen%20Recording%202024...
Comment #19
fjgarlin commentedThe failing tests on CI are passing locally (using the ddev contrib plugin).
I've tried a few things but I'm stuck on why the CI run is not getting results.
Local run:
Comment #20
fjgarlin commentedAll tests are green now. ALL 🙂
The changes in
tests/fixturesare just replacing contants/URLs, so no need to review those. Review all the other changes.I also created a follow up to decide what to do with the "mock" plugin, as it is expected in many tests, but it's out of the scope for this issue:
#3458780: [PP-1] Remove drupalorg_mockapi or move it to "test" folder.
Please review.
Comment #22
chrisfromredfinLike many things that are "star shots" - this is OUT OF THIS WORLD! I'm so overjoyed. I'll celebrate with some fireworks. :)
🎆