USACE / USACE/cwms-data-api

Shorten client identifier for long endpoint paths

Open
#783 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

image

@zack-rma ran into this when adding the water user contract endpoints. We need to determine a strategy for shortening the endpoint string that is passed in as the client identifier:

In the java client API, we shorten the id arbitrarily from the front:
https://bitbucket.hecdev.net/projects/CWMS/repos/hec-cwms-data-access/browse/cwms-db-jooq/src/main/java/usace/cwms/db/jooq/util/ConnectionPoolUcp.java#599

For this specific case we probably want to trim out the path variable names (maybe leave the curly brackets).

For extra information, CDA logs this as a warning message and does not stop execution of requests. This is only for the end-to-end metric capture within the database.

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 tracing how the endpoint string becomes the client identifier in the Java client API, using the linked ConnectionPoolUcp.java reference as context. Compare front-trimming with removing endpoint path variable names, then verify the chosen strategy preserves request execution while producing a usable identifier for database end-to-end metrics and the existing warning behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
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.