Merged
Conversation
…et-enrichment feat: Added config to enable / disable asset enrichment
…ugin fix: Add Sonar Maven plugin to plugin management
fix : Added Sonar Plugin to support the github action workflow
fix: Added Sonar Plugin
* knowlg-service initial commit * reverted cloud storage sdk config * fix: Refactored package structure for controllers and Remove CategoryActor related controller/routes Category Actor is already present in Taxonomy so it is been deprecated in Content * fix: Remove Category Controller * fix: Adding the CategorySpec in taxonomy-api * fix: Add knowlg-service module to project build * fix: Replace references from CategoryController with TaxonomyCategoryController --------- Co-authored-by: aimansharief <aiman.sharief.17@gmail.com>
…sset-enrichment feat: Added config to enable/disable asset enrichment
…nowlg#1146) * feat: Add Knowlg service workflow and config-driven builds * fix: Add initial application.conf for knowlg-service * fix: Upgrading to actions/checkout@v4 to benefit from the latest features, performance improvements, and security updates
Update Kafka client version to 3.7.1
ci(workflows): allow repo var override for Service build
…mentapi-service feat: Add assessment API modules in Knowlg Service
…mentapi-service fix: Update schema base path in config file
…mentapi-service feat: Added github workflow for assessment service and respective config files
…mentapi-service fix: Remove duplicate code
…mentapi-service fix: Refactor controllers package and update dependencies
…ssment-service feat: Add assessment API modules in Knowlg Service
SBCOSS-1020 fix: Bumping dependencies to fix vulnerabilities and fix respective code
Migrate platform to cloud-storage-sdk v2.0.0: add Guice StorageModule and adapt StorageService to inject IStorageService. Update MimeTypeManagerFactory and IProcessor to lazy injector pattern, add StorageModule.java, and modify codepaths (content upload/review/publish/asset copy) to accept implicit StorageService. Update POMs to depend on cloud-storage-sdk-api (2.0.0) and include runtime CSP jars (azure) via profiles, adjust Dockerfiles to accept CSP build-arg and set cloud_storage_* env defaults, and add cloud storage config blocks to several application.conf files. Add docs and verification files (CLOUD_STORAGE_BUILD.md, IMPLEMENTATION_VERIFICATION.md) and new agent/memory notes; update tests to use constructor injection stubs. Build notes: use Maven profiles (-Pazure|aws|gcp|oci) when building and pass --build-arg CSP=<csp> when building Docker images.
* fix: Set the storageKey even when using OIDC mode * fix: Added play dependencies required for compiling StorageModule * fix: Remove explicit source directories to enable java + scala compilation
…nowlg#1179) - QuestionActor.scala: remove redundant 'import scala.collection.JavaConverters' (without wildcard) which is entirely subsumed by the subsequent 'import scala.collection.JavaConverters._' - QuestionSetActor.scala: same JavaConverters duplicate as QuestionActor - LockActor.scala: remove 'import scala.collection.immutable.{List, Map}' — both types are already in scope via scala.Predef and importing them explicitly creates a confusing apparent shadow of the builtins Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…nowlg#1187) new FileOutputStream(csvFile) was passed directly into the OutputStreamWriter constructor. If the OutputStreamWriter constructor threw (e.g. charset encoding error), the FileOutputStream was never assigned to a variable reachable by the finally block, so it leaked. Fix: assign the FileOutputStream to a dedicated variable (fos) first, then pass it to OutputStreamWriter. The finally block now closes fos explicitly, ensuring the file handle is released even when the higher-level writer was never successfully constructed. Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
) Replace inline magic strings and numbers with named constants to improve readability and make future changes easier: - ChannelConstants: add COMPOSITE_SEARCH_URL_CONFIG_KEY and COMPOSITE_SEARCH_URL_DEFAULT; ChannelManager uses them in all 4 call sites instead of repeating the raw string literals - DIALConstants: add DEFAULT_ERROR_CORRECTION_LEVEL ("H"), DEFAULT_PIXELS_PER_BLOCK (2), DEFAULT_QR_CODE_MARGIN (3); DIALManager references them instead of inline literals in defaultConfig map - ContentConstants: add MAX_FILE_PATH_SIZE (100); ContentActor uses it for the pre-signed URL file-path length guard and the error message Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
… leak (Sunbird-Knowlg#1185) KafkaProducer and KafkaConsumer were never closed, causing open connections and thread leaks when services shut down. This adds: - close(): flushes producer, then closes both producer and consumer with individual try/catch so a failure in one doesn't skip closing the other - registerShutdownHook(): registers a JVM shutdown hook to call close() automatically on normal or signal-based process exit Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…dexed access (Sunbird-Knowlg#1184) LinkedList provides O(n) get(i) which degrades performance when fields and sortOrder are accessed by index during query construction. ArrayList provides O(1) random access with no change to the List<T> interface. All three instantiation sites updated, and the now-unused LinkedList import removed. Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…ird-Knowlg#1182) The directory and package declaration contained a typo ('mangers' instead of 'managers'). This caused the file to sit in the wrong package path, making it inconsistent with the surrounding codebase. Changes: - Moved FrameworkManager.scala from sunbird/mangers/ to sunbird/managers/ - Updated package declaration in FrameworkManager.scala - Updated import in FrameworkActor.scala - Updated import in CategoryActor.scala - Updated import in FrameworkManagerTest.scala Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…ook (Sunbird-Knowlg#1188) Two resource management issues fixed: 1. returnConnection() used jedisPool.returnResource() which has been deprecated since Jedis 3.0. Replaced with jedis.close() which correctly returns healthy connections to the pool and closes broken ones. 2. JedisPool was never closed, leaving open connections and background threads after process exit. Added closePool() and a JVM shutdown hook to ensure the pool is always properly released on shutdown. Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sunbird-Knowlg#1191) * refactor: replace println/System.out.println with TelemetryManager logging Replace all raw println and System.out.println calls in business logic with structured TelemetryManager calls (debug/error/warn) so that log output is captured by the platform's logging pipeline and not silently dropped in production. Files changed: - ContentActor.scala: warn for missing default licence - ChannelManager.scala: error for category fetch failure (added import) - NodeValidator.scala: debug for singular identifier lookup (added import) - DataSubGraph.scala: debug for subgraph traversal diagnostics (added import) - StorageService.scala: error for getUri exception (added import) - CollectionTOCUtil.scala: error for validateDIALCodes exception - ObjectCategoryDefinitionActor.scala: debug for fallback _all lookup (added import) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Apply suggestion from @maheshkumargangula Co-authored-by: Mahesh Kumar Gangula <6985261+maheshkumargangula@users.noreply.github.com> * Apply suggestion from @maheshkumargangula Co-authored-by: Mahesh Kumar Gangula <6985261+maheshkumargangula@users.noreply.github.com> --------- Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Mahesh Kumar Gangula <6985261+maheshkumargangula@users.noreply.github.com>
… in CassandraConnector (Sunbird-Knowlg#1183) Two issues fixed: 1. prepareSession() called registerShutdownHook() on every invocation. If getSession() triggered re-preparation (stale/closed session), multiple hooks were registered for the same operation. Added a shutdownHookRegistered boolean guard to ensure exactly one hook is registered for the lifetime of the process. 2. e.printStackTrace() in the catch block sent stack traces to stderr without context. Replaced with TelemetryManager.error() for consistent, structured logging. 3. close() now iterates sessions individually with per-session error handling so a failure on one session does not abort closing others, and clears the map after shutdown. Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…ex to TaxonomyUtil (Sunbird-Knowlg#1193) TermActor and CategoryInstanceActor each contained identical private methods: - generateIdentifier(scopeId, code): slugifies scopeId_code - getIndex / getCategoryIndex: computes next SEQUENCE_MEMBERSHIP index from a node Extracted both to a new TaxonomyUtil object in the utils/taxonomy package. Updated all call sites in both actors to use TaxonomyUtil.generateIdentifier() and TaxonomyUtil.getNextSequenceIndex(). Removed the now-redundant private method definitions and the no-longer-needed Slug / RelationTypes imports. Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…d-Knowlg#1181) * refactor: replace .flatMap(f => f) anti-pattern with .flatten .flatMap(f => f) is a verbose identity flatMap — the idiomatic Scala equivalent is simply .flatten. Applied mechanically across 31 files (115 occurrences) to improve readability with no behaviour change. Affected modules: taxonomy-actors, FrameworkManager, FrameworkActor, CategoryInstanceActor, ObjectCategoryDefinitionActor, ContentActor, HierarchyManager, UpdateHierarchyManager, DataNode, DefinitionNode, RelationValidator, VersioningNode, VersionKeyValidator, FrameworkValidator, CopyManager, FlagManager, AcceptFlagManager, AssetCopyManager, DiscardManager, DIALManager, PublishManager, ReviewManager, UploadManager, ItemSetActor, QuestionActor, QuestionSetActor, assessment CopyManager, parseq Task, CollectionMimeTypeMgrImpl. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: replace non-existent TelemetryManager.debug with TelemetryManager.log to resolve build errors * Replace JavaConverters with jdk.CollectionConverters Switch scala.collection.JavaConverters to scala.jdk.CollectionConverters and simplify conversions by replacing JavaConverters.seqAsJavaListConverter(...).asJava with .toList.asJava in QuestionActor and QuestionSetActor. This removes deprecated API usage (Scala 2.13+ compatibility) and keeps runtime behavior unchanged. --------- Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Mahesh Kumar Gangula <mahesh@sanketika.in>
- Enforces VertexProperty.Cardinality.single to prevent property accumulation in JanusGraph. - Fixes childNodes serialization corruption in HierarchyManager by using .asJava.
Avoid ClassCastException when sorting relations by IL_SEQUENCE_INDEX by casting metadata to Number and using longValue() instead of asInstanceOf[Long]. Applies the safer cast in ItemSetActor.scala and FrameworkManager.scala so sequence indices stored as Integer/Double are handled correctly.
…inality fix: JanusGraph property cardinality and hierarchy serialization fixes
…-sdk-version fix: Bumping cloud store sdk version to 2.0.1
fix: Added google client library to support youtube license validation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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
Test Configuration:
Checklist: