Skip to content
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

PROD-30018: Replace custom grequest with contrib grequest #3968

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Kingdutch
Copy link
Member

This commit replaces the custom module, which came from a patch that was introduced before Group 1.4, with the current 2.2.2 version of the grequest module. The next steps are to then remove the module and pull it in through composer, but this commit gives a clear overview of the differences between our custom version and the contrib version at the time of the switch.

Problem

The grequest module provides a way to request access to a group. It was originally created as a patch for the Group module but it was decided to spin it out into a separate contrib module to keep the group module leaner. As part of our internal Group module update to Group 1.4 we did not have the time to switch from the patch to a contrib module so we included the patch as a custom module in our code-base.

Solution

The contrib version of the module has forms that work properly and contains additional improvements for group compatibility so we want to fulfill our long-term plan of moving from the custom patch version to the contrib module.

Issue tracker

https://getopensocial.atlassian.net/browse/PROD-30018

Theme issue tracker

How to test

Screenshots

Release notes

Change Record

Translations

@Kingdutch Kingdutch added type: refactoring Updates code for improved maintenance without changing its functionality status: needs work This pull request needs more work before it's ready for review scope: community management system This change impacts all customers that use the community management system prio: high team: guardians labels Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

Thanks for opening this Pull Request! To ensure Pull Requests are easy to find and understand for all our team-members we've established some standardised rules. While reviewing this pull request I've found the following issues, please resolve them.

Missing milestone
The issue is missing a milestone. Milestones are important to help release managers know whether they might need to postpone a release for a critical issue and to communicate what fixes and new features are included in a release. Before merging, please select the appropriate milestone for this pull request.

🤖 This is an automatically produced message by the Open Social PR manager.

@Kingdutch Kingdutch force-pushed the feature/replace-grequest branch 2 times, most recently from 83fdf5c to 5c04cd2 Compare July 16, 2024 08:12
@Kingdutch Kingdutch force-pushed the feature/replace-grequest branch 2 times, most recently from 033ec11 to baa007c Compare July 17, 2024 07:27
This commit replaces the custom module, which came from a patch that was
introduced before Group 1.4, with the current 2.2.2 version of the
grequest module. The next steps are to then remove the module and pull
it in through composer, but this commit gives a clear overview of the
differences between our custom version and the contrib version at the
time of the switch.
This replaces the in-repo copy of grequest with a copy that's installed
with Composer from the Drupal packagist. This ensures that dependencies
are also properly pulled in.

We choose 2.2.2 which is the latest stable version and we lock it to
match the current policy of other dependencies in the distribution.
There's a few differences between what was in our grequest module and
what is in the version that's now in contrib that we're moving to. This
requires some config and databae updates.

These updates are placed in `social_group_request` under the assumption
that all platforms that use `grequest` do so through this Open Social
integration module.

The upgrade path puts an updated Open Social as close as possible to a
fresh install.
This changes the social_group_request module so that it integrates with
the contrib version of the grequest module rather than our custom
version.

Most notably some constants are changes, but there's a small tweak in
how membershiprequests can be fetched as well.
The config for the membership request functionality for flexible groups
was included in `social_group_request`. However, the
`social_group_request` module is a module whose purpose is to provide
building blocks on top of `grequest` which other Open Social group types
can re-use (e.g. discussions or courses).

By moving the functionality into `social_group_flexible_group` we bring
that module closer to containing all the (optional) functionality that
is specific to the Flexible Groups _feature_, while keeping only the
generic shared behaviour in social_group_request for the membership
request _system_.
@Kingdutch Kingdutch force-pushed the feature/replace-grequest branch from baa007c to a5836cd Compare August 15, 2024 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio: high scope: community management system This change impacts all customers that use the community management system status: needs work This pull request needs more work before it's ready for review team: guardians type: refactoring Updates code for improved maintenance without changing its functionality
Development

Successfully merging this pull request may close these issues.

1 participant