Skip to content

pulling enterprise master #786

Merged
JJ-Author merged 10 commits intodbpedia:masterfrom
DBpedia-Enterprise:master
Sep 29, 2025
Merged

pulling enterprise master #786
JJ-Author merged 10 commits intodbpedia:masterfrom
DBpedia-Enterprise:master

Conversation

@JJ-Author
Copy link
Copy Markdown
Contributor

@JJ-Author JJ-Author commented Sep 26, 2025

Summary by CodeRabbit

  • New Features

    • Added an all-in-one (with dependencies) server JAR artifact for easier deployment.
  • Bug Fixes

    • Corrected mapping namespace resolution for Wikidata.
    • Improved resilience when local mapping files are missing by logging a warning and continuing.
  • Chores

    • Introduced automated snapshot deployment via GitHub Actions on master pushes.
    • Switched snapshot publishing to GitHub Packages for Maven artifacts.
  • Build

    • Updated build configuration to produce and publish snapshot artifacts to GitHub Packages.

@JJ-Author JJ-Author requested a review from Copilot September 26, 2025 10:57
Copy link
Copy Markdown

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

This PR merges changes from enterprise master, updating the project's build configuration and extraction logic. The changes include modifications to support Wikidata namespace handling and updates to Maven deployment configuration.

  • Added special handling for Wikidata language in the extraction manager
  • Updated Maven configuration to use GitHub Packages for snapshot deployment
  • Replaced existing GitHub Actions workflows with a new snapshot deployment workflow

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
server/src/main/scala/org/dbpedia/extraction/server/ExtractionManager.scala Added conditional logic to use English namespace for Wikidata language
server/pom.xml Added Maven Assembly plugin configuration for creating JAR with dependencies
pom.xml Updated distribution management to use GitHub Packages instead of Sonatype
.github/workflows/snapshot_deploy.yml Added new workflow for deploying snapshots to GitHub Packages
.github/workflows/minidumpdoc.yml Removed existing minidump documentation workflow
.github/workflows/maven.yml Removed existing Maven build and test workflow

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +151 to +156
val namespace = language.wikiCode match {
case "wikidata" =>
Namespace.mappings(Language.English)
case _ =>
Namespace.mappings.getOrElse(language, throw new NoSuchElementException("no mapping namespace for language "+language.wikiCode))
}
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

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

The hardcoded string 'wikidata' should be extracted as a constant to improve maintainability and reduce the risk of typos in future updates.

Copilot uses AI. Check for mistakes.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 29, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a GitHub Actions workflow to deploy snapshots to GitHub Packages, updates root Maven distributionManagement to target GitHub Packages, introduces an assembly plugin in server module to produce a fat JAR during packaging, and adjusts ExtractionManager mapping resolution and local file loading with a special-case for Wikidata and a missing-file guard.

Changes

Cohort / File(s) Summary
Snapshot deploy to GitHub Packages
.github/workflows/snapshot_deploy.yml, pom.xml
New workflow runs on master pushes to deploy snapshots via Maven using GITHUB_TOKEN; root POM switches snapshotRepository from OSSRH to GitHub Packages with id github and uniqueVersion=false.
Server packaging (fat JAR)
server/pom.xml
Adds maven-assembly-plugin (v3.7.1) to build a jar-with-dependencies during the package phase via single goal (execution id assemble-all).
Extraction mapping logic adjustments
server/src/main/scala/.../ExtractionManager.scala
Formatting plus logic changes: in loadMappingPages, Wikidata uses English mappings namespace; local mappings loading now warns and returns empty Mapping if file is missing; other behavior preserved.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant GH as GitHub
  participant GA as GitHub Actions (Snapshot Deploy)
  participant MVN as Maven
  participant GPR as GitHub Packages (Maven)

  Dev->>GH: Push to master
  GH-->>GA: Trigger workflow
  GA->>GA: Checkout repo
  GA->>GA: Setup Java 8 (Temurin)
  GA->>GA: Write Maven settings (server id=github, use GITHUB_TOKEN)
  GA->>MVN: mvn deploy -DskipTests
  MVN->>GPR: Upload snapshot artifacts
  GPR-->>MVN: Accept publish
  MVN-->>GA: Deploy finished
Loading
sequenceDiagram
  autonumber
  participant EM as ExtractionManager
  participant Lang as Language
  participant NS as Namespace
  participant FS as MappingsDir/File
  participant Log as Logger

  EM->>Lang: Get wikiCode
  alt wikiCode == "wikidata"
    EM->>NS: mappings(Language.English)
  else other languages
    EM->>NS: mappings(language).getOrElse(...)
  end

  EM->>FS: Check local mappings file exists?
  alt file exists
    EM->>FS: Load from local file
  else missing file
    EM->>Log: Warn about missing mappings file
    EM-->>EM: Return empty Mapping
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I thump my paws—deploys take flight,
Snapshots hop to Packages by night.
A jar grows stout with all its friends,
While Wikidata borrows English bends.
If files go missing, I sniff and warn—
Then bound along to map the morn. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title “pulling enterprise master” is a vague and generic phrase that does not clearly describe the main changes of adding a GitHub Actions snapshot deployment workflow, updating the Maven distributionManagement settings to GitHub Packages, and including a Maven assembly plugin; as a result, it fails to inform reviewers about the substantive content of the pull request. Please rename the pull request title to a concise, descriptive sentence that highlights the core changes, for example: “Add GitHub Actions Snapshot Deploy Workflow and update Maven distributionManagement to GitHub Packages.”
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ab9bcb and 20e9fab.

