Skip to content

docs(adr): propose ADR-0001 standardize on accessionID everywhere#2263

Open
jhagberg wants to merge 4 commits intomainfrom
adr/0001-standardize-accessionID
Open

docs(adr): propose ADR-0001 standardize on accessionID everywhere#2263
jhagberg wants to merge 4 commits intomainfrom
adr/0001-standardize-accessionID

Conversation

@jhagberg
Copy link
Contributor

@jhagberg jhagberg commented Feb 23, 2026

Related issue(s) and PR(s)

This PR follows up on the discussion in PR #2232 by @KarlG-nbis.

Description

Proposes ADR-0001: standardize on accessionID / accession_id across the entire
stack — Go application code, API responses, and database schema.

The current codebase uses stableID in DB-layer Go code and accessionID in
API/message-facing code, while the DB columns use stable_id. This ADR proposes
unifying on the bioinformatics domain term everywhere.

Follows the full MADR 4.0.0 template with pros/cons for four considered options
(accessionID everywhere, stableID everywhere, accessionID in Go only, leave as-is).
Includes a codebase survey (~232 accessionID vs ~187 stableID occurrences) and
implementation guidance:

  • DB migration first: ALTER TABLE ... RENAME COLUMN on sda.files, sda.datasets,
    and FK update in sda.dataset_event_log
  • Then per-service Go rename PRs (sda, sda-download, sda-admin)

ADR

  • This PR includes an architecturally significant decision (see docs/decisions/README.md)
    • A decision record has been added or updated in docs/decisions/

How to test

  • Review ADR content for accuracy and completeness
  • Verify markdown renders correctly on GitHub
  • Discuss at next NeIC SDA-Devs bi-weekly meet-up per ADR-0000 process

@jhagberg jhagberg requested a review from a team as a code owner February 23, 2026 09:38
@jhagberg jhagberg added the adr Architectural Decision Record label Feb 23, 2026
@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.92%. Comparing base (2bcf6ae) to head (78a8fae).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2263   +/-   ##
=======================================
  Coverage   40.92%   40.92%           
=======================================
  Files          96       96           
  Lines        9925     9925           
=======================================
  Hits         4062     4062           
  Misses       5264     5264           
  Partials      599      599           
Flag Coverage Δ
unittests 40.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

jbygdell
jbygdell previously approved these changes Feb 23, 2026
@jhagberg jhagberg requested a review from a team March 2, 2026 09:40
The Go codebase uses multiple names for archive identifiers. This ADR
proposes unifying on accessionID in all application-level Go code while
keeping stable_id for DB query strings and column references.
pahatz
pahatz previously approved these changes Mar 4, 2026
Expand the scope to rename stable_id → accession_id in the database
as well (files, datasets, dataset_event_log FK), so the entire stack
uses a single consistent term. Adds a fourth considered option
(accessionID in Go only) and updates consequences and implementation
guidance accordingly.
@jhagberg jhagberg dismissed stale reviews from pahatz and jbygdell via eb31a59 March 4, 2026 08:33
@jhagberg jhagberg force-pushed the adr/0001-standardize-accessionID branch from 4ac56aa to eb31a59 Compare March 4, 2026 08:33
@jhagberg jhagberg changed the title docs(adr): propose ADR-0001 standardize on accessionID docs(adr): propose ADR-0001 standardize on accessionID everywhere Mar 4, 2026
jbygdell
jbygdell previously approved these changes Mar 4, 2026
- Expand DB migration scope: 47 occurrences across 8 SQL files, including
  legacy views (local_ega, local_ega_ebi), functions/triggers, and FK
- Add sda-doa (Java) to scope — Dataset.java maps stable_id column
- Replace naive "DB first, then Go" with coordinated rollout strategy
  (dual-name support or maintenance window)
- Add rollback guidance
- Fix codebase counts to match actual grep results
- Update confirmation criteria for fresh installs and upgrades
@jhagberg jhagberg requested a review from jbygdell March 4, 2026 14:13
@jbygdell jbygdell added this pull request to the merge queue Mar 5, 2026
@jbygdell jbygdell removed this pull request from the merge queue due to a manual request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adr Architectural Decision Record

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants