NASA-AMMOS / NASA-AMMOS/plandev

Convert all Java IDs from `long` to `int`

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

Nobody has claimed this yet.

breaking change refactor
Dominant language
Java
Stars
128
Forks
33
Avg merge
1d 17h
Merged PRs (30d)
12

Description

Currently in our Java code, we use the long type for all of our Id Classes (ie SimulationId, ActivityDirectiveId, SimulatedActivityId). These values are written directly to integer type columns in our DB (ie GraphQLMerlinService.storeSimulationResults(), PostgresResultsCellRepository.postActivities()). Therefore, the valid range of the Id Classes is the int range.

An alternative solution would be to convert the DB columns from integer to bigint, but that may be more involved.

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 Java Id classes named in the issue and inspect GraphQLMerlinService.storeSimulationResults() and PostgresResultsCellRepository.postActivities(). Trace every listed ID through its database write path, then verify that the IDs use the int range consistently with the existing integer columns.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postgresql
Domain
backend, databases
Issue type
Refactor
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.