Skip to content

Issue #SBCOSS-778 feat: Added Activity Aggregator API #646

Merged
maheshkumargangula merged 17 commits intoSunbird-Lern:developfrom
aimansharief:activity-agg
Feb 9, 2026
Merged

Issue #SBCOSS-778 feat: Added Activity Aggregator API #646
maheshkumargangula merged 17 commits intoSunbird-Lern:developfrom
aimansharief:activity-agg

Conversation

@aimansharief
Copy link
Contributor

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Type of change

Please choose appropriate options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes in the below checkboxes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Ran Test A
  • Ran Test B

Test Configuration:

  • Software versions: Java-11, play2-2.7.2, scala-2.11, redis-5.0.3
  • Hardware versions: 2 CPU / 4GB RAM

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Moved Cassandra operations and response message population outside the conditional block in ContentConsumptionActor. This ensures these actions are performed regardless of the workflow path, improving consistency in content consumption handling. Also added .DS_Store to .gitignore.
Updated the default value of 'enable_module_aggregation' to true when the config is not set, enabling module aggregation by default.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “Activity Aggregator” feature to the LMS service, exposing an API endpoint that routes activity consumption updates to a dedicated Pekko actor/module (with Redis-backed graph reads + optional dedup + Cassandra updates).

Changes:

  • Introduces new activity-aggregator Maven module with actor/util/domain code and tests.
  • Wires the new actor into the Play service (dependency, actor binding, router deployment config, and a new /v1/activity/agg route/controller + request validator).
  • Updates existing consumption flow to optionally route events to the new Activity Aggregator actor (feature-flag based) and adjusts related unit tests/utilities.

Reviewed changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pom.xml Adds activity-aggregator as a reactor module.
service/pom.xml Adds activity-aggregator as a service dependency (with exclusions).
service/conf/routes Adds HTTP route for the Activity Aggregator API.
service/conf/application.conf Adds Pekko deployment/router config for activity-aggregator-actor.
service/app/util/ACTOR_NAMES.java Registers the new actor for DI/binding.
service/app/modules/StartModule.java Binds RedisCacheUtil for injection usage by the new actor/utilities.
service/app/controllers/activityaggregate/ActivityAggregateController.java New controller endpoint to forward requests to the actor.
service/app/controllers/activityaggregate/validator/ActivityAggregateRequestValidator.java Validates incoming Activity Aggregate update requests.
course-mw/sunbird-util/.../JsonKey.java Adds completedcount / viewcount keys.
course-mw/sunbird-util/.../ActorOperations.java Adds UPDATE_ACTIVITY_AGGREGATES operation.
course-mw/sunbird-util/cache-utils/.../RedisCacheUtil.scala Adds getList(key, database) helper used by the new Redis util.
course-mw/enrolment-actor/.../ContentConsumptionActor.scala Adds optional routing to ActivityAggregatorActor (feature flag) and wires new actor ref.
course-mw/enrolment-actor/.../CourseConsumptionActorTest.scala Updates tests to pass the additional actor dependency and adjusts mocks.
activity-aggregator/pom.xml New module build definition and dependencies.
activity-aggregator/src/main/.../* New actor + util + domain implementation for activity aggregation.
activity-aggregator/src/test/.../* New unit tests for aggregator actor and utility logic.
.gitignore / activity-aggregator/.gitignore Adds .DS_Store and module ignores.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

@maheshkumargangula maheshkumargangula merged commit 6b84b0a into Sunbird-Lern:develop Feb 9, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants