aws / aws/graph-explorer

Simplify defaultConnection fetch and backward-compat env vars

Open
#1,626 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
481
Forks
108
Avg merge
8d 9h
Merged PRs (30d)
7

Description

## Parent PRD

- Parent #1618

## What to build

Update `fetchDefaultConnection` to use `${apiBase}defaultConnection` as the single fetch URL, removing the SageMaker fallback URL guessing. Update the `DefaultConnectionData` schema to accept both old field names (`GRAPH_EXP_PUBLIC_OR_PROXY_ENDPOINT`, `GRAPH_EXP_USING_PROXY_SERVER`) and the canonical `GRAPH_EXP_CONNECTION_URL`. Update `mapToConnection` to handle both formats. Update `process-environment.sh` to support old Docker env var names (`PUBLIC_OR_PROXY_ENDPOINT`, `USING_PROXY_SERVER`) with deprecation warnings, mapping them to the new canonical names.

**Type: HITL** — requires review before completion.

## Acceptance criteria

- [ ] `fetchDefaultConnection` fetches from `${apiBase}defaultConnection` only (no SageMaker fallback)
- [ ] `DefaultConnectionData` schema accepts old field names alongside new ones
- [ ] `mapToConnection` produces correct `ConnectionConfig` from both old and new `defaultConnection.json` formats
- [ ] `process-environment.sh` maps old env var names to new canonical names
- [ ] `process-environment.sh` logs deprecation warnings when old env var names are used
- [ ] `GRAPH_EXP_CONNECTION_URL` is the canonical field name for the database URL
- [ ] Tests verify schema parsing for both old and new field names
- [ ] Tests verify `mapToConnection` output for both formats

## Blocked by

- Blocked by #1621
- Blocked by #1622

## User stories addressed

- User story 3
- User story 4
- User story 5

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the fetchDefaultConnection entry point, the DefaultConnectionData schema, mapToConnection, and process-environment.sh; also check blockers #1621 and #1622. Verify that only the canonical URL is fetched, both connection formats parse and map correctly, and legacy environment variables produce canonical values with deprecation warnings, supported by tests for both formats.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell, typescript
Domain
api, devops
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.