Skip to content

Commit d050df2

Browse files
authored
Merge branch 'main' into fix-1976
2 parents a41f50b + 833380e commit d050df2

15 files changed

Lines changed: 174 additions & 149 deletions

File tree

‎.github/workflows/integration-tests.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353
restore-keys: ${{ runner.os }}-m2
5454
- name: Set up Docker Buildx
5555
uses: docker/setup-buildx-action@v3
56+
with:
57+
version: v0.15.0 # Fix to v0.15.0. Testcontainers has issues with the latest version.
5658
- name: Prepare the maven cache dependencies
5759
run: |
5860
echo "Sync the maven dependencies"
@@ -151,6 +153,8 @@ jobs:
151153
${{ runner.os }}-maven-
152154
- name: Set up Docker Buildx
153155
uses: docker/setup-buildx-action@v3
156+
with:
157+
version: v0.15.0 # Fix to v0.15.0. Testcontainers has issues with the latest version.
154158
- name: inject maven-build-cache into docker
155159
uses: reproducible-containers/buildkit-cache-dance@v3.1.2
156160
with:
@@ -194,5 +198,6 @@ jobs:
194198
docker image ls -a
195199
# Run only a subset for now
196200
mvn -pl ors-test-scenarios -Dtest=${{ matrix.test-class }} test \
201+
-Djunit.jupiter.execution.parallel.config.fixed.parallelism=4 \
197202
-Dcontainer.run.scenario=${{ matrix.test-scenario }} \
198203
-Dcontainer.builder.use_prebuild=true -q

‎.github/workflows/vulnerability-scanning.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ on:
55
branches: [ "main" ]
66
pull_request:
77
branches: [ "main" ]
8-
paths:
9-
- pom.xml
10-
- '**/pom.xml'
11-
- Dockerfile
128
schedule:
139
- cron: '0 0 * * MON'
1410

‎CHANGELOG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ Releasing is documented in RELEASE.md
3636
### Removed
3737

3838
### Fixed
39-
- fix: pass extra_info when querying round_trip ([#1976](https://github.com/GIScience/openrouteservice/issues/1976))
39+
- pass extra_info when querying round_trip ([#1976](https://github.com/GIScience/openrouteservice/issues/1976))
40+
- repair broken integration tests with by pining buildkit 0.15 ([#2003](https://github.com/GIScience/openrouteservice/pull/2003))
4041

4142
### Security
4243

‎RELEASE.md‎

Lines changed: 51 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,59 @@
11
1. Check that
2-
- all relevant PRs are merged
3-
- documentation is up-to-date
4-
- CHANGELOG is up-to-date
5-
- if major version release: release notes for announcement/blog is ready
6-
2. Create a Release branch named releases/vX.X.X and
2+
- all relevant PRs are merged
3+
- documentation is up-to-date
4+
- CHANGELOG is up-to-date
5+
- if major version release: release notes for announcement/blog is ready
6+
2. Select the new release number: We use a number consisting of the parts `<major>.<minor>.<patch>`, in the following abbreviated as `X.Y.Z`. We change the patch version, if the release only contains bugfixes. Releases with additions like new features or not mandatory additional API request parameters etc. are minor releases. If there are breaking changes with require changes e.g. in existing configuration files or API requests, the major version is incremented.
7+
3. Create a Release branch named `releases/vX.Y.Z` and
78
a. Update CHANGELOG.md as follows:
8-
1. Change unreleased to new release number
9-
2. Add today's Date
10-
3. Change unreleased link to compare new release:
11-
[unreleased]: https://github.com/GIScience/openrouteservice/compare/vnew...HEAD
12-
4. Add new compare link below
13-
[new]: https://github.com/GIScience/openrouteservice/compare/vlast...vnew
14-
5. Double check issue links are valid
15-
6. Add [unreleased] section with all subsections as above
16-
b. Update version numbers in POM using
17-
mvn versions:set -DnewVersion=X.X.X
18-
or setting it manually in the main and all child POMs
19-
c. Commit changes as chore or build, and push
20-
d. Open and merge PR as
21-
chore: release vX.X.X
22-
3. Draft a new release on Github
23-
Generate release notes automagically and curate by hand
24-
This also creates the new vX.X.X tag.
25-
4. Check that the following assests exists, after the workflows have finished:
26-
- docker-compose.yml (using the new version)
27-
- ors-config.env
28-
- ors-config.yml
29-
- ors.jar
30-
- ors.war
31-
- Source code (zip)
32-
- Source code (tar.gz)
9+
1. Change unreleased to new release number
10+
2. Add today's Date
11+
3. Change unreleased link to compare new release:
12+
[unreleased]: https://github.com/GIScience/openrouteservice/compare/vnew...HEAD
13+
4. Add new compare link below
14+
[new]: https://github.com/GIScience/openrouteservice/compare/vlast...vnew
15+
5. Double check issue links are valid
16+
6. Add [unreleased] section with all subsections as above
17+
b. Update version numbers in POM using
18+
`mvn versions:set -DnewVersion=X.Y.Z`
19+
or setting it manually in the main and all child POMs
20+
c. Commit changes as chore or build, and push
21+
d. Open and merge PR as
22+
`chore: release vX.Y.Z`
23+
3. After the branch `release/vX.Y.Z` is merged to main, draft a new release on Github.
24+
Generate release notes automagically and curate by hand.
25+
This also creates the new `vX.Y.Z` tag.
26+
4. Check that the following assets exists, after the workflows have finished:
27+
- docker-compose.yml (using the new version)
28+
- ors-config.env
29+
- ors-config.yml
30+
- ors.jar
31+
- ors.war
32+
- Source code (zip)
33+
- Source code (tar.gz)
3334
5. Check that docker images were created correctly:
34-
- vX.X.X should now exist
35-
- latest should point to the new image
36-
- v<major> should point to the new image
37-
6. Change latest and v<major> tags:
35+
- `vX.Y.Z` should now exist
36+
- `latest` should point to the new image
37+
- `vX` should point to the new image
38+
- This is currently set up for openrouteservice/openrouteservice. To copy the docker images also to heigit/openrouteservice, do the following:
39+
```shell
40+
docker pull openrouteservice/openrouteservice:vX.Y.Z
41+
docker tag openrouteservice/openrouteservice:vX.Y.Z heigit/openrouteservice:vX.Y.Z
42+
docker push heigit/openrouteservice:vX.Y.Z
43+
docker tag heigit/openrouteservice:vX.Y.Z heigit/openrouteservice:latest
44+
docker push heigit/openrouteservice:latest
45+
```
46+
6. Change latest and vX tags:
3847
a. Delete tags on github
3948
b. Delete tags locally:
40-
- git tag -d latest
41-
- git tag -d v<major>
42-
c. Re-create tags locally on the new main HEAD
43-
- git tag latest
44-
- git tag v<major>
45-
d. Push new tags
46-
- git push origin tag latest
47-
- git push origin tag v<major>
49+
- git tag -d latest
50+
- git tag -d vX
51+
c. Re-create tags locally on the new main HEAD
52+
- git tag latest
53+
- git tag vX
54+
d. Push new tags
55+
- git push origin tag latest
56+
- git push origin tag vX
4857
7. Update version in POMs to X.Y.Z-SNAPSHOT using
4958
mvn versions:set -DnewVersion=X.Y.Z-SNAPSHOT
5059
8. Check whether outreach, announcement, … is necessary and do so.

‎ors-api/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<relativePath>../pom.xml</relativePath>
3131
<artifactId>openrouteservice</artifactId>
3232
<groupId>org.heigit.ors</groupId>
33-
<version>9.1.1</version>
33+
<version>9.2.0-SNAPSHOT</version>
3434
</parent>
3535

3636
<modelVersion>4.0.0</modelVersion>

‎ors-engine/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<relativePath>../pom.xml</relativePath>
3131
<artifactId>openrouteservice</artifactId>
3232
<groupId>org.heigit.ors</groupId>
33-
<version>9.1.1</version>
33+
<version>9.2.0-SNAPSHOT</version>
3434
</parent>
3535

3636
<modelVersion>4.0.0</modelVersion>

‎ors-report-aggregation/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<relativePath>../pom.xml</relativePath>
44
<artifactId>openrouteservice</artifactId>
55
<groupId>org.heigit.ors</groupId>
6-
<version>9.1.1</version>
6+
<version>9.2.0-SNAPSHOT</version>
77
</parent>
88

99
<modelVersion>4.0.0</modelVersion>

‎ors-test-scenarios/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<relativePath>../pom.xml</relativePath>
88
<artifactId>openrouteservice</artifactId>
99
<groupId>org.heigit.ors</groupId>
10-
<version>9.1.1</version>
10+
<version>9.2.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>ors-test-scenarios</artifactId>

‎ors-test-scenarios/src/test/java/integrationtests/ConfigEnvironmentTest.java‎

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
package integrationtests;
22

3-
import org.junit.jupiter.api.Assertions;
4-
import org.junit.jupiter.api.Disabled;
3+
54
import org.junit.jupiter.api.Nested;
65
import org.junit.jupiter.api.TestInstance;
76
import org.junit.jupiter.api.extension.ExtendWith;
87
import org.junit.jupiter.api.parallel.Execution;
98
import org.junit.jupiter.api.parallel.ExecutionMode;
109
import org.junit.jupiter.params.ParameterizedTest;
1110
import org.junit.jupiter.params.provider.MethodSource;
12-
import org.testcontainers.containers.ContainerLaunchException;
1311
import org.testcontainers.containers.GenericContainer;
1412
import org.testcontainers.junit.jupiter.Testcontainers;
1513
import org.testcontainers.junit.jupiter.TestcontainersExtension;
@@ -24,8 +22,7 @@
2422
import java.util.Map;
2523

2624
import static utils.ContainerInitializer.ContainerTestImageDefaults.WAR_CONTAINER;
27-
import static utils.TestContainersHelper.healthyWaitStrategyWithLogMessage;
28-
import static utils.TestContainersHelper.orsCorrectConfigLoadedWaitStrategy;
25+
import static utils.TestContainersHelper.*;
2926

3027
@ExtendWith(TestcontainersExtension.class)
3128
@Testcontainers(disabledWithoutDocker = true)
@@ -200,30 +197,31 @@ void testActivateEachProfileWithEnvAndOverwriteDefaultConfig(ContainerTestImageD
200197
/**
201198
* arg-overrides-default-prop.sh
202199
*/
203-
@Disabled
204200
@MethodSource("utils.ContainerInitializer#ContainerTestImageDefaultsImageStream")
205201
@ParameterizedTest(name = "{0}")
206202
@Execution(ExecutionMode.CONCURRENT)
207203
void testNonExistentConfigFail(ContainerTestImageDefaults targetImage) {
204+
if (targetImage.equals(WAR_CONTAINER)) {
205+
// This test is not applicable to the WAR container as Tomcat/war does not support command line or random environment variables that are not part of the application.properties.
206+
// Tomcat encapsulates the environment variables and only passes spring-boot managed properties.
207+
return;
208+
}
208209
GenericContainer<?> container = initContainer(targetImage, false, "testNonExistentConfigFail");
209210
// Prepare the environment
210211
container.addEnv("ORS_CONFIG_LOCATION", "nonexistent/ors-config.yaml");
211212

212-
try {
213-
container.start();
213+
container.waitingFor(waitStrategyWithLogMessage(List.of(
214+
"ORS config file not found at: nonexistent/ors-config.yaml",
215+
"Config file 'nonexistent/ors-config.yaml' not found."
216+
).toArray(new String[0]))
217+
);
218+
container.start();
214219

215-
String logs = container.getLogs();
216-
Assertions.assertTrue(logs.contains("ORS config file not found at: nonexistent/ors-config.yaml"));
220+
// Assert ors-config.yml not present for a sane test.
221+
OrsContainerFileSystemCheck.assertFileExists(container, "nonexistent/ors-config.yaml", false);
217222

218-
} catch (ContainerLaunchException e) {
219-
// Pass when throwing this exception since the container is supposed to fail when the config path is wrong.
220-
} catch (Exception e) {
221-
Assertions.fail("Container startup failed with exception: " + e.getMessage());
222-
} finally {
223-
if (container.isRunning()) {
224-
container.stop();
225-
}
226-
}
223+
// Stop the container
224+
container.stop();
227225
}
228226
}
229227
}

‎ors-test-scenarios/src/test/java/integrationtests/ConfigLookupTest.java‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package integrationtests;
22

33
import org.junit.jupiter.api.Assertions;
4-
import org.junit.jupiter.api.Disabled;
54
import org.junit.jupiter.api.Nested;
65
import org.junit.jupiter.api.TestInstance;
76
import org.junit.jupiter.api.extension.ExtendWith;
@@ -267,31 +266,5 @@ void specifyYmlPreferArgOverEnv(ContainerInitializer.ContainerTestImageBare targ
267266
OrsApiHelper.assertProfilesLoaded(container, Map.of("cycling-road", true));
268267
container.stop();
269268
}
270-
271-
/**
272-
* ors-config-location-to-nonexisting-file.sh
273-
* The profile configured as run argument should be preferred over environment variable.
274-
* The default yml file should not be used when ORS_CONFIG_LOCATION is set,
275-
* even if the file does not exist. Fallback to default ors-config.yml is not desired!
276-
*/
277-
@Disabled
278-
@MethodSource("utils.ContainerInitializer#ContainerTestImageBareImageStream")
279-
@ParameterizedTest(name = "{0}")
280-
@Execution(ExecutionMode.CONCURRENT)
281-
void testOrsConfigLocationToNonExistingFile(ContainerInitializer.ContainerTestImageBare targetImage) {
282-
GenericContainer<?> container = initContainer(targetImage, false, "testOrsConfigLocationToNonExistingFile");
283-
container.setCommand(targetImage.getCommand("200M").toArray(new String[0]));
284-
container.addEnv("ORS_CONFIG_LOCATION", "/home/ors/openrouteservice/ors-config-that-does-not-exist.yml");
285-
container.waitingFor(waitStrategyWithLogMessage(List.of(
286-
"Configuration lookup started.",
287-
"Configuration file set by environment variable.",
288-
"Config file '/home/ors/openrouteservice/ors-config-that-does-not-exist.yml' not found.",
289-
"Configuration lookup finished.",
290-
"No profiles configured. Exiting."
291-
).toArray(new String[0])));
292-
container.start();
293-
Assertions.assertTrue(container.isRunning());
294-
container.stop();
295-
}
296269
}
297270
}

0 commit comments

Comments
 (0)