Skip to content

Commit

Permalink
Merge pull request #562 from CDOT-CV/cdot-release_2025-q1
Browse files Browse the repository at this point in the history
Spring Kafka Integration, Partial J2735 2024 Compatibility, and Developer Experience Enhancements
  • Loading branch information
radishco authored Jan 23, 2025
2 parents 8befa43 + d200673 commit 7375fff
Show file tree
Hide file tree
Showing 675 changed files with 67,516 additions and 18,708 deletions.
5 changes: 4 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,7 @@ RUN apt-get install -y g++ cmake libsasl2-dev libsasl2-modules libssl-dev librdk
RUN apt install -y autoconf libtool

ENV REDACTION_PROPERTIES_PATH /workspaces/jpo-ode/jpo-cvdp/config/fieldsToRedact.txt
ENV RPM_DEBUG true
ENV RPM_DEBUG true

# Python3
RUN apt-get install -y python3 python3-venv python3-pip
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
"redhat.java",
"redhat.vscode-commons",
"ms-vscode.cpptools",
"ms-vscode.cmake-tools"
"ms-vscode.cmake-tools",
"ms-vscode.makefile-tools",
"ms-python.python",
"hediet.vscode-drawio"
]
}
},
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ bin/kafka-topics.sh --create --topic "topic.OdeRawEncodedBSMJson" --bootstrap-se

# TIM
bin/kafka-topics.sh --create --topic "topic.OdeTimJson" --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1
bin/kafka-topics.sh --create --topic "topic.OdeTimJsonTMCFiltered" --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1
bin/kafka-topics.sh --create --topic "topic.OdeTimBroadcastJson" --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1
bin/kafka-topics.sh --create --topic "topic.J2735TimBroadcastJson" --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1
bin/kafka-topics.sh --create --topic "topic.OdeTIMCertExpirationTimeJson" --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/artifact-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'adopt'
distribution: 'temurin'
cache: 'maven'

- name: Remove snapshot from version
run: mvn versions:set -DremoveSnapshot
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/checkstyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: checkstyle

on: pull_request

jobs:
checkstyle:
name: runner / checkstyle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dbelyaev/[email protected]
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
level: warning
checkstyle_config: './checkstyle.xml'
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: ci

on: [pull_request, push]
on:
pull_request:
push:
branches:
- "develop"
- "master"
- "release/*"

jobs:
docker:
Expand All @@ -10,6 +16,9 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max

sonar:
runs-on: ubuntu-latest
Expand All @@ -27,4 +36,4 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
ls -la && pwd
mvn -e -X clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.projectKey=usdot.jpo.ode:jpo-ode -Dsonar.projectName=jpo-ode -Dsonar.organization=usdot-jpo-ode -Dsonar.host.url=https://sonarcloud.io -Dsonar.branch.name=$GITHUB_REF_NAME
mvn -e clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.projectKey=usdot.jpo.ode:jpo-ode -Dsonar.projectName=jpo-ode -Dsonar.organization=usdot-jpo-ode -Dsonar.host.url=https://sonarcloud.io -Dsonar.branch.name=$GITHUB_REF_NAME
4 changes: 3 additions & 1 deletion .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
tags: usdotjpoode/jpo-ode:${{ env.TAG }}
tags: usdotjpoode/jpo-ode:${{ env.TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/SNMP_Error.log
/Events.log
/uploads
*.iml
**/*.iml
*.DS_Store
SNMP_Error.log
Events.log
Expand All @@ -22,6 +22,8 @@ settings.xml
.metadata
*.pyc
/kafka/
**/target/**
**/.rewrite-cache/**

####################
### jpo-ode-svcs ###
Expand Down Expand Up @@ -132,4 +134,4 @@ settings.xml

#########################
### jpo-cvdp ###
ppm_data/*
ppm_data/*
14 changes: 14 additions & 0 deletions ATTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,17 @@ The developers also wish to acknowledge the following leaders and contributors:
* Oakridge National Laboratories: Jason Carter and Aaron Ferber

Thanks to the ITS Joint Program Office for their support of the effort.

The J2735 Traveler Information classes were generated using asn1jvm, which is a new ASN.1 compiler targeting Java. The asn1jvm tool is currently capable of compiling the 2016 version of the J2735 ASN.1 specification to Java classes which are capable of serializing and deserializing XER and JER. The output of the tool includes classes with Jackson annotations for each type in the specification, and a runtime library containing base classes for ASN.1 types and custom Jackson serializers and deserialers. The raw output of the tool and associated runtime library are here: https://github.com/iyourshaw/j2735-2016-java

The generated classes were edited for compatibility with the 2020 version of the specification as follows:

* TimDatFrame.java, fields renamed:
* sspTimRights -> notUsed
* sspLocationRights -> notUsed1
* sspMsgRights1 -> notUsed2
* sspMsgRights2 -> notUsed3
* duratonTime -> durationTime
* Classes were moved to Java packages to be consistent with the module organization scheme in the 2020+ versions of J2735, and with Java package naming conventions (lowercase), and existing ODE package naming. Specifically, instead being in a `DSRC` package, the TIM-related classes were moved to `us.dot.its.jpo.ode.plugin.j2735.travelerinformation`, and `us.dot.its.jpo.ode.plugin.j2735.common` packages.

The top level TravelerInformation class was also edited, by changing its base class to `us.dot.its.jpo.ode.plugin.asn1.Asn1Object` to enable it to plug directily into the existing `OdeData`/`OdeMsgPayload` data structure.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM maven:3.8-eclipse-temurin-21-alpine as builder
MAINTAINER [email protected]
FROM maven:3.8-eclipse-temurin-21-alpine AS builder
LABEL org.opencontainers.image.authors="[email protected]"

WORKDIR /home

Expand All @@ -20,13 +20,13 @@ FROM eclipse-temurin:21-jre-alpine

WORKDIR /home

COPY --from=builder /home/jpo-ode-svcs/src/main/resources/application.properties /home
COPY --from=builder /home/jpo-ode-svcs/src/main/resources/application.yaml /home
COPY --from=builder /home/jpo-ode-svcs/src/main/resources/logback.xml /home
COPY --from=builder /home/jpo-ode-svcs/target/jpo-ode-svcs.jar /home
COPY ./scripts/startup_jpoode.sh /home

RUN apk add openssh
RUN apk add openrc
RUN rc-update add sshd
RUN apk --no-cache add openssh \
&& apk --no-cache add openrc \
&& rc-update add sshd

ENTRYPOINT ["sh", "/home/startup_jpoode.sh"]
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ default:
$(info `make build` to build the ODE)
$(info `make stop` to stop the ODE)
$(info `make delete` to stop the ODE and remove the volumes)
$(info `make restart` to stop and then start the ODE)
$(info `make rebuild` to stop, delete, and then rebuild the containers)
$(info `make clean-build` to rebuild the containers without using the cache)

.PHONY: start
start:
ifeq ("$(wildcard .env)", "")
$(error "ERROR: jpo-ode Environment file `.env` not found in ${PWD}")
Expand All @@ -25,14 +27,22 @@ ifeq ("$(wildcard ./jpo-utils/.env)", "")
endif
docker compose build

.PHONY: stop
stop:
docker compose down

.PHONY: delete
delete:
docker compose down -v

.PHONY: restart
restart:
$(MAKE) stop start

.PHONY: rebuild
rebuild:
$(MAKE) stop delete build start

.PHONY: clean-build
clean-build:
docker compose build --no-cache
Loading

0 comments on commit 7375fff

Please sign in to comment.