Skip to content

Commit

Permalink
Merge remote-tracking branch 'otp/dev-2.x' into otp2_fix_transmodel_a…
Browse files Browse the repository at this point in the history
…pi_relax_transit_group_priority
  • Loading branch information
t2gran committed Jan 11, 2024
2 parents 10da47f + 42dd6f6 commit 333d9da
Show file tree
Hide file tree
Showing 226 changed files with 1,223 additions and 881 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ jobs:
distribution: temurin
cache: maven

- name: Build debug client
working-directory: ./client-next
run: |
npm install
npm run build
- name: Prepare coverage agent, build and test
# these are split into two steps because otherwise maven keeps long-running HTTP connections
# to Maven Central open which then hang during the package phase because the Azure (Github Actions)
Expand Down Expand Up @@ -217,11 +211,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Build debug client
working-directory: ./client-next
run: |
npm install
npm run build
- name: Build container image with Jib, push to Dockerhub
env:
CONTAINER_REPO: docker.io/opentripplanner/opentripplanner
Expand Down
87 changes: 87 additions & 0 deletions .github/workflows/debug-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Debug client

on:
push:
paths:
- 'client-next/**'
pull_request:
paths:
- 'client-next/**'

# to avoid conflicts, make sure that only one workflow pushes to Github at the same time
concurrency:
group: github-push

jobs:
debug-client:
if: github.repository_owner == 'opentripplanner'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
# this is necessary so that the correct credentials are put into the git configuration
# when we push to dev-2.x and push the compiled output to the git repo
- uses: actions/checkout@v4
if: github.event_name == 'push'
with:
token: ${{ secrets.CHANGELOG_TOKEN }}
fetch-depth: 0

# for a simple PR where we don't push, we don't need any credentials
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Set version
run: echo "VERSION=`date +%Y/%m/%Y-%m-%dT%H:%M`" >> $GITHUB_ENV

