Conversation
There was a problem hiding this comment.
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.
| 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)) | ||
| } |
There was a problem hiding this comment.
The hardcoded string 'wikidata' should be extracted as a constant to improve maintainability and reduce the risk of typos in future updates.
|
Note Other AI code review bot(s) detectedCodeRabbit 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. WalkthroughAdds 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
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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
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.
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 |
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 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
-DskipTestsis 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 withserver-id: githubin the deploy workflow, so no further changes are required.
| - 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 }} |
There was a problem hiding this comment.
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.
| - 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.


Summary by CodeRabbit
New Features
Bug Fixes
Chores
Build