fix(delmia-notifier)+chore(docker): review follow-ups — trim the env key like the file key, log which source supplied the key (never the key), hoist the not-configured message; README warns never to commit a filled-in appsettings.json; design-doc body lines updated; seed-delmia-api.sh no longer hides CLI errors and notes key names are not unique
Claude-Session: https://claude.ai/code/session_013L3XdmVii9i5sY4FChU8pB
This commit is contained in:
@@ -78,8 +78,9 @@ Zero third-party NuGet dependencies (BCL only) to keep the Native-AOT surface mi
|
||||
`/api/DelmiaRecipeDownload` is appended by the app; each entry is a base URL only.
|
||||
- `TimeoutSeconds` — per-attempt `HttpClient.Timeout` (default 30).
|
||||
- `LogPath` — optional diagnostic log file (relative to the exe). Omit to log to stderr only.
|
||||
- **API key** comes from `SCADABRIDGE_API_KEY`. If unset/empty → `NO` + "API key not configured",
|
||||
exit `-1`, no attempt. The key is never read from or written to a file.
|
||||
- **API key** comes from `SCADABRIDGE_API_KEY` first; since 2026-09-02 an optional `ScadaBridge:ApiKey`
|
||||
in `appsettings.json` is the fallback when the variable is unset/blank (env wins). If neither is set →
|
||||
`NO` + "API key not configured (SCADABRIDGE_API_KEY or ScadaBridge:ApiKey)", exit `-1`, no attempt.
|
||||
|
||||
## Request / response
|
||||
|
||||
@@ -170,7 +171,7 @@ cross-platform):
|
||||
- Result mapping: `Result true/false` and non-2xx → correct stdout + exit code.
|
||||
- Failover loop (via the HTTP seam / a fake handler): connect-failure advances; first responding node
|
||||
is final; `Result==false` does **not** advance; all-unreachable → `NO` + last error.
|
||||
- Missing/empty `SCADABRIDGE_API_KEY` → fail-fast, no attempt.
|
||||
- Missing/empty `SCADABRIDGE_API_KEY` **and** blank `ScadaBridge:ApiKey` → fail-fast, no attempt; env-over-file precedence pinned (2026-09-02).
|
||||
- Manual live smoke against `wonder-app-vd03` (`/api/DelmiaRecipeDownload`) from the Windows build,
|
||||
mirroring the earlier `curl` verification.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user