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

Issue #3403634: Upgrade group module to version 2.x #3682

Merged
merged 42 commits into from May 27, 2024

Conversation

volodymyr-sydor
Copy link
Contributor

@volodymyr-sydor volodymyr-sydor commented Jan 5, 2024

Problem

Currently, we are using group module 1.x on the open_social but it's about end-of-life and it's time to upgrade group module to 2.x version.

Also, for the group update, need to replace/remove all deprecated source code, see more info

Solution

Group 2 provides a wealth of UX, DX and Performance benefits that we want to start taking advantage of. We believe the move to Group 3 is too disruptive at this point, requiring the changing of machine names in a lot of unidentified places. We will focus our efforts on the upgrade to Group 2 and have no timeline for the Group 3 upgrade at the moment.

Before performing the upgrade to Group 2 we will remove the old group types from Open Social to reduce the amount of code that needs updating and support #3380714: [13.0.0] Remove support for public_group, open_group, closed_group, and secret_group and migrate to flexible_group.

Both changes are currently planned for a single major release of Open Social which will NOT be the same release as the Drupal 10 update, to ensure everyone can upgrade to a supported Drupal core version before working on the group update.

For the changes to Group and potential changes needed to your own code please refer to the excellent Group 2 release notes. A special shout-out to the walkthrough of Group 2/3 that Kristiaan recorded and posted to YouTube which is required watching for both developers and site-builders working with the Group module.

Where the work is

  • The majority of the work for us will be focused in two areas:
  • The overhauled access system (we will probably have to adjust our own access controls to handle this, or at least rewrite the group roles to match the new system)

Acceptance Criteria

  • Our dependency on the group module is updated to 2.x
  • This works with all the modules in SaaS and the distribution that use group

The new plugin types will need work from us if we’ve created custom plugins.

Issue tracker

Theme issue tracker

How to test

  • After upgrading the group module with related extensions - all functionality should remain stable work:
    • activity, notification system
    • membership: managing members
    • joining/leaving group
    • group invite
    • group request
    • creating/editing/viewing content in the group
    • access system

Definition of done

Before merge

  • Code/peer review is completed
  • All commit messages are clear and clean. If applicable a rebase was performed
  • All automated tests are green
  • Functional/manual tests of the acceptance criteria are approved
  • All acceptance criteria were met
  • New features or changes to existing features are covered by tests, either unit (preferably) or behat
  • Update path is tested. New hook_updates should respect update order, right naming convention and consider hook_post_update code
  • Module can be safely uninstalled. Update/implement hook_uninstall and make sure that removed configuration or dependencies are removed/uninstalled
  • This pull request has all required labels (team/type/priority)
  • This pull request has a milestone
  • This pull request has an assignee (if applicable)
  • Any front end changes are tested on all major browsers
  • New UI elements, or changes on UI elements are approved by the design team
  • New features, or feature changes are approved by the product owner

After merge

  • Code is tested on all branches that it has been cherry-picked
  • Update hook number might need adjustment, make sure they have the correct order
  • The Drupal.org ticket(s) are updated according to this pull request status

Screenshots

dd2aa494-f13a-4b18-bf08-8ed4be3956c7 Screenshot 2024-03-21 at 15 10 59

Release notes

Upgrades Group Module from 1.6 to 2.x and adjusted related functionality including access system as well

Change Record

  • Flexible Permissions (has been added already because it's require current group upgrade)
    A new module is being introduced and adopted by Group: Flexible Permissions. Work is ongoing to move this module into Drupal core as well.

  • Roles and their UI have been reworked
    Roles were always tricky to configure for groups, especially in relation to other roles (e.g. site manager). This is why we have “Group Manager” and “Group Admin” with Site Managers always receiving the “Group Admin” role. However, over-time this could make managing these roles more difficult. The new permission system is simplified and allows us to more easily express the different roles that might exist within a group, as well as what should happen for the global roles whether they’re a member of the platform or not.

  • The access system is overhauled to improve performance
    Drupal has an access system which works for all entities, but it can lead to large database queries. Because of how central Group can be to systems (like Open Social) and how large these queries can go, it now implements custom logic to generate these queries. This makes them a lot smaller and faster to execute.

  • GroupContentEnabler is now GroupRelationType
    This is mostly important for Developers. However it provides much better control and easier tools to work with the kinds of thing a group can be joined to (for example the relationship between a group and a user). Importantly it also allows establishing the relationship between two types of entities multiple times to signify different types of relationships.

Here is a list of all common changes in group API: https://www.drupal.org/docs/extending-drupal/contributed-modules/contributed-module-documentation/group/updating-your-modules-to-group-20-api

So, all related functionality will be replaced/adjusted in the custom, social_features modules and themes

Also, has been changed access system, for now it should be more flexible however it could require adding new permission to the group roles.

  • Permission has been changed in the grequest module: administer members -> administer membership requests

Translations

@volodymyr-sydor volodymyr-sydor added team: enterprise This PR originates from the ECI team status: needs work This pull request needs more work before it's ready for review type: update prio: high labels Jan 5, 2024
@volodymyr-sydor volodymyr-sydor added this to the 12.0.3 milestone Jan 5, 2024
Copy link

mergeable bot commented Jan 5, 2024

Thanks for contributing towards Open Social! A maintainer from the @goalgorilla/maintainers group might not review all changes from all teams/contributors. Please don't be discouraged if it takes a while. In the meantime, we have some automated checks running and it might be that you will see our comments with some tips or requests to speed up the review process. 😊

@volodymyr-sydor volodymyr-sydor force-pushed the update/3403634-group-update branch 2 times, most recently from 9b13621 to e990b48 Compare January 9, 2024 16:45
@ronaldtebrake ronaldtebrake removed this from the 12.0.3 milestone Jan 15, 2024
@ribel ribel added this to the 13.0.0 milestone Jan 19, 2024
@volodymyr-sydor volodymyr-sydor force-pushed the update/3403634-group-update branch 6 times, most recently from e2e2e6b to 0f06009 Compare January 26, 2024 10:11
@volodymyr-sydor volodymyr-sydor force-pushed the update/3403634-group-update branch 2 times, most recently from 613b9a9 to c5f4b46 Compare January 31, 2024 08:14
@volodymyr-sydor volodymyr-sydor force-pushed the update/3403634-group-update branch 7 times, most recently from 35ae492 to e78cac0 Compare February 8, 2024 16:31
@volodymyr-sydor volodymyr-sydor force-pushed the update/3403634-group-update branch 2 times, most recently from aae8c28 to 38483e1 Compare February 9, 2024 07:36
volodymyr-sydor and others added 25 commits May 24, 2024 12:15
… distro

Rather then support a patch (from https://www.drupal.org/project/group/issues/2718195)
that never be in "group" module we move all changes to distro.
In a future we can consider use the https://www.drupal.org/project/entitygroupfield contrib module
and replace our custom "groups" computed field.
… upgraded

So, it prevent a compatibility issue for existing sites during group migrations
…er roles

After group upgrade 'content' replaced with 'relationship' permission.
So, need to assign new permissions for user roles to adjust access to
group relationship items.
…ype function

Also, replace related source code in social_group_secret module that is abandoned
@open-social-tugboat
Copy link

Tugboat has finished building the preview for this pull request!

Link:

Dashboard:

@BiaInacio
Copy link
Contributor

Test done, all good wth groups creation, behavior and notification!

@ronaldtebrake ronaldtebrake merged commit 308e62f into main May 27, 2024
186 checks passed
@ronaldtebrake ronaldtebrake deleted the update/3403634-group-update branch May 27, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio: high status: needs review This pull request is waiting for a requested review team: enterprise This PR originates from the ECI team type: dependencies Updating a dependency file
7 participants