Problem/Motivation

The current mock api only abstracts a few parts where we should retrieve data from d.org via the new plugins. Categories and releases are still not using the plugin system, and ideally, we'd want to abstract these too.

The abstraction goes a bit deeper, so things like "taxonomy_vocabulary_3", should be mapped to a more friendly name, and that should happen at plugin level.

In order to start work on the actual d.org endpoints implementation, we need to refactor a few things. Namely:
* New endpoint to retrieve categories (also mentioned here https://www.drupal.org/project/project_browser/issues/3278333)
* New setting to add an endpoint where to connect
* Remove DrupalOrgClient usage as this should be totally replaced by the plugins
* Abstract the plugins from the source adding a few methods, so the plugins can be totally interchangeable (ie: mock vs d.org)

Proposed resolution

I will shortly submit a working PR where some of the above changes have been addressed and the plugins are now interchangeable. Right now the "new" plugin is just a copy of the mock plugin, but by completely separating it, it means that we can start working on the actual d.org integration via jsonapi.

Remaining tasks

If this gets merged, then we can continue working on the d.org plugin as we'd have all the scaffolding files in place and the initial architecture (ie: the following MR) would have been validated.

User interface changes

None.

API changes

None technically other than having the ability to switch plugins.

Data model changes

Will need to eventually rename a few things like "taxonomy_vocabulary_XX" to a friendlier version but not a blocker for this for now.

Release notes snippet

Allow for multiple plugins and bring all the data from those plugins only.

Command icon 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

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Status: Active » Needs review
fjgarlin’s picture

Related issues: +#3274897: Resolve API naming

Applied the renaming changes from the related issue to this refactoring.

fjgarlin’s picture

I needed to rebase a couple of times with issues that were just merged. Commit history might look weird as I needed to force push to my issue fork (based on this info, tho probably there is a better way which I don't know).

Should be good to merge again. Will keep an eye on further merged tickets.

fjgarlin’s picture

Title: Scaffolding and refactoring to connect to d.org » Scaffolding and refactoring to use more source plugins
tim.plunkett’s picture

Title: Scaffolding and refactoring to use more source plugins » Scaffolding and refactoring to use source plugins consistently
tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

Pushed up two nits, and opened #3279510: Reevaluate or remove DrupalOrgClient
Thanks @fjgarlin

chrisfromredfin’s picture

Status: Reviewed & tested by the community » Fixed
chrisfromredfin’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.