-
Notifications
You must be signed in to change notification settings - Fork 7
Minor improvements to manage migrations #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a5bb215
938d94c
815e2f6
00d04bb
384252c
9f90ce5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,27 +9,21 @@ jobs: | |||||
| name: Build | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - uses: actions/checkout@v3 | ||||||
| - uses: actions/checkout@v6 | ||||||
| with: | ||||||
| fetch-depth: 0 | ||||||
|
|
||||||
| - name: Set up JDK 11 | ||||||
| uses: actions/setup-java@v3 | ||||||
| uses: actions/setup-java@v5 | ||||||
| with: | ||||||
| java-version: 11 | ||||||
| distribution: 'adopt' | ||||||
| distribution: 'temurin' | ||||||
| cache: maven | ||||||
|
|
||||||
| - name: Get Project Version from pom.xml | ||||||
| uses: entimaniac/read-pom-version-action@1.0.0 | ||||||
| id: getVersion | ||||||
|
|
||||||
| - name: Cache Maven packages | ||||||
| uses: actions/cache@v3 | ||||||
| with: | ||||||
| path: ~/.m2 | ||||||
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||||||
| restore-keys: ${{ runner.os }}-m2 | ||||||
|
|
||||||
| - name: Build | ||||||
| run: mvn clean verify -DskipTests=true | ||||||
|
|
||||||
|
|
@@ -71,22 +65,16 @@ jobs: | |||||
| echo $ELASTIC_SEARCH_URL | ||||||
| curl -fsSL "$ELASTIC_SEARCH_URL/_cat/health?h=status" | ||||||
|
|
||||||
| - uses: actions/checkout@v3 | ||||||
| - uses: actions/checkout@v6 | ||||||
| with: | ||||||
| fetch-depth: 0 | ||||||
|
|
||||||
| - name: Set up JDK 11 | ||||||
| uses: actions/setup-java@v3 | ||||||
| uses: actions/setup-java@v5 | ||||||
| with: | ||||||
| java-version: 11 | ||||||
| distribution: 'adopt' | ||||||
|
|
||||||
| - name: Cache Maven packages | ||||||
| uses: actions/cache@v3 | ||||||
| with: | ||||||
| path: ~/.m2 | ||||||
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||||||
| restore-keys: ${{ runner.os }}-m2 | ||||||
| distribution: 'temurin' | ||||||
| cache: maven | ||||||
|
|
||||||
| - name: Generate certificates | ||||||
| run: cd src/main/resources/certificates && openssl genrsa -out keypair.pem 4096 && openssl rsa -in keypair.pem -pubout -out public.crt && openssl pkcs8 -topk8 -inform PEM -outform DER -nocrypt -in keypair.pem -out private.der && cd ../../../.. | ||||||
|
|
@@ -108,7 +96,7 @@ jobs: | |||||
| contents: read | ||||||
| packages: write | ||||||
| steps: | ||||||
| - uses: actions/checkout@v3 | ||||||
| - uses: actions/checkout@v6 | ||||||
|
|
||||||
| - id: install-secret-key | ||||||
| name: Install gpg secret key | ||||||
|
|
@@ -117,10 +105,11 @@ jobs: | |||||
| gpg --list-secret-keys --keyid-format LONG | ||||||
|
|
||||||
| - name: Set up Maven Central Repository | ||||||
| uses: actions/setup-java@v3 | ||||||
| uses: actions/setup-java@v5 | ||||||
| with: | ||||||
| java-version: 11 | ||||||
| distribution: 'adopt' | ||||||
| distribution: 'temurin' | ||||||
| cache: maven | ||||||
| server-id: central | ||||||
| server-username: MAVEN_USERNAME | ||||||
| server-password: MAVEN_PASSWORD | ||||||
|
|
@@ -141,26 +130,20 @@ jobs: | |||||
|
|
||||||
| steps: | ||||||
| - name: Checkout repository | ||||||
| uses: actions/checkout@v3 | ||||||
| uses: actions/checkout@v6 | ||||||
|
|
||||||
| - name: Set up JDK 11 | ||||||
| uses: actions/setup-java@v3 | ||||||
| uses: actions/setup-java@v5 | ||||||
| with: | ||||||
| java-version: 11 | ||||||
| distribution: 'adopt' | ||||||
|
|
||||||
| - name: Cache Maven packages | ||||||
| uses: actions/cache@v3 | ||||||
| with: | ||||||
| path: ~/.m2 | ||||||
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||||||
| restore-keys: ${{ runner.os }}-m2 | ||||||
| distribution: 'temurin' | ||||||
| cache: maven | ||||||
|
|
||||||
| - name: Build | ||||||
| run: mvn -P docker-build clean package install -DskipTests=true | ||||||
|
|
||||||
| - name: Log in to Docker Hub | ||||||
| uses: docker/login-action@v1 | ||||||
| uses: docker/login-action@v4 | ||||||
| with: | ||||||
| username: ${{ secrets.DOCKER_USERNAME }} | ||||||
| password: ${{ secrets.DOCKER_AUTH_TOKEN }} | ||||||
|
|
@@ -170,14 +153,14 @@ jobs: | |||||
| id: getVersion | ||||||
|
|
||||||
| - name: Push Version ${{ steps.getVersion.outputs.version }} | ||||||
| uses: docker/build-push-action@v3 | ||||||
| uses: docker/build-push-action@v7 | ||||||
| with: | ||||||
| push: true | ||||||
| tags: netgrif/application-engine:${{ steps.getVersion.outputs.version }} | ||||||
|
|
||||||
| - name: Push Latest | ||||||
| if: ${{ !contains(steps.getVersion.outputs.version, '-SNAPSHOT') }} | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix extra space after colon in conditional. Static analysis flagged "too many spaces after colon" on this line. 🔧 Proposed fix- if: ${{ !contains(steps.getVersion.outputs.version, '-SNAPSHOT') }}
+ if: ${{ !contains(steps.getVersion.outputs.version, '-SNAPSHOT') }}📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.38.0)[error] 162-162: too many spaces after colon (colons) 🤖 Prompt for AI Agents |
||||||
| uses: docker/build-push-action@v3 | ||||||
| uses: docker/build-push-action@v7 | ||||||
| with: | ||||||
| push: true | ||||||
| tags: netgrif/application-engine:latest | ||||||
|
|
@@ -190,19 +173,13 @@ jobs: | |||||
| contents: read | ||||||
| packages: write | ||||||
| steps: | ||||||
| - uses: actions/checkout@v3 | ||||||
| - uses: actions/checkout@v6 | ||||||
|
|
||||||
| - uses: actions/setup-java@v3 | ||||||
| - uses: actions/setup-java@v5 | ||||||
| with: | ||||||
| java-version: '11' | ||||||
| distribution: 'adopt' | ||||||
|
|
||||||
| - name: Cache Maven packages | ||||||
| uses: actions/cache@v3 | ||||||
| with: | ||||||
| path: ~/.m2 | ||||||
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||||||
| restore-keys: ${{ runner.os }}-m2 | ||||||
| distribution: 'temurin' | ||||||
| cache: maven | ||||||
|
|
||||||
| - name: Publish artifact on GitHub Packages | ||||||
| run: mvn -B -P github-publish clean deploy -DskipTests | ||||||
|
|
@@ -219,7 +196,7 @@ jobs: | |||||
| id-token: write | ||||||
| security-events: write | ||||||
| steps: | ||||||
| - uses: actions/checkout@v3 | ||||||
| - uses: actions/checkout@v6 | ||||||
|
|
||||||
| - name: Build | ||||||
| run: mvn clean package install -DskipTests=true | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -91,6 +91,27 @@ | |||||||||||||||||||||||||||||||||||||||||||
| <!-- <id>mulesoft</id>--> | ||||||||||||||||||||||||||||||||||||||||||||
| <!-- <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>--> | ||||||||||||||||||||||||||||||||||||||||||||
| <!-- </repository>--> | ||||||||||||||||||||||||||||||||||||||||||||
| <repository> | ||||||||||||||||||||||||||||||||||||||||||||
| <id>central</id> | ||||||||||||||||||||||||||||||||||||||||||||
| <url>https://repo.maven.apache.org/maven2</url> | ||||||||||||||||||||||||||||||||||||||||||||
| <releases> | ||||||||||||||||||||||||||||||||||||||||||||
| <enabled>true</enabled> | ||||||||||||||||||||||||||||||||||||||||||||
| </releases> | ||||||||||||||||||||||||||||||||||||||||||||
| <snapshots> | ||||||||||||||||||||||||||||||||||||||||||||
| <enabled>false</enabled> | ||||||||||||||||||||||||||||||||||||||||||||
| </snapshots> | ||||||||||||||||||||||||||||||||||||||||||||
| </repository> | ||||||||||||||||||||||||||||||||||||||||||||
| <repository> | ||||||||||||||||||||||||||||||||||||||||||||
| <name>Central Portal Snapshots</name> | ||||||||||||||||||||||||||||||||||||||||||||
| <id>central-portal-snapshots</id> | ||||||||||||||||||||||||||||||||||||||||||||
| <url>https://central.sonatype.com/repository/maven-snapshots/</url> | ||||||||||||||||||||||||||||||||||||||||||||
| <releases> | ||||||||||||||||||||||||||||||||||||||||||||
| <enabled>false</enabled> | ||||||||||||||||||||||||||||||||||||||||||||
| </releases> | ||||||||||||||||||||||||||||||||||||||||||||
| <snapshots> | ||||||||||||||||||||||||||||||||||||||||||||
| <enabled>true</enabled> | ||||||||||||||||||||||||||||||||||||||||||||
| </snapshots> | ||||||||||||||||||||||||||||||||||||||||||||
| </repository> | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+94
to
+114
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
python - <<'PY'
import xml.etree.ElementTree as ET
ns = {'m': 'http://maven.apache.org/POM/4.0.0'}
root = ET.parse('pom.xml').getroot()
print("Top-level repositories:")
for repo in root.findall('./m:repositories/m:repository', ns):
rid = repo.findtext('m:id', default='', namespaces=ns)
url = repo.findtext('m:url', default='', namespaces=ns)
rel = repo.findtext('m:releases/m:enabled', default='(default)', namespaces=ns)
snap = repo.findtext('m:snapshots/m:enabled', default='(default)', namespaces=ns)
print(f" {rid}: releases={rel}, snapshots={snap}, url={url}")
print("\nDependencies/plugins with explicit SNAPSHOT or ranged versions:")
found = False
for path in ('.//m:dependency[m:version]', './/m:plugin[m:version]'):
for node in root.findall(path, ns):
version = node.findtext('m:version', namespaces=ns)
if version and ('SNAPSHOT' in version or version.startswith('[') or version.startswith('(')):
gid = node.findtext('m:groupId', namespaces=ns)
aid = node.findtext('m:artifactId', namespaces=ns)
print(f" {gid}:{aid}:{version}")
found = True
if not found:
print(" (none)")
PYRepository: netgrif/application-engine Length of output: 441 Scope the snapshot repository to a profile, or remove it entirely. The top-level snapshot repository allows snapshot resolution for every build, weakening reproducibility. No dependencies or plugins in this POM declare snapshot or ranged versions, so the Suggested change- <repository>
- <id>central</id>
- <url>https://repo.maven.apache.org/maven2</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <name>Central Portal Snapshots</name>
- <id>central-portal-snapshots</id>
- <url>https://central.sonatype.com/repository/maven-snapshots/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
| <repository> | ||||||||||||||||||||||||||||||||||||||||||||
| <id>jitpack.io</id> | ||||||||||||||||||||||||||||||||||||||||||||
| <url>https://jitpack.io</url> | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -315,6 +336,11 @@ | |||||||||||||||||||||||||||||||||||||||||||
| <artifactId>batik-all</artifactId> | ||||||||||||||||||||||||||||||||||||||||||||
| <version>1.17</version> | ||||||||||||||||||||||||||||||||||||||||||||
| </dependency> | ||||||||||||||||||||||||||||||||||||||||||||
| <dependency> | ||||||||||||||||||||||||||||||||||||||||||||
| <groupId>xml-apis</groupId> | ||||||||||||||||||||||||||||||||||||||||||||
| <artifactId>xml-apis-ext</artifactId> | ||||||||||||||||||||||||||||||||||||||||||||
| <version>1.3.04</version> | ||||||||||||||||||||||||||||||||||||||||||||
| </dependency> | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+339
to
+343
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Batik/SVG usage in source:"
rg -n -C2 'SAXSVGDocumentFactory|BridgeContext|XMLResourceDescriptor|org\.w3c\.dom\.(svg|smil)' src/main src/test || true
echo
echo "Relevant dependency declarations in pom.xml:"
python - <<'PY'
import xml.etree.ElementTree as ET
ns = {'m': 'http://maven.apache.org/POM/4.0.0'}
root = ET.parse('pom.xml').getroot()
for dep in root.findall('.//m:dependencies/m:dependency', ns):
gid = dep.findtext('m:groupId', namespaces=ns)
aid = dep.findtext('m:artifactId', namespaces=ns)
if (gid, aid) in {
('org.apache.xmlgraphics', 'batik-all'),
('xml-apis', 'xml-apis-ext'),
}:
print(f"{gid}:{aid}:{dep.findtext('m:version', namespaces=ns)}")
PYRepository: netgrif/application-engine Length of output: 3032 Add a documentation comment for The dependency is non-obvious when scanning the POM and could be mistakenly removed in future cleanups, despite being required by the Batik-based SVG/PDF rendering path in Suggested change <dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-all</artifactId>
<version>1.17</version>
</dependency>
+ <!-- Required by the Batik-based SVG/PDF rendering path -->
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis-ext</artifactId>
<version>1.3.04</version>
</dependency>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
| <dependency> | ||||||||||||||||||||||||||||||||||||||||||||
| <groupId>commons-io</groupId> | ||||||||||||||||||||||||||||||||||||||||||||
| <artifactId>commons-io</artifactId> | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: netgrif/application-engine
Length of output: 569
🏁 Script executed:
Repository: netgrif/application-engine
Length of output: 143
🏁 Script executed:
Repository: netgrif/application-engine
Length of output: 245
🏁 Script executed:
Repository: netgrif/application-engine
Length of output: 271
🏁 Script executed:
Repository: netgrif/application-engine
Length of output: 132
🏁 Script executed:
Repository: netgrif/application-engine
Length of output: 194
🏁 Script executed:
Repository: netgrif/application-engine
Length of output: 201
🏁 Script executed:
Repository: netgrif/application-engine
Length of output: 52
🏁 Script executed:
Repository: netgrif/application-engine
Length of output: 608
🏁 Script executed:
Repository: netgrif/application-engine
Length of output: 391
🌐 Web query:
MongoDB Java driver 4.6.0 compatibility with MongoDB 6 server💡 Result:
Yes—MongoDB Java Driver 4.6.0 can connect to and work with MongoDB Server 6.0, but it’s marked “⊛” in MongoDB’s official compatibility table, meaning it works, but does not support all newer server features. [1]
If you want a driver version that’s fully compatible (“✓”) with MongoDB 6.0, MongoDB’s table indicates Java driver 4.7+ (and newer) is recommended. [1]
Source
[1] MongoDB Docs – Java Driver compatibility table (shows 4.3–4.6 as ⊛ for MongoDB 6.0, and explains ⊛ vs ✓): (mongodb.com)
Citations:
🌐 Web query:
Spring Boot 2.7.18 MongoDB driver version included bundled💡 Result:
Spring Boot 2.7.18 (via its dependency management /
spring-boot-dependenciesBOM) bundles/manages MongoDB Java Driver 4.6.1:org.mongodb:bson4.6.1org.mongodb:mongodb-driver-core4.6.1org.mongodb:mongodb-driver-sync4.6.1org.mongodb:mongodb-driver-reactivestreams4.6.1org.mongodb:mongodb-driver-legacy4.6.1 [1]Source: Spring Boot’s managed dependency versions table for 2.7.18 (shown on the 2.7.18-SNAPSHOT reference docs, matching the 2.7.18 line). [1]
References
[1] Spring Boot 2.7.18 dependency versions (managed dependencies) https://docs.spring.io/spring-boot/docs/2.7.18-SNAPSHOT/reference/html/dependency-versions.html
Upgrade MongoDB Java driver to 4.7+ for full MongoDB 6 compatibility.
The service container versions have been bumped:
Spring Boot 2.7.18 bundles MongoDB Java Driver 4.6.1, which works with MongoDB 6 but only with partial support (⊛). Per MongoDB's official compatibility table, Java driver 4.7+ is required for full (✓) compatibility with MongoDB 6. The Elasticsearch client version 7.17.2 is compatible with server 7.17.28 (same minor version, patch release difference).
Upgrade the MongoDB driver version to ensure full feature compatibility with the new MongoDB 6 server.
🤖 Prompt for AI Agents