Skip to content

Remove the legacy settings sources, the promotional text and the credentials in -vv logs - #112

Merged
bencehezso merged 2 commits into
release/2.0from
task/release_blockers_and_polish
Oct 25, 2026
Merged

bencehezso merged 2 commits into
release/2.0from
task/release_blockers_and_polish

Conversation

@bencehezso

Copy link
Copy Markdown
Contributor

Summary

Six release items for 2.0 plus one removal: the legacy config.py and HOST/KEY settings sources are gone (the release blockers), the egress PDF and the terminal no longer promote anything, a fully unsized egress estimate shows "–" instead of a zero with a plus, -vv no longer writes signing details or credentials anywhere, and the two-second fake spinner in print_step is gone.

Changes

Settings (breaking)

  • cloudexit/settings.py: removed the module-level import config, _legacy_config_layer, _legacy_env_layer, their entries in load_settings and the legacy … source labels. Precedence is now flags > CLOUDEXIT_* environment > config file.
  • One migration warning, logged only when no other source supplies a host or key, and combined into a single message when both legacy sources are present. It checks presence only: config.py is never imported, opened or parsed, and the values of HOST/KEY are never read into a setting, logged or passed on.
  • cloudexit/cli/parser.py and config.example.toml state the new precedence. README.md:119 still documents both legacy sources as working — now outdated, for the separate README review.

Report

  • egress_report.py, egress_sections.py, egress.py, wording.py, sections.py: "Next Steps" and its wording keys, next_steps_facts, fa_uploaded_link and BOOK_DEMO_URL removed. PRODUCT_SITES is kept for the HTML report.
  • egress.py, html_egress.py: when at least one data-bearing resource exists and none has a size, the data volume, billable volume, fee and table totals show ev_dash, no "+" is appended, and the free-tier headroom sentence and bar are left out. Partial sizing keeps "x GiB+" / "$y+"; a measured zero keeps "0.0 GiB" / "$0.00"; an empty scope is unchanged.
  • The condition tests whether any resource has a size, rather than the size_unknown flag count: the egress_unsized sample has a row with no size and no flag, and the flag count would contradict its own "0 of 5 sized" strip.
  • The Billable Volume tile drops its "no free tier" caption when nothing was sized, so removing the headroom tile does not substitute one unfounded claim for another.

Logging

  • botocore.auth and botocore.credentials join _ALWAYS_QUIET; botocore.endpoint stays at DEBUG under -vv for its URLs, status codes and timings.
  • New cloudexit/log_redaction.py adds a logging.Filter to the console and run.log handlers at every verbosity. It redacts the formatted record, because the secret usually arrives inside an object passed as a %s argument rather than in the format string.
  • The whole Authorization header value is redacted, so Credential=REDACTED/ is preserved only where Credential= appears outside a header, such as a presigned URL. This is stricter than keeping the credential scope in the header and follows AGENTS.md, "never log the Authorization header".

Terminal

  • cloudexit/cli/app.py: the end-of-run block is gone. Platform messages are neutral and name the host only, without a path, query or credentials; an offline run is status ok, not a warning; reducing an explicit Standard run to Basic is one neutral ok line.
  • cloudexit/cli/prompts.py: prompt_required_inputs takes ask_assessment_type; the depth question is asked only when a platform is configured and the upload is not off or a dry run. "EscapeCloud - Community Edition" stays as the program identity.
  • cloudexit/terminal.py: print_step(status="pending") no longer opens a spinner and sleeps for two seconds. No caller used it.

Tests

  • Settings: legacy patches and precedence cases replaced by the presence-only warning cases, an AST check that no module imports config, and subprocess runs of python -m cloudexit --version and config show in a directory holding a config.py that would write a marker file. The marker is never created.
  • Logging: botocore-shaped records emitted through the real loggers, asserting that no access key ID, signature, token or secret reaches the console or run.log, that "REDACTED" appears, and that a secret in record.args is caught.
  • Report: outline without "Next Steps", a guard that no egress PDF names a platform or an edition, page 2 still carrying the companion ID and the platform link, and unit cases for all four sizing states.
  • CLI: console capture asserting no "regulatory-aligned", "DORA", "FINMA", "PRA", "request_report", "ExitCloud", "Light" or "Enterprise"; offline status ok with no warning; host-only platform line; the type prompt gate; and HOST/KEY in the environment uploading nothing under --upload=auto.
  • tests/support/egress.py follows the _summarize_totals signature.

Compatibility

  • Breaking, on purpose for 2.0: config.py and the HOST/KEY environment variables are no longer read. One warning helps users who still rely on them. A run that depended on them now stays offline, or fails with "missing platform" under --upload=on.
  • Unchanged: the config file format, flags, CLOUDEXIT_*, exit codes, the dataset, the sync document and the docs/api-v2/ copy. cloudexit config show is unchanged apart from the removed legacy sources.
  • Report output: the egress PDF loses "Next Steps"; a fully unsized egress estimate shows "–". Samples: 7 of 74 text dumps change across the 17 cases — six egress PDFs lose the Next Steps block, and egress_unsized replaces "0.0 GiB+", "$0.00+", "0.00+" and the headroom tile with "–" in both the PDF and the HTML.
  • Logs: -vv no longer writes signing details or credentials to the console or run.log.
  • Terminal: no end-of-run sales block, neutral platform messages, an offline run is no longer a warning, the assessment type is asked only when an upload will happen, and a pending step no longer pauses for two seconds.

@bencehezso bencehezso self-assigned this Oct 25, 2026
@bencehezso bencehezso added the enhancement New feature or request label Oct 25, 2026
@bencehezso
bencehezso merged commit 0afcc4a into release/2.0 Oct 25, 2026
11 checks passed
@bencehezso
bencehezso deleted the task/release_blockers_and_polish branch October 25, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant