Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
2c7918f
Compile worked targetting Java 17.
MikeNeilson Sep 29, 2026
8da15c1
Start shifting annotations.
MikeNeilson Sep 29, 2026
9a30cb6
Batch of controllers.
MikeNeilson Sep 30, 2026
66134d7
Batch of controllers.
MikeNeilson Sep 30, 2026
de9b19a
Disable ci build while changes are worked through.
MikeNeilson Sep 30, 2026
5318b51
Another batch.
MikeNeilson Sep 30, 2026
b45acd0
Batch of controllers.
MikeNeilson Sep 30, 2026
eb205e7
Last controllers.
MikeNeilson Sep 30, 2026
a5230cc
Start on baseline javalin changes.
MikeNeilson Sep 30, 2026
a047221
Start on tests
MikeNeilson Oct 1, 2026
b013d96
'./gradlew run' 'works'
MikeNeilson Oct 1, 2026
69b32a5
UI renders. (at root context.)
MikeNeilson Oct 1, 2026
e577939
Tests compile.
MikeNeilson Oct 1, 2026
70a17ed
Fix compile issue.
MikeNeilson Oct 1, 2026
5570bbc
At least AccessManagerTestIt runs and passes.
MikeNeilson Oct 2, 2026
4d0d42d
Update behavior.
MikeNeilson Oct 2, 2026
7705aa2
Centralized validation setup.
MikeNeilson Oct 5, 2026
d2f3f5e
Sort out behavioral different with content type charasets.
MikeNeilson Oct 5, 2026
a970ae0
Correct value retrieval for updated Validation class.
MikeNeilson Oct 5, 2026
956455c
restore rate limiting.
MikeNeilson Oct 5, 2026
f6b6a8d
Rate limiting actually working.
MikeNeilson Oct 5, 2026
30c3d55
Primary intergration tests pass.
MikeNeilson Oct 5, 2026
160266a
Enable integration tests for CI build.
MikeNeilson Oct 5, 2026
c6f2033
Restore base feature properties file.
MikeNeilson Oct 5, 2026
942d3bb
Start on unit/functional tests.
MikeNeilson Oct 5, 2026
4b98941
ControllerTest passing with new Context test double.
MikeNeilson Oct 6, 2026
8ad576c
Non integration tests working or removed.
MikeNeilson Oct 6, 2026
ad594f3
Enable test runs.
MikeNeilson Oct 6, 2026
4e5c554
Open API tests passing.
MikeNeilson Oct 6, 2026
f45f3e8
Cleanup.
MikeNeilson Oct 6, 2026
7d0a007
Fix path matching logic.
MikeNeilson Oct 6, 2026
3f28e74
Correctly reanable tests.
MikeNeilson Oct 6, 2026
fbce030
Correct? spec modification.
MikeNeilson Oct 6, 2026
545bba3
config changes for plugin update.
MikeNeilson Oct 6, 2026
50d3e28
Can run from app installDist directory.
MikeNeilson Oct 6, 2026
d4717a4
use provided port. docker compose instance starts.
MikeNeilson Oct 6, 2026
ba0c8e6
allow UI to render in treafik proxy url.
MikeNeilson Oct 6, 2026
5cae95f
Initial start on OpenAPI output spec modification.
MikeNeilson Oct 6, 2026
4c903eb
Update Security Scheme processing.
MikeNeilson Oct 6, 2026
53bd4a2
Work on cleaning up the OpenAPI output.
MikeNeilson Oct 7, 2026
37df0b3
Cleanup API spec.
MikeNeilson Oct 7, 2026
ca048fd
Enable ci jobs.
MikeNeilson Oct 7, 2026
98cd7d3
Correct test.
MikeNeilson Oct 7, 2026
9d8ae74
Correct test for non-null contraint.
MikeNeilson Oct 7, 2026
3f07898
Additional corrections from #1908
MikeNeilson Oct 7, 2026
9074e1d
Correct tests.
MikeNeilson Oct 7, 2026
39c51be
TypeScript generate builds.
MikeNeilson Oct 7, 2026
9382f5f
Cleanup.
MikeNeilson Oct 7, 2026
02da054
update checkout action.
MikeNeilson Oct 7, 2026
efd2d98
Correct test and auth change given UI moved to root.
MikeNeilson Oct 7, 2026
2dc3ee8
Actually correct reference URL.
MikeNeilson Oct 7, 2026
e1b6d86
Fix docker file.
MikeNeilson Oct 7, 2026
887c3e1
reorder Dockerfile build stage.
MikeNeilson Oct 7, 2026
b16d0ec
Fix test.
MikeNeilson Oct 7, 2026
6723e9e
Attempt to fix user role tests.
MikeNeilson Oct 7, 2026
7cfde89
Tweak logging.
MikeNeilson Oct 7, 2026
23fd046
Apply batched suggestions from code review
MikeNeilson Oct 8, 2026
e820c90
Apply batched suggestions from code review
MikeNeilson Oct 8, 2026
84a9e2f
MOve test code to test directory.
MikeNeilson Oct 8, 2026
7d443e9
Correct comment.
MikeNeilson Oct 8, 2026
b45c29a
Cleanup.
MikeNeilson Oct 8, 2026
0b57c55
PR review cleanup.
MikeNeilson Oct 8, 2026
028ef3c
Correction after rebase.
MikeNeilson Oct 9, 2026
70e1ae8
Make use of newly created RatingsDocument reference.
MikeNeilson Oct 9, 2026
4769fe8
Obtain actual version.
MikeNeilson Oct 9, 2026
0388b89
Additional PR review and cleanup.
MikeNeilson Oct 9, 2026
b19de76
Update defaults, move retry-after to most appropriate location.
MikeNeilson Oct 9, 2026
adfe2ce
Correct module behavior or undefined paths.
MikeNeilson Oct 9, 2026
62b8513
Set LRTS header only on paths that handle timeseries.
MikeNeilson Oct 9, 2026
c49aab6
Some progress toward getting the correct security requirements setup.
MikeNeilson Oct 9, 2026
a8cf1d0
Security scheme assignments now set correctly.
MikeNeilson Oct 15, 2026
310cd82
Clean and decision on examples.
MikeNeilson Oct 15, 2026
8358b6b
Cleanup a few paths.
MikeNeilson Oct 15, 2026
8202d80
Delete cwms-data-api/src/main/java/picocli directory
MikeNeilson Oct 15, 2026
3c795dc
Additional corrections.
MikeNeilson Oct 16, 2026
b06d0dc
Additional corrections.
MikeNeilson Oct 16, 2026
3a8fb78
Apply batched suggestions from code review
MikeNeilson Oct 19, 2026
c95ba63
PR review correction.
MikeNeilson Oct 19, 2026
8508634
Correct link.
MikeNeilson Oct 21, 2026
f5c7289
PR review corrections.
MikeNeilson Oct 21, 2026
8ef0429
remove imports.
MikeNeilson Oct 21, 2026
d7f12c4
Correction after rebase.
MikeNeilson Oct 26, 2026
5eca9b7
Update dependencies.
MikeNeilson Oct 27, 2026
2ff8a2d
Clean NPM critical vulns.
MikeNeilson Oct 27, 2026
a687ede
Null check.
MikeNeilson Oct 27, 2026
a2faaf8
Add now required OpenApiNaming element to each DTO.
MikeNeilson Oct 28, 2026
6551e00
Javalin updates for new blob controller.
MikeNeilson Oct 29, 2026
62a5c9e
Improved null handling.
MikeNeilson Oct 29, 2026
9fb835c
Additional correction.
MikeNeilson Oct 29, 2026
da8123e
remove unused library to reduce attack surface.
MikeNeilson Oct 29, 2026
67e3ced
Merge branch 'develop' into feature/1004-update-javalin-drop-tomcat
MikeNeilson Oct 29, 2026
50d37df
Cleanup.
MikeNeilson Oct 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
- name: checkout code
uses: actions/checkout@v5.0.0
uses: actions/checkout@v7.0.1
- name: setup java
uses: actions/setup-java@v5.2.0
with:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
OPEN_API_TEST: "true"
steps:
- name: checkout code
uses: actions/checkout@v5.0.0
uses: actions/checkout@v7.0.1
- name: setup java
uses: actions/setup-java@v5.2.0
with:
Expand All @@ -118,14 +118,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v5.0.0
uses: actions/checkout@v7.0.1
- name: Build docker image
run: docker build -t cda:build-latest .
build-schema-migration-image:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v5.0.0
uses: actions/checkout@v7.0.1
# No uploads, we're just verifying that nothing broke the docker image.
- name: Build Migration image
uses: ./.github/actions/database-migration-image
Expand All @@ -143,7 +143,7 @@ jobs:
if: always() && (github.ref_name == 'develop')
steps:
- name: Badge Branch
uses: actions/checkout@v5.0.0
uses: actions/checkout@v7.0.1
with:
ref: badges
fetch-depth: 1
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/web-gui-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ on:
jobs:
audit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/checkout@v7.0.1
- name: install node for cda-gui audit
uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Guidance for coding agents working in `USACE/cwms-data-api`.
- GitHub repository: `USACE/cwms-data-api`
- Primary branch: `develop`
- Product: CWMS Data API (CDA), formerly RADAR, a REST API for USACE CWMS water data.
- Runtime/build target: Java 11. Newer JDKs may work, but do not introduce Java APIs beyond Java 11.
- Runtime/build target: Java 17. Newer JDKs may work, but do not introduce Java APIs beyond Java 17.
- License/contribution model: MIT license with DCO sign-off expectations in `CONTRIBUTING.md` and `CONTRIBUTORS.md`.
- Formal `CODEOWNERS` is not present. Treat maintainership/review routing as social context, not policy. Visible long-running contributors include Mike Neilson, Ryan Ripken/RMA, Adam Korynta, Bryson Spilman, Ryan Miles, Zach Olson, and Charles Graham. Verify current reviewers on GitHub before assigning or naming people in PR text.

