From b5a712213cfe836f303b4c4dbf69f6249bb70b3e Mon Sep 17 00:00:00 2001 From: Takara Baumbach Date: Mon, 4 Jan 2021 14:25:24 +0100 Subject: [PATCH 1/6] fix runfile error handling --- .gitignore | 3 +++ CHANGELOG.md | 2 ++ .../java/org/heigit/ors/routing/RoutingProfileManager.java | 6 +++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a28f4bd14c..21a2cfa864 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,9 @@ openrouteservice/src/main/resources/app.config* docker/elevation_cache docker/conf +# Ignore ors.run file +*ors.run + app.config.local cgiar_provider/ graphs/ diff --git a/CHANGELOG.md b/CHANGELOG.md index c758de1405..b532911495 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,8 @@ RELEASING: --> ## [Unreleased] +### Added +- output run file to signal completion of graph building/loading at init time ## [6.3.2] - 2020-12-14 ### Added diff --git a/openrouteservice/src/main/java/org/heigit/ors/routing/RoutingProfileManager.java b/openrouteservice/src/main/java/org/heigit/ors/routing/RoutingProfileManager.java index 149967c262..3362a77c35 100644 --- a/openrouteservice/src/main/java/org/heigit/ors/routing/RoutingProfileManager.java +++ b/openrouteservice/src/main/java/org/heigit/ors/routing/RoutingProfileManager.java @@ -625,12 +625,12 @@ public MatrixResult computeMatrix(MatrixRequest req) throws Exception { } public void createRunFile() { - File file=new File("ors.run"); + File file = new File("ors.run"); try (FileWriter fw = new FileWriter(file)) { fw.write("ORS init complete: "+ Instant.now().toString() + "\n"); fw.flush(); - } catch(IOException ex) { - ex.printStackTrace(); + } catch(Exception ex) { + LOGGER.warn("Failed to write ors.run file, this might cause problems with automated testing."); } } } From 7266d3ec3861dc34fa7318f5793545ebc42e1c5c Mon Sep 17 00:00:00 2001 From: Takara Baumbach Date: Tue, 5 Jan 2021 07:53:57 +0100 Subject: [PATCH 2/6] rocket.chat action bug --- .github/workflows/run_maven_tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_maven_tests.yml b/.github/workflows/run_maven_tests.yml index ba788447b0..6d887df1e4 100644 --- a/.github/workflows/run_maven_tests.yml +++ b/.github/workflows/run_maven_tests.yml @@ -41,5 +41,6 @@ jobs: with: type: ${{ job.status }} job_name: '*ORS CI Test*' - commit: true +# this does not work. https://github.com/GIScience/openrouteservice/runs/1648312213?check_suite_focus=true +# commit: false token: ${{ secrets.PROJECT_AUTOMATION }} From 3505c2f6ab8dc4e675fd2bf1af8669cb66619df6 Mon Sep 17 00:00:00 2001 From: Takara Baumbach Date: Mon, 4 Jan 2021 14:25:24 +0100 Subject: [PATCH 3/6] fix runfile error handling --- .gitignore | 3 +++ CHANGELOG.md | 2 ++ .../java/org/heigit/ors/routing/RoutingProfileManager.java | 6 +++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a28f4bd14c..21a2cfa864 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,9 @@ openrouteservice/src/main/resources/app.config* docker/elevation_cache docker/conf +# Ignore ors.run file +*ors.run + app.config.local cgiar_provider/ graphs/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e074632ee..9363fc65b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,8 @@ RELEASING: --> ## [Unreleased] +### Added +- output run file to signal completion of graph building/loading at init time ## [6.3.4] - 2021-01-19 ### Changed diff --git a/openrouteservice/src/main/java/org/heigit/ors/routing/RoutingProfileManager.java b/openrouteservice/src/main/java/org/heigit/ors/routing/RoutingProfileManager.java index 149967c262..3362a77c35 100644 --- a/openrouteservice/src/main/java/org/heigit/ors/routing/RoutingProfileManager.java +++ b/openrouteservice/src/main/java/org/heigit/ors/routing/RoutingProfileManager.java @@ -625,12 +625,12 @@ public MatrixResult computeMatrix(MatrixRequest req) throws Exception { } public void createRunFile() { - File file=new File("ors.run"); + File file = new File("ors.run"); try (FileWriter fw = new FileWriter(file)) { fw.write("ORS init complete: "+ Instant.now().toString() + "\n"); fw.flush(); - } catch(IOException ex) { - ex.printStackTrace(); + } catch(Exception ex) { + LOGGER.warn("Failed to write ors.run file, this might cause problems with automated testing."); } } } From 15881fd5de35d2fc2438a7af68bcf49356d90aad Mon Sep 17 00:00:00 2001 From: Takara Baumbach Date: Tue, 5 Jan 2021 07:53:57 +0100 Subject: [PATCH 4/6] rocket.chat action bug --- .github/workflows/run_maven_tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_maven_tests.yml b/.github/workflows/run_maven_tests.yml index ba788447b0..6d887df1e4 100644 --- a/.github/workflows/run_maven_tests.yml +++ b/.github/workflows/run_maven_tests.yml @@ -41,5 +41,6 @@ jobs: with: type: ${{ job.status }} job_name: '*ORS CI Test*' - commit: true +# this does not work. https://github.com/GIScience/openrouteservice/runs/1648312213?check_suite_focus=true +# commit: false token: ${{ secrets.PROJECT_AUTOMATION }} From 1fe15e3ac303997a6e89f7979693ebeb55e9fd20 Mon Sep 17 00:00:00 2001 From: Takara Baumbach Date: Thu, 21 Jan 2021 11:43:20 +0100 Subject: [PATCH 5/6] add condition to project_automation --- .github/workflows/project_automation.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/project_automation.yml b/.github/workflows/project_automation.yml index 868c7e706e..6a4cec0846 100644 --- a/.github/workflows/project_automation.yml +++ b/.github/workflows/project_automation.yml @@ -12,7 +12,11 @@ jobs: Handle_event: runs-on: ubuntu-latest steps: - - uses: takb/project-board@master + - name: + uses: takb/project-board@master + env: + PROJECT_AUTOMATION: ${{ secrets.PROJECT_AUTOMATION }} + if: env.PROJECT_AUTOMATION != null with: token: "${{ secrets.PROJECT_AUTOMATION }}" owner: "GIScience" From ecc498b369f83b61e55427c478b7a0ae396c7bc4 Mon Sep 17 00:00:00 2001 From: Takara Baumbach Date: Mon, 25 Jan 2021 13:38:41 +0100 Subject: [PATCH 6/6] Update project_automation.yml --- .github/workflows/project_automation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/project_automation.yml b/.github/workflows/project_automation.yml index 6a4cec0846..66a16d1c1b 100644 --- a/.github/workflows/project_automation.yml +++ b/.github/workflows/project_automation.yml @@ -12,7 +12,7 @@ jobs: Handle_event: runs-on: ubuntu-latest steps: - - name: + - name: run project board action uses: takb/project-board@master env: PROJECT_AUTOMATION: ${{ secrets.PROJECT_AUTOMATION }} @@ -23,4 +23,4 @@ jobs: repo: "openrouteservice" project: "16" columnbylabel: '{":bug: bug": "Priority"}' - ignorecolumnnames: "Priority,Assigned,In progress,Review,Awaiting release,Done" \ No newline at end of file + ignorecolumnnames: "Priority,Assigned,In progress,Review,Awaiting release,Done"