- name: Build debug client
working-directory: client-next
run: |
npm install
npm run build -- --base https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/${VERSION}/
- name: Deploy compiled assets to repo
if: github.event_name == 'push' && github.ref == 'refs/heads/dev-2.x'
env:
REMOTE: debug-client
LOCAL_BRANCH: local-assets
REMOTE_BRANCH: main
TOKEN: ${{ secrets.CHANGELOG_TOKEN }}
run: |
# Configure git user
git config --global user.name 'OTP Bot'
git config --global user.email '[email protected]'
# Fetch the assets repo
git remote add $REMOTE https://[email protected]/opentripplanner/debug-client-assets.git
git fetch --depth=1 $REMOTE $REMOTE_BRANCH:$LOCAL_BRANCH
git checkout $LOCAL_BRANCH
# Copy the compiled output to a versioned folder
mkdir -p $VERSION
rsync -r client-next/output/* ./$VERSION/
git add $VERSION
git commit -am "Add version ${VERSION} of debug client"
# Push to assets repo https://github.com/opentripplanner/debug-client-assets
git push $REMOTE $LOCAL_BRANCH:$REMOTE_BRANCH
# Switch back to the OTP code
git checkout dev-2.x
git pull --rebase
CLIENT_HTML_OUTPUT=src/client/debug-client-preview/index.html
mkdir -p src/client/debug-client-preview/
cp client-next/output/index.html ${CLIENT_HTML_OUTPUT}
# just to debug
cat ${CLIENT_HTML_OUTPUT}
git add -f ${CLIENT_HTML_OUTPUT}
git commit -m "Upgrade debug client to version ${VERSION}"
git push ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git HEAD:dev-2.x
2 changes: 1 addition & 1 deletion .github/workflows/performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
perf-test:
if: github.repository_owner == 'opentripplanner' && !startsWith(github.event.head_commit.message ,'Bump serialization version id for')
if: github.repository_owner == 'opentripplanner' && !startsWith(github.event.head_commit.message ,'Bump serialization version id for') && !startsWith(github.event.head_commit.message ,'Upgrade debug client to version')
runs-on: performance-test
strategy:
fail-fast: false
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
- dev-2.x
types: [closed]

# to avoid conflicts, make sure that only one workflow pushes to Github at the same time
concurrency:
group: github-push

jobs:
changelog-entry:
if: github.event.pull_request.merged && github.repository_owner == 'opentripplanner' && !contains(github.event.pull_request.labels.*.name, 'skip changelog')
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ gen-py/
node_modules/
target/
/graphs
/src/client/debug-client-preview/

# for local dev only
/src/test/resources/speedtest/travelSearch-results-*.csv
Expand Down
2 changes: 1 addition & 1 deletion client-next/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default defineConfig({
plugins: [react()],
base: '/debug-client-preview/',
build: {
outDir: '../src/client/debug-client-preview',
outDir: 'output',
emptyOutDir: true,
},
});
18 changes: 9 additions & 9 deletions doc-templates/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ The result will look like this:
}
```

# System-wide Configuration
## System-wide Configuration

Using the file `otp-config.json` you can enable or disable different APIs and experimental
[Sandbox Extensions](SandboxExtension.md). By default, all supported APIs are enabled and all
Expand All @@ -185,7 +185,7 @@ Features that can be toggled in this file are generally only affect the routing
but for consistency all such "feature flags", even those that would affect graph building, are
managed in this one file.

## OTP Features
### OTP Features

Here is a list of all features which can be toggled on/off and their default values.

Expand All @@ -205,27 +205,27 @@ Here is a list of all features which can be toggled on/off and their default val
```


# JVM configuration
## JVM configuration

This section contains general recommendations for tuning the JVM in a production environment.
It focuses mainly on garbage collection configuration and memory settings.
See [Garbage Collector Tuning](https://docs.oracle.com/en/java/javase/17/gctuning/introduction-garbage-collection-tuning.html) for general information on garbage collection.
See [Large Pages in Java](https://kstefanj.github.io/2021/05/19/large-pages-and-java.html) and [Transparent Huge Pages](https://shipilev.net/jvm/anatomy-quarks/2-transparent-huge-pages) for general information on large memory pages.


## OTP server
### OTP server

The OTP server processes concurrent routing requests in real time.
The main optimization goal for the OTP server is minimizing response time.


### Garbage collector
#### Garbage collector

- The G1 garbage collector (default since Java 9) offers a good compromise between low latency (i.e. low GC pause time) and GC overhead.
- If latency spikes are an issue, the ZGC garbage collector is an alternative. It produces in general more overhead than G1.


### Memory settings
#### Memory settings

- Using Large Memory Pages can reduce pressure on the TLB cache and increase performance.
- It is in general not recommended to use large memory page in _Transparent Huge Page_ mode (`-XX:+UseTransparentHugePages`) for latency-sensitive applications, since memory is allocated on-demand and this can induce latency spikes if the memory is fragmented.
Expand All @@ -235,20 +235,20 @@ The physical memory can be committed upfront, at JVM startup time. This can be d
Example: `-Xms18g -Xmx18g -XX:+UseTransparentHugePages -XX:+AlwaysPreTouch`


## Graph Builder
### Graph Builder

The Graph Builder is the non-interactive mode used to build street graphs and transit graphs.
The main optimization goal for the Graph Builder is minimizing total build time.


### Garbage collector
#### Garbage collector

- In theory, the Parallel garbage collector offers the best throughput.
In practice, it can be challenging to optimize the Parallel GC to build both a street graph and a transit graph, the memory usage patterns being different.
- The G1 garbage collector provides in general a good compromise.


### Memory settings
#### Memory settings

- Using Large Memory Pages can reduce pressure on the TLB cache and increase performance.
- Since latency is not an issue, Large Memory Pages can be used indifferently in _TLBFS_ mode (`-XX:+UseHugeTLBFS`) or _Transparent Huge Page_ mode (`-XX:+UseTransparentHugePages`)
4 changes: 3 additions & 1 deletion docs/Basic-Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ states, from which you can prepare your own smaller bounding-box extracts
using [Osmosis](http://wiki.openstreetmap.org/wiki/Osmosis#Extracting_bounding_boxes)
, [osmconvert](http://wiki.openstreetmap.org/wiki/Osmconvert#Applying_Geographical_Borders), or (our
favorite) [Osmium-Tool](https://osmcode.org/osmium-tool/manual.html#creating-geographic-extracts).
There is also [Protomaps](https://app.protomaps.com/) which can create custom extracts
for any region of the world with an easy to use drag and drop interface.
OSM data can be delivered as XML or in the more compact binary PBF format. OpenTripPlanner consumes
only PBF because it's smaller and more efficient.

Expand Down Expand Up @@ -202,4 +204,4 @@ You can run the OTP .jar file with the `--help` option for a full list of comman

## Exploring the API

If you want to learn how to use OTP's API's, check out the [GraphQL tutorial](apis/GraphQL-Tutorial.md).
If you want to learn how to use OTP's API's, check out the [GraphQL tutorial](apis/GraphQL-Tutorial.md).
9 changes: 8 additions & 1 deletion docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle
- Fix serialization of `AtomicInteger` [#5508](https://github.com/opentripplanner/OpenTripPlanner/pull/5508)
- Improve linking of fixed stops used by flex trips [#5503](https://github.com/opentripplanner/OpenTripPlanner/pull/5503)
- Keep min transfer filter is not local to group-by-filters [#5436](https://github.com/opentripplanner/OpenTripPlanner/pull/5436)
- Add paging deduplication when cropping. [#5458](https://github.com/opentripplanner/OpenTripPlanner/pull/5458)
- Add paging deduplication when cropping [#5458](https://github.com/opentripplanner/OpenTripPlanner/pull/5458)
- Consolidate equivalent stops from several feeds [#5429](https://github.com/opentripplanner/OpenTripPlanner/pull/5429)
- Check transport mode when mapping GroupStops [#5518](https://github.com/opentripplanner/OpenTripPlanner/pull/5518)
- Cleanup trip times - Part A [#5437](https://github.com/opentripplanner/OpenTripPlanner/pull/5437)
Expand All @@ -65,6 +65,13 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle
- GTFS Flex spec update: separate columns for `location_id`, `location_group_id` [#5564](https://github.com/opentripplanner/OpenTripPlanner/pull/5564)
- Report NO_TRANSIT_CONNECTION when search-window is set. [#5570](https://github.com/opentripplanner/OpenTripPlanner/pull/5570)
- Transit priority - part 3 [#5583](https://github.com/opentripplanner/OpenTripPlanner/pull/5583)
- Fix preference cost comparisons [#5586](https://github.com/opentripplanner/OpenTripPlanner/pull/5586)
- Report and throw away trip-times which fail sanity check [#5587](https://github.com/opentripplanner/OpenTripPlanner/pull/5587)
- Consider escalator edges in island pruning [#5591](https://github.com/opentripplanner/OpenTripPlanner/pull/5591)
- Create own rental preferences for bike and car in the internal model [#5562](https://github.com/opentripplanner/OpenTripPlanner/pull/5562)
- Adding situation-version to TransmodelGraphQL API [#5592](https://github.com/opentripplanner/OpenTripPlanner/pull/5592)
- Move REST API into sandbox [#5580](https://github.com/opentripplanner/OpenTripPlanner/pull/5580)
- Fix high walk reluctance leading to zero egress results for rental searches [#5605](https://github.com/opentripplanner/OpenTripPlanner/pull/5605)
[](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE)

## 2.4.0 (2023-09-13)
Expand Down
19 changes: 10 additions & 9 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ The result will look like this:
}
```

# System-wide Configuration
## System-wide Configuration

Using the file `otp-config.json` you can enable or disable different APIs and experimental
[Sandbox Extensions](SandboxExtension.md). By default, all supported APIs are enabled and all
Expand All @@ -212,7 +212,7 @@ Features that can be toggled in this file are generally only affect the routing
but for consistency all such "feature flags", even those that would affect graph building, are
managed in this one file.

## OTP Features
### OTP Features

Here is a list of all features which can be toggled on/off and their default values.

Expand Down Expand Up @@ -242,6 +242,7 @@ Here is a list of all features which can be toggled on/off and their default val
| `FaresV2` | Enable import of GTFS-Fares v2 data. | | ✓️ |
| `FlexRouting` | Enable FLEX routing. | | ✓️ |
| `GoogleCloudStorage` | Enable Google Cloud Storage integration. | | ✓️ |
| `LegacyRestApi` | Enable legacy REST API. This API will be removed in the future. | ✓️ | ✓️ |
| `RealtimeResolver` | When routing with ignoreRealtimeUpdates=true, add an extra step which populates results with real-time data | | ✓️ |
| `ReportApi` | Enable the report API. | | ✓️ |
| `RestAPIPassInDefaultConfigAsJson` | Enable a default RouteRequest to be passed in as JSON on the REST API - FOR DEBUGGING ONLY! | | |
Expand All @@ -268,27 +269,27 @@ Here is a list of all features which can be toggled on/off and their default val
```


# JVM configuration
## JVM configuration

This section contains general recommendations for tuning the JVM in a production environment.
It focuses mainly on garbage collection configuration and memory settings.
See [Garbage Collector Tuning](https://docs.oracle.com/en/java/javase/17/gctuning/introduction-garbage-collection-tuning.html) for general information on garbage collection.
See [Large Pages in Java](https://kstefanj.github.io/2021/05/19/large-pages-and-java.html) and [Transparent Huge Pages](https://shipilev.net/jvm/anatomy-quarks/2-transparent-huge-pages) for general information on large memory pages.


## OTP server
### OTP server

The OTP server processes concurrent routing requests in real time.
The main optimization goal for the OTP server is minimizing response time.


### Garbage collector
#### Garbage collector

- The G1 garbage collector (default since Java 9) offers a good compromise between low latency (i.e. low GC pause time) and GC overhead.
- If latency spikes are an issue, the ZGC garbage collector is an alternative. It produces in general more overhead than G1.


### Memory settings
#### Memory settings

- Using Large Memory Pages can reduce pressure on the TLB cache and increase performance.
- It is in general not recommended to use large memory page in _Transparent Huge Page_ mode (`-XX:+UseTransparentHugePages`) for latency-sensitive applications, since memory is allocated on-demand and this can induce latency spikes if the memory is fragmented.
Expand All @@ -298,20 +299,20 @@ The physical memory can be committed upfront, at JVM startup time. This can be d
Example: `-Xms18g -Xmx18g -XX:+UseTransparentHugePages -XX:+AlwaysPreTouch`


## Graph Builder
### Graph Builder

The Graph Builder is the non-interactive mode used to build street graphs and transit graphs.
The main optimization goal for the Graph Builder is minimizing total build time.


### Garbage collector
#### Garbage collector

- In theory, the Parallel garbage collector offers the best throughput.
In practice, it can be challenging to optimize the Parallel GC to build both a street graph and a transit graph, the memory usage patterns being different.
- The G1 garbage collector provides in general a good compromise.


### Memory settings
#### Memory settings

- Using Large Memory Pages can reduce pressure on the TLB cache and increase performance.
- Since latency is not an issue, Large Memory Pages can be used indifferently in _TLBFS_ mode (`-XX:+UseHugeTLBFS`) or _Transparent Huge Page_ mode (`-XX:+UseTransparentHugePages`)
4 changes: 2 additions & 2 deletions docs/Developers-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ There are several ways to get involved:

* Create pull requests citing the relevant issue.

* Join developer meetings hosted twice a week. Check the specific times
on [this calendar](https://calendar.google.com/calendar/u/0/[email protected])
* Join developer meetings hosted twice a week. Check the specific times and URLs
on [this page](https://github.com/opentripplanner/OpenTripPlanner/blob/dev-2.x/CONTRIBUTING.md#developer-meetings)

### Branches and Branch Protection

Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mkdocs==1.5.3
mkdocs-material==9.4.2
mkdocs-material==9.5.3
mike@git+https://github.com/jimporter/mike.git@f0522f245e64687dd18384fbd86b721175711474
mkdocs-no-sitemap-plugin==0.0.1
Loading

0 comments on commit 333d9da

Please sign in to comment.