USACE / USACE/cwms-data-api

Create a Controller for CDA Server info

Open
#515 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

approved-W192HQ23F0232-task4 enhancement
Dominant language
Java
Stars
28
Forks
25
Avg merge
4d 22h
Merged PRs (30d)
20

Description

It would be helpful for debugging and other purposes if there was a CDA end-point that required authorization but was generally safe to call.

You could try to create a dummy location_group and then delete it again but thats annoying.
You could also try to write to catalog or some other non-writable end-point and look at what error code you get back. But that is sort of a hack.

I want a real end-point that requires auth and returns somewhat useful output that will also be obvious if its being cached.
The end-point should return some basic info like: A specific build number. Maybe even the commit hash if there is some way to get it. Not just "3.1". Maybe the OS and JDK versions. The native system clock (with tz) to the nearest second.

Then clients could call it on login. They could add the response in their own logs and if they hit a CDA bug we'd be able to correlate the bug report to source.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing CDA controllers and authorization entry points. Define the diagnostic response around the requested build or commit information, runtime details, and timezone-aware clock, then verify that the endpoint requires authorization, is safe to call, and makes caching visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.