Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
e82e95d
Issue #LR-711 merge: Fix-vulnerability-Group (#178)
BharathwajShankar Nov 17, 2023
ac6319e
Issue #LR-746 chore: Upgraded the scala major version from 2.11 to 2.…
AmiableAnil Feb 27, 2024
d20cca5
Issue #LR-784 merge: From release-7.0.0 to release-8.0.0 (#184)
AmiableAnil Apr 24, 2024
d23e9d0
Issue #LR-327 chore: keycloak changes (#185)
Hari-stackroute May 2, 2024
866883f
release-7.0.0 to release-8.0.0 (#187)
AmiableAnil Jun 5, 2024
83367e4
LR-814: merge release-7.0.0 to release-8.0.0 (#189)
amitpriyadarshi Jul 23, 2024
c6f613f
#SBCOSS-467 feat: adding github actions to run testcases and codequal…
chethann007 Jun 3, 2025
5e24e26
#SBCOSS-467 feat: adding github actions to run testcases and codequal…
chethann007 Jun 3, 2025
4357ee8
Merge pull request #196 from Sunbird-Lern/git-actions
pallakartheekreddy Jun 4, 2025
de43ae0
#SBCOSS-468 feat: adding github actions to publish image into GHCR
chethann007 Jun 6, 2025
d053faf
#SBCOSS-468 feat: adding github actions to publish image into GHCR
chethann007 Jun 6, 2025
1fc8cda
Merge pull request #197 from Sunbird-Lern/git-actions
pallakartheekreddy Jun 6, 2025
2991712
#SBCOSS-468 feat: adding github actions to publish image into GHCR
chethann007 Jun 23, 2025
0d054b5
Merge pull request #198 from Sunbird-Lern/docker-image-fix
pallakartheekreddy Jun 23, 2025
6dbd618
#SBCOSS-385 fix: vulnerability fixes in groups-service
chethann007 Aug 5, 2025
8fcb725
#SBCOSS-548 fix: vulnerability fixes
chethann007 Aug 20, 2025
952df5d
Merge pull request #200 from chethann007/latest-vuln-fix
pallakartheekreddy Aug 21, 2025
bb0ea6c
Merge pull request #199 from Sunbird-Lern/vuln-fixes
pallakartheekreddy Sep 1, 2025
536a74d
fix: remove fields from activityConfig.json to remove bgms hardcoding
chethann007 Sep 23, 2025
86387c8
Merge pull request #202 from Sunbird-Lern/bgms-hard-coding
pallakartheekreddy Sep 24, 2025
0fd03df
Initial plan
Copilot Oct 8, 2025
e6754d0
Add comprehensive Play Framework and Akka to Pekko migration report
Copilot Oct 8, 2025
bcd2789
Add migration quick reference and visual guide documents
Copilot Oct 8, 2025
4fa23b2
Add migration analysis index - complete compatibility report
Copilot Oct 8, 2025
0286d31
Update POMs and migrate Akka imports to Pekko
Copilot Oct 10, 2025
70bf0a4
Fix compilation errors and complete migration to Play 3.0.5 + Pekko 1…
Copilot Oct 10, 2025
a53af71
Add upgrade verification report - migration complete
Copilot Oct 10, 2025
7fa2ca4
local changes after testing
Oct 10, 2025
3ea4fff
Replace multiple documentation files with single concise UPGRADE_READ…
Copilot Oct 10, 2025
91fe90d
Update UPGRADE_README.md by removing sections
sntiwari1 Oct 10, 2025
f035297
Upgrade to Play Framework 3.0.5 and Apache Pekko 1.0.3
sntiwari1 Oct 10, 2025
c7d355b
SB-I289:Fixed route issues in list, update group and update members
Deeksha1502 Oct 17, 2025
f25d240
Merge pull request #3 from Deeksha1502/release-8.0.0
sntiwari1 Oct 23, 2025
65d608e
Initial plan
Copilot Oct 27, 2025
cc9e95b
Add JVM arguments for PowerMock Java 11 compatibility and update Scal…
Copilot Oct 27, 2025
eb200b8
Add additional JVM module opens for PowerMock compatibility with Java…
Copilot Oct 27, 2025
4dfee7d
Add JVM opens for group-service tests and ignore CreateGroupActorTest…
Copilot Oct 27, 2025
90ccdf1
Fix Jacoco argLine conflict and add java.util.concurrent opens
Copilot Oct 27, 2025
0879495
SBCOSS-677: Updated the failing test cases
Deeksha1502 Oct 29, 2025
e9cf870
Update service/pom.xml
sntiwari1 Nov 4, 2025
a4121b6
Update service/pom.xml
sntiwari1 Nov 4, 2025
d9bb973
SB-I320: Updated the duplicated code in the validation util file
Deeksha1502 Nov 6, 2025
e0bcd06
SB-I320: Resolved review comments
Deeksha1502 Nov 6, 2025
bbc708f
Update group-actors/src/main/java/org/sunbird/dao/GroupDaoImpl.java
Deeksha1502 Nov 6, 2025
777e699
Update service/app/validators/ValidationUtil.java
Deeksha1502 Nov 6, 2025
59df59e
Update service/app/validators/ValidationUtil.java
Deeksha1502 Nov 6, 2025
a6a9c5a
Update service/app/validators/ValidationUtil.java
Deeksha1502 Nov 6, 2025
d8a8d7f
Update service/pom.xml
Deeksha1502 Nov 6, 2025
8187314
Update platform-cache/src/test/scala/org/sunbird/cache/impl/RedisCach…
sntiwari1 Nov 6, 2025
4fee615
Update service/app/validators/ValidationUtil.java
Deeksha1502 Nov 6, 2025
92a0bcf
Update service/app/controllers/ResponseHandler.java
Deeksha1502 Nov 6, 2025
3939737
Update service/app/validators/ValidationUtil.java
Deeksha1502 Nov 7, 2025
50d5ab7
Update service/app/validators/ValidationUtil.java
Deeksha1502 Nov 7, 2025
8b2b0f5
Merge pull request #4 from Deeksha1502/test-case-fix
sntiwari1 Nov 7, 2025
f9b2a7e
Removed null from error statement inside catch block
Deeksha1502 Nov 7, 2025
de00dd3
SB-I320: Fixed membership update api call
Deeksha1502 Nov 7, 2025
5dd3b49
Update service/app/validators/ValidationUtil.java
Deeksha1502 Nov 7, 2025
5fe5c9d
Fixed test cases
Deeksha1502 Nov 7, 2025
3ba251a
Merge remote changes with local test case fixes
Deeksha1502 Nov 7, 2025
a553f41
Apply suggestion from @Copilot
Deeksha1502 Nov 7, 2025
31b2a55
Merge pull request #5 from Deeksha1502/test-case-fix
sntiwari1 Nov 7, 2025
48a145b
Merge pull request #203 from SNT01/release-8.0.0
pallakartheekreddy Nov 7, 2025
13d91af
Merge upstream/release-8.1.0 - migrate from Akka to Pekko and update …
Deeksha1502 Dec 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# GitHub Action: Build and Deploy

## Overview
This GitHub Action automates the build and deployment process for the Groups service. It builds the project, runs tests, packages the application, and pushes a Docker image to GitHub Container Registry (GHCR).

## Usage
The action will automatically build and deploy your service whenever a new tag is pushed.

## Steps

1. **Set up JDK 11**
- Configures the environment with JDK 11 using the `actions/setup-java` action with Temurin distribution.

2. **Checkout code**
- Checks out the repository code with full commit history.

3. **Cache Maven packages**
- Caches Maven dependencies to speed up subsequent builds.

4. **Build and run test cases**
```bash
mvn clean install -DskipTests
cd service
mvn clean verify surefire-report:report
```
- Generates test reports for the test results.

5. **Package build artifact**
- Packages the application using Play Framework's `dist` goal.
```bash
mvn -f service/pom.xml play2:dist
```

6. **Upload artifact**
- Uploads the packaged application as a GitHub Actions artifact named `groups-service-dist`.

7. **Extract image tag details**
- Prepares Docker image name and tags based on the repository name and reference.

8. **Log in to GitHub Container Registry**
- Authenticates to GHCR using the provided GitHub token.

9. **Build and push Docker image**
- Builds the Docker image using the provided Dockerfile and pushes it to GHCR with the appropriate tags.

## Environment Variables
- `REGISTRY`: The GitHub Container Registry URL (ghcr.io)
- `IMAGE_NAME`: Auto-generated based on the repository name (e.g., ghcr.io/username/repo)
- `IMAGE_TAG`: Auto-generated based on the git reference (branch name or tag)

## Permissions
This workflow requires the following permissions:
- `contents: read` - To read the repository contents
- `packages: write` - To push Docker images to GitHub Container Registry

## How to Use the Docker Image

1. **Pull the Docker Image**:
```bash
docker pull ghcr.io/<repository-name>:<tag>
```
Replace `<repository-name>` and `<tag>` with the appropriate values.

2. **Run the Docker Container**:
```bash
docker run -d -p <host-port>:9000 ghcr.io/<repository-name>:<tag>
```
Replace `<host-port>` with your desired port number.

3. **Access the Application**:
Once the container is running, you can access the application at `http://localhost:<host-port>`.

## Notes
- The workflow uses Ubuntu latest runner.
- Maven dependencies are cached to improve build performance.
- The Docker image is built using the Dockerfile in the repository root.
- The workflow automatically handles repository name and tag generation for Docker images.
- Test reports are generated and made available in the GitHub Actions UI.
55 changes: 55 additions & 0 deletions .github/COVERAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# PR Code Coverage

This document outlines the steps for the Pull Request Code Coverage process.

## Triggering the Workflow
This GitHub Actions workflow is triggered automatically on every pull request to any branch in the repository. It ensures comprehensive testing and quality checks for all code changes.

## Prerequisites
- Maven
- JDK 11 (for building and testing)
- JDK 17 (for SonarQube analysis)
- SonarCloud account and token

## Steps

1. **Checkout the Repository**
- The first step is to checkout the repository to ensure you have the latest code.

2. **Set Up JDK 11**
- JDK 11 is used for building the project. The workflow uses the `temurin` distribution and caches Maven dependencies for faster builds.

3. **Build the Project and Generate Reports**
- Execute the following commands to build the project and generate test coverage reports:
```bash
mvn clean install -DskipTests
cd service
mvn clean verify jacoco:report surefire-report:report
```

4. **Generate Test Summary**
- The workflow generates an interactive test summary showing all test results, including passed and failed tests, grouped by test class.

5. **Set Up JDK 17**
- After generating the coverage report, set up JDK 17 for SonarQube analysis.

6. **Run SonarQube Analysis**
- Execute the SonarQube analysis to check the quality of the code and coverage. The analysis includes:
- Code quality metrics
- Code coverage analysis
- Security vulnerabilities
```bash
mvn sonar:sonar \
-Dsonar.projectKey=sunbird-lern \
-Dsonar.organization=sunbird-lern \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.coverage.jacoco.xmlReportPaths=service/target/site/jacoco/jacoco.xml
```
## Generated Reports
- **Test Reports**: `service/target/surefire-reports/`
- **Code Coverage**: `service/target/site/jacoco/`

## Notes
- Ensure the `SONAR_TOKEN` secret is configured in your GitHub repository settings for SonarQube analysis to work
- The test summary is available directly in the GitHub Actions UI
- The workflow automatically runs on every pull request to any branch
106 changes: 106 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build and Deploy

on:
push:
tags:
- '*' # Trigger this workflow on any git tag push

jobs:
ghcr-build-and-deploy:
runs-on: ubuntu-latest # Use the latest available Ubuntu runner

permissions:
contents: read # Allows reading repository contents
packages: write # Allows writing to GitHub Packages (GHCR)

env:
REGISTRY: ghcr.io # Define GitHub Container Registry as the target registry

steps:
# Set up Java Development Kit (JDK) 11
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin' # Use the Temurin distribution of OpenJDK
java-version: '11' # Set Java version to 11

# Check out the repository code
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Ensure full history is fetched, needed for tags

# Cache local Maven dependencies to speed up builds
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: |
~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

# Build the project and generate test reports (without skipping tests)
- name: Build and run test cases
run: |
mvn clean install -DskipTests # Initial install, skipping tests
cd service
mvn clean verify surefire-report:report # Run tests and generate reports

# Generate and display a detailed test report in the GitHub Actions UI
- name: Test Summary
uses: dorny/test-reporter@v2.1.0
if: always() # Ensure this runs even if previous steps fail
with:
name: Test Results
path: '**/surefire-reports/*.xml' # Look for JUnit XML test reports
reporter: java-junit
fail-on-error: false
only-summary: false
list-tests: 'all' # Include full list of tests in the summary

# Package the application using Play Framework's dist goal
- name: Package build artifact (Play dist)
run: mvn -f service/pom.xml play2:dist

# Move the packaged artifact to the root directory for easier access
- name: Moving the artifact to the root directory
run: |
mv service/target/group-service-1.0.0-dist.zip .

# Upload the packaged artifact to GitHub as a workflow artifact
- name: Upload artifact
uses: actions/upload-artifact@v4.3.1
with:
name: groups-service-dist
path: |
service/target/group-service-*-dist.zip

# Extract Docker image name and tag from GitHub variables
- name: Extract image tag details
id: image_vars
run: |
REPO_LOWER=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')
SHORT_SHA=$(git rev-parse HEAD | cut -c1-7)
TAG_LOWER=$(echo "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]')
IMAGE_NAME=${{ env.REGISTRY }}/${REPO_LOWER}
IMAGE_TAG=${TAG_LOWER}_${SHORT_SHA}_${GITHUB_RUN_NUMBER}
echo "IMAGE_NAME=${IMAGE_NAME}" >> $GITHUB_ENV
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV

# Authenticate Docker to GitHub Container Registry (GHCR)
- name: Log in to GitHub Container Registry (GHCR)
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Build the Docker image and push it to GHCR
- name: Build and push Docker image to GHCR
uses: docker/build-push-action@v4
with:
context: . # Docker context (root of the repository)
file: ./Dockerfile # Path to Dockerfile
push: true # Push the image to the registry
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} # Full image tag
69 changes: 69 additions & 0 deletions .github/workflows/pr-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: PR Code Coverage and SonarQube Analysis

on:
pull_request:
# Trigger this workflow on pull requests to any branch
branches: ['**']

jobs:
pr-coverage:
runs-on: ubuntu-latest

steps:
# Checkout the code from the pull request
- uses: actions/checkout@v3

# Set up JDK 11 for running tests and generating code coverage
- name: Set up JDK11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'

# Cache Maven dependencies to speed up builds
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

# Build the project and generate the JaCoCo coverage report
- name: Build and Generate Jacoco reports and Surefire reports
run: |
mvn clean install -DskipTests
cd service
mvn clean verify jacoco:report surefire-report:report

# Generate and display a detailed test report in the GitHub Actions UI
# This step uses dorny/test-reporter to parse XML reports and create an interactive test summary
- name: Test Summary
uses: dorny/test-reporter@v2.1.0
if: always()
with:
name: Test Results
path: '**/surefire-reports/*.xml'
reporter: java-junit
fail-on-error: false
only-summary: false
list-tests: 'all'

# Set up JDK 17 for running SonarQube analysis (required by plugins)
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

# Run SonarQube analysis using the generated JaCoCo coverage report
- name: Run SonarQube Analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn sonar:sonar \
-Dsonar.projectKey=sunbird-lern \
-Dsonar.organization=sunbird-lern \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.coverage.jacoco.xmlReportPaths=service/target/site/jacoco/jacoco.xml
85 changes: 85 additions & 0 deletions UPGRADE_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Play Framework 3.0.5 and Apache Pekko 1.0.3 Upgrade

## Overview

This document describes the upgrade of groups-service from Play Framework 2.7.2 with Akka 2.5.22 to Play Framework 3.0.5 with Apache Pekko 1.0.3.

## Why This Upgrade

1. License Compliance: Akka changed from Apache 2.0 to Business Source License 1.1, requiring commercial licenses for production use. Apache Pekko maintains Apache 2.0 license.
2. Security: Play 2.7.2 and Akka 2.5.22 no longer receive security updates.
3. Modernization: Access to latest features and performance improvements.

## Technology Stack Changes

- Play Framework: 2.7.2 to 3.0.5
- Actor Framework: Akka 2.5.22 to Apache Pekko 1.0.3
- Scala: 2.12.11 to 2.13.12
- SLF4J: 1.6.1 to 2.0.9
- Logback: 1.0.7 to 1.4.14
- Jackson: 2.13.5 to 2.14.3
- Netty: 4.1.44 to 4.1.93

## Key Changes

### Dependencies

All Maven POM files updated with new versions. Play Framework groupId changed from com.typesafe.play to org.playframework. Scala library exclusions added to prevent version conflicts between Scala 2.12 and 2.13.

### Source Code

All Akka imports migrated to Pekko across Java files:
- akka.actor.* to org.apache.pekko.actor.*
- akka.event.* to org.apache.pekko.event.*
- akka.pattern.* to org.apache.pekko.pattern.*
- akka.routing.* to org.apache.pekko.routing.*
- akka.util.* to org.apache.pekko.util.*
- akka.testkit.* to org.apache.pekko.testkit.*
- akka.stream.* to org.apache.pekko.stream.*

### Configuration

application.conf files updated with Pekko namespaces:
- akka configuration blocks changed to pekko
- Actor system configurations migrated
- Serialization bindings updated
- Dispatcher references changed
- Logger references updated to Pekko

### Scala API Updates

- scala.compat.java8.FutureConverters updated to scala.jdk.javaapi.FutureConverters
- FutureConverters.toJava() changed to FutureConverters.asJava()

## Build Instructions

Build all modules:
```
mvn clean install -DskipTests
```

Create distribution package:
```
cd service
mvn play2:dist
```

## Migration Impact

Business Logic: No changes to business logic or functionality
API Compatibility: Maintained, as Pekko is API-compatible with Akka 2.6
Code Changes: Primarily package name updates from akka to pekko
License: Now compliant with Apache 2.0 throughout the stack


## Files Modified

- POM files (dependency management)
- Java source files (import migrations)
- Configuration files (namespace updates)

## Known Issues

Test Failures: Some unit tests fail due to PowerMock compatibility with Java 11 module system. This is a known PowerMock issue unrelated to the Pekko migration. The compilation and build are fully successful.

Scala Version Conflicts: If you encounter NoClassDefFoundError for scala.collection.GenMap, verify dependency tree to ensure no Scala 2.12 artifacts are present. Run mvn dependency:tree and add exclusions for any scala-library or scala-reflect with version 2.12.
Loading
Loading