Expand Down
63 changes: 12 additions & 51 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM gradle:8.5-jdk11 AS builder
FROM gradle:8.5-jdk17 AS builder
USER $USER
RUN --mount=type=cache,target=/home/gradle/.gradle
WORKDIR /builddir
COPY . /builddir/
RUN apt update && apt install -y curl
ENV NVM_DIR="/root/.nvm"
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
Expand All @@ -12,55 +10,16 @@ SHELL ["/bin/bash", "-c"]
RUN . "$NVM_DIR/nvm.sh" && nvm install $NODE_VERSION && nvm use $NODE_VERSION
ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
RUN gradle prepareDockerBuild --info --no-daemon

FROM alpine:3.24.3 AS tomcat_base
RUN apk --no-cache upgrade && \
apk --no-cache add \
openjdk11-jre \
curl \
bash


RUN mkdir /download && \
cd /download && \
wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.121/bin/apache-tomcat-9.0.121.tar.gz && \
echo "16494dd4745f808d3c506807b5275521fd71044d976f441d18eeeab0f5a38bc1b5344ca395292f6f26eb7612cd8c8e746d01ccdfb29893d394052d9f4b1f4c11 *apache-tomcat-9.0.121.tar.gz" > checksum.txt && \
sha512sum -c checksum.txt && \
tar xzf apache-tomcat-*tar.gz && \
mv apache-tomcat-9.0.121 /usr/local/tomcat/ && \
cd / && \
rm -rf /usr/local/tomcat/webapps/* && \
mkdir /usr/local/tomcat/webapps/ROOT && \
printf "<%% response.sendRedirect(\"/cwms-data/\"); %%>\n" > /usr/local/tomcat/webapps/ROOT/index.jsp && \
printf "User-agent: *\nAllow: /cwms-data/\nDisallow: /cwms-data/auth/\nDisallow: /cwms-data/catalog/\nDisallow: /cwms-data/timeseries/\nDisallow: /cwms-data/swagger-docs\nDisallow: /auth/\nSitemap: https://cwms-data.usace.army.mil/sitemap.xml\n" > /usr/local/tomcat/webapps/ROOT/robots.txt && \
mkdir -p /usr/local/tomcat/conf/Catalina/localhost
# Now replace the Tomcat logging with logback
# NOTE: I have reviewed this jar in jd-gui and do not see anything malicious, packages are isolated to avoid issues
# with other code.
# Additionally, when we are not also accounting for some legacy systems, we will likely shift to
# Jetty, or Embedded Tomcat, to simplify the deployment process, making this subtitution unnecessary.
RUN cd /download && \
wget https://repo1.maven.org/maven2/com/github/tomcat-slf4j-logback/tomcat9-slf4j-logback/9.0.120/tomcat9-slf4j-logback-9.0.120.jar && \
echo "a24f49d57012472701172d8ec4509faa781a57a51e63b329441bdef80861e4550577fe703a333a7c5a6d5159ff14e96a16be631acef5df2ce14ec3c8cd6dae75 tomcat9-slf4j-logback-9.0.120.jar" > checksum.logback.txt && \
sha512sum -c checksum.logback.txt
RUN cd /download && \
cp tomcat9-slf4j-logback-9.0.120.jar /usr/local/tomcat/bin/tomcat-juli.jar && \
rm /usr/local/tomcat/conf/logging.properties && \
rm -rf /download
CMD ["/usr/local/tomcat/bin/catalina.sh","run"]

FROM tomcat_base AS api
# Do this last no everything above can cache
COPY . /builddir/
WORKDIR /builddir
RUN ./gradlew installDist -x test --info --no-daemon

COPY --from=builder /builddir/cda-gui/dist/sitemap.xml /usr/local/tomcat/webapps/ROOT/sitemap.xml
COPY --from=builder /builddir/cwms-data-api/build/docker/cda/ /usr/local/tomcat
COPY --from=builder /builddir/cwms-data-api/build/docker/context.xml /usr/local/tomcat/conf
COPY --from=builder /builddir/cwms-data-api/build/docker/server.xml /usr/local/tomcat/conf
COPY --from=builder /builddir/cwms-data-api/build/docker/setenv.sh /usr/local/tomcat/bin
COPY --from=builder /builddir/cwms-data-api/build/docker/libs/ /usr/local/tomcat/lib
COPY --from=builder /builddir/cwms-data-api/build/docker/logback.xml /logback.xml
COPY --from=builder /builddir/cwms-data-api/build/docker/logback-juli.xml /logback-juli.xml
COPY --from=builder /builddir/cwms-data-api/build/docker/app-context.xml /usr/local/tomcat/conf/Catalina/localhost/cwms-data.xml
FROM eclipse-temurin:17-jre-alpine-3.24 AS api
RUN apk del brotli-libs
RUN adduser -D cda
COPY --from=builder /builddir/cwms-data-api/build/install/cwms-data-api /cda
COPY --from=builder /builddir/cwms-data-api/src/docker/logback.xml /logback.xml

ENV CDA_JDBC_DRIVER="oracle.jdbc.driver.OracleDriver"
ENV CDA_JDBC_URL=""
Expand All @@ -84,3 +43,5 @@ ENV TS_USE_DMZ_INCLUDE="true"
# used to simplify redeploy in certain contexts. Update to match -<marker> in image label
ENV IMAGE_MARKER="a"
EXPOSE 7000
USER cda
CMD ["/cda/bin/cwms-data-api", "/cwms-data", "/cda/wars/ui.war"]
1 change: 1 addition & 0 deletions access-manager-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies {
exclude group: "org.eclipse.jetty"
exclude group: "org.eclipse.jetty.websocket"
}
compileOnly (libs.bundles.javalin.openapi)
compileOnly(libs.swagger.core) {
exclude group: "jakarta.xml.bind", module: "*"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package cwms.cda.spi;

import io.javalin.http.Context;
import io.swagger.v3.oas.models.security.SecurityScheme;
//import io.swagger.v3.oas.models.security.SecurityScheme;
import io.javalin.openapi.SecurityScheme;
import java.security.Principal;


Expand Down
3 changes: 0 additions & 3 deletions buildSrc/src/main/groovy/cda.deps-conventions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ repositories {
excludeModule("javax.media", "jai_core")
}

maven {
url = uri('https://repo.maven.apache.org/maven2')
}
gradlePluginPortal()
}

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/groovy/cda.java-conventions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ eclipse {

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
sourceCompatibility = '11'
targetCompatibility = '11'
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Comment thread
rma-rripken marked this conversation as resolved.
}

test {
Expand Down
1 change: 1 addition & 0 deletions cda-gui/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist
storybook-static
build
bin
34 changes: 22 additions & 12 deletions cda-gui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import com.github.gradle.node.npm.task.NpmTask
import com.github.gradle.node.npm.task.NpxTask

plugins {
id 'java'
id 'base'
id 'cda.deps-conventions'
id 'cda.java-conventions'
id 'war'
id 'com.github.node-gradle.node' version '7.1.0'
}

Expand All @@ -20,6 +23,17 @@ def cdaGuiViteMode = providers.gradleProperty('cdaGuiMode')
.orElse(providers.environmentVariable('CDA_GUI_MODE'))
.orElse('production')

dependencies {
compileOnly(libs.javalin.core) // TO get the transitive web-api spec
testImplementation(libs.javalin.core)
testImplementation(libs.bundles.junit)
testImplementation(libs.mockito.core)
}

configurations {
warOutput
}

task buildGuiVite(type:NpxTask) {
dependsOn npmInstall
command = "vite"
Expand Down Expand Up @@ -62,16 +76,12 @@ task runGuiDev(type: Exec) {
workingDir project.layout.projectDirectory
}

sourceSets {
java {
main {
resources {
srcDir(project.layout.projectDirectory.dir('dist'))
}
}
}
}

tasks.named('processResources') {
war {
dependsOn buildGui
archiveBaseName = 'cwms-data-ui'
from(project.layout.projectDirectory.dir('dist'))
}

artifacts {
warOutput tasks.war
}
Loading
Loading