📒 Files selected for processing (4)
  • .github/workflows/snapshot_deploy.yml (1 hunks)
  • pom.xml (1 hunks)
  • server/pom.xml (1 hunks)
  • server/src/main/scala/org/dbpedia/extraction/server/ExtractionManager.scala (6 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
server/src/main/scala/org/dbpedia/extraction/server/ExtractionManager.scala (3)
core/src/main/scala/org/dbpedia/extraction/wikiparser/impl/wikipedia/Namespaces.scala (1)
  • namespaces (14-387)
core/src/main/scala/org/dbpedia/extraction/util/Language.scala (4)
  • language (72-91)
  • Language (35-47)
  • Language (63-63)
  • getOrElse (185-185)
core/src/main/scala/org/dbpedia/extraction/sources/WikiSource.scala (2)
  • WikiSource (15-15)
  • fromNamespaces (89-90)
🪛 actionlint (1.7.7)
.github/workflows/snapshot_deploy.yml

14-14: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


17-17: the runner of "actions/setup-java@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build
  • GitHub Check: build
  • GitHub Check: build
🔇 Additional comments (7)
server/pom.xml (1)

19-37: LGTM: Standard fat JAR configuration.

The maven-assembly-plugin configuration is properly set up to create an all-in-one executable JAR with dependencies. The version 3.7.1 is current and the jar-with-dependencies descriptor is the standard approach for this use case.

.github/workflows/snapshot_deploy.yml (2)

3-12: LGTM: Proper workflow configuration.

The workflow trigger on master branch pushes and the permissions setup (contents: read, packages: write) are correctly configured for snapshot deployment to GitHub Packages.


24-40: LGTM: Proper Maven authentication setup.

The Maven settings configuration correctly uses the GitHub token for authentication and the server ID "github" matches the distributionManagement configuration in pom.xml. The deploy command with -DskipTests is appropriate for snapshot deployment.

server/src/main/scala/org/dbpedia/extraction/server/ExtractionManager.scala (3)

151-156: Extract hardcoded "wikidata" string as a constant.

The hardcoded string 'wikidata' should be extracted as a constant to improve maintainability and reduce the risk of typos in future updates.

Apply this diff to extract the constant:

+  private val WIKIDATA_CODE = "wikidata"
+
   protected def loadMappingPages(language : Language) : Map[WikiTitle, WikiPage] =
   {
-        val namespace = language.wikiCode match {
-          case "wikidata" =>
+        val namespace = language.wikiCode match {
+          case WIKIDATA_CODE =>
             Namespace.mappings(Language.English)
           case _ =>
             Namespace.mappings.getOrElse(language, throw new NoSuchElementException("no mapping namespace for language "+language.wikiCode))
         }

162-165: LGTM: Good defensive programming.

The file existence check with warning logging and graceful fallback to an empty mapping is a solid improvement that prevents runtime errors when mapping files are missing.


36-36: LGTM: Clean formatting improvements.

The whitespace and formatting adjustments improve code readability without affecting functionality.

Also applies to: 65-65, 79-79, 87-87, 126-126, 134-134, 158-158, 174-174

pom.xml (1)

515-519: snapshotRepository ID matches workflow server-id
The <snapshotRepository> ID (github) aligns with server-id: github in the deploy workflow, so no further changes are required.

Comment on lines +14 to +22
- uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
server-id: github
settings-path: ${{ github.workspace }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Update action versions to latest.

The GitHub Actions are using outdated versions that may not run properly on current runners.

Apply this diff to update to the latest versions:

-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4

       - name: Set up Java
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
server-id: github
settings-path: ${{ github.workspace }}
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
server-id: github
settings-path: ${{ github.workspace }}
🧰 Tools
🪛 actionlint (1.7.7)

14-14: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


17-17: the runner of "actions/setup-java@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In .github/workflows/snapshot_deploy.yml around lines 14 to 22, the workflow
uses older action versions (actions/checkout@v3 and actions/setup-java@v3);
update them to the current stable releases (e.g., actions/checkout@v4 and
actions/setup-java@v4), keep the existing inputs (distribution, java-version,
server-id, settings-path) compatible with the new setup-java action, commit the
updated action versions, and run the workflow to verify it executes correctly on
the runner.

@JJ-Author JJ-Author merged commit d6ad671 into dbpedia:master Sep 29, 2025
3 of 5 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