Skip to content

Core: Extract REST SigV4 signing into a dedicated module - #4493

Open
Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/3410-extract-sigv4
Open

Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/3410-extract-sigv4

Conversation

@Anurag-S1ngh

Copy link
Copy Markdown
Contributor

Rationale for this change

RestCatalog._init_sigv4 currently contains the SigV4 adapter, signing constants, and boto session setup inside an already large catalog module.

This extracts that code into catalog/rest/sigv4.py and replaces the method with an init_sigv4(session, uri, properties) helper. The existing constants and SigV4Adapter remain re-exported from catalog.rest for compatibility. Signing and retry behavior are unchanged.

The retry behavior in #3008 and signing fixes in #3120 remain separate.

Part of #3410.

Are these changes tested?

Yes. The existing REST SigV4 tests exercise the extracted adapter through RestCatalog.

  • pytest tests/catalog/test_rest.py -m unit: 194 passed
  • ruff check and git diff --check pass
  • ty check reports nothing for the new module; existing catalog diagnostics are unchanged

Are there any user-facing changes?

No behavior change. catalog.rest.SigV4Adapter and the existing SigV4 constants remain importable from the same module.

Move SigV4Adapter, its constants, and the initialization helper out of RestCatalog._init_sigv4. Re-export the existing public names from catalog.rest for compatibility. Part of apache#3410; signing and retry fixes remain separate.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant