New contribution records system

Created on 16 December 2022, over 1 year ago
Updated 21 August 2024, 18 days ago

Problem/Motivation

As a new system for contribution records is being built (see https://www.drupal.org/project/infrastructure/issues/3322116 ), we will need changes on D7 www.drupal.org to adapt and communicate with it.

The following tasks are part of the bigger plan detailed here: https://docs.google.com/spreadsheets/d/1UVM8Bs6VdoJFo2-DQGjTRo5yeecMWMvp...

✅ Migrate existing credits to the new system
✅ Provide links on issues to the new system related record
✅ Trigger webhook for comments to update contributors on new system
✅ Trigger webhook for issue status change to update the contribution record status on the new system
✅ Hide any form or reference to the old attribution system (comment form on issues)
✅ Change to user profiles to read from the new system
✅ Changes to organizations to read from the new system
✅ Changes to marketplace to read from the new system
✅ Improve UX to add individual contribution records and bulk credits

I will use this issue/branch to put all the D7 changes that are required.

Deployment

Connect both instances

* [D10 www.drupal.org] /admin/config/development/drupalorg_settings: Make sure that the token set here and the one in the Drupal 7 system is the same. Do this via a deployment, or via settings.prod.php in the D10 project code, or even better, by setting the DRUPALORG_TOKEN environment variable.
* [D7 www.drupal.org]: drush vset contribution_records_base_url "https://drupalorg.prod.cluster.drupalsystems.org"
* [D7 www.drupal.org]: drush vset drush vget drupalorg_token "SECRET-TOKEN"

Send and process data

[D7 www.drupal.org]
* Drush commands:
** drush drupalorg-contribution-records-sync [--raw-import=(1|2)] [--days-ago=30] [--nids=1,2,3] this will queue a request to sync the contribution record matching the options given. We can give the nids directly, say issues updated in the last XX days (days-ago), or no options to send a sync request for ALL issues. The raw-import option will send data to the new system and this will not be queried back. If raw-import is not present, the new system will trigger a query back to the old system (D7) to validate data, so do it carefully as it can generate unexpected extra traffic.
** Full direct raw import: drush drupalorg-contribution-records-sync --raw-import=1 (when the queue runs, the record will be created instantly in the receiving system. It takes a few queries and inserts on the receiving end and could potentially timeout on big requests)
** (Recommended) Full queued raw import: drush drupalorg-contribution-records-sync --raw-import=2 (when the queue runs, the record will be queued to be created in the new system, so the D7 push operation will be quick and should not timeout).
** When raw-import=2, then drush queue-run drupalorg_issue_events this will process the issue events queue, which include the above items, as well as new items added when issues are updated or comments are made. It will trigger posts requests to the D10 system.

[D10 www.drupal.org]
** Need a cron job that runs every minute: drush queue:run contribution_records_import_queue_worker

Feature request
Status

Needs work

Version

3.0

Component

Code

Created by

🇪🇸Spain fjgarlin

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024