Skip to content

refactor: consume datazoo-oauth2 instead of carrying our own copy - #56

Merged
jrosskopf merged 3 commits into
mainfrom
migrate/datazoo-oauth2
Aug 8, 2026
Merged

refactor: consume datazoo-oauth2 instead of carrying our own copy#56
jrosskopf merged 3 commits into
mainfrom
migrate/datazoo-oauth2

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Pays off the deferred half of the extraction: the OAuth2 stack that was lifted out of this repo into DataZooDE/datazoo-oauth2 is now consumed back from it, pinned by commit. There is one implementation, not two.

What changed

  • 16 files deleted hereoauth2_types, oauth2_flow_v2, oauth2_server, oauth2_browser, oauth2_callback_handler, http_client, timeout_http_client, charset_converter and their headers
  • 61 includes repointed at datazoo/oauth2/
  • datazoo-oauth2 added as a submodule, pinned at 91c18f9 (v0.1.1-2)

Net: 74 files changed, 97 insertions, 3430 deletions.

The gate: existing OAuth2 suites pass UNCHANGED

If a test had needed editing, the extraction would not have been behaviour-preserving. None did — the only edits anywhere under test/ are include paths, no assertion is touched, and test_datasphere_oauth2_consolidated.cpp / test_microsoft_entra_auth.cpp are otherwise byte-identical.

C++ suite   1141 assertions, 226 cases, all passing
live        graph_entra, graph_planner, graph_sharepoint, graph_excel,
            graph_outlook, microsoft_entra, business_central — green against real tenants
skipped     graph_teams_integration, business_central_integration (environment, not code)

Rebased onto current main

The branch had been cut before #53 landed and carried a duplicate copy of its own telemetry commit (feat(telemetry): adopt schema-2 telemetry). Rebasing onto origin/main dropped that duplicate automatically, leaving the three commits above.

Re-verified after the rebase: builds clean, and the C++ suite still reports exactly 1141 assertions in 226 cases — the same numbers recorded when the migration was first written, which is what makes it safe to say the rebase changed nothing.

The duckdb submodule pin is untouched.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

jrosskopf and others added 3 commits August 7, 2026 15:59
Pays off the deferred half of the extraction: the OAuth2 stack that was
lifted out of this repo into DataZooDE/datazoo-oauth2 is now consumed back
from it, pinned by commit. 16 files deleted here (oauth2_types, oauth2_flow_v2,
oauth2_server, oauth2_browser, oauth2_callback_handler, http_client,
timeout_http_client, charset_converter and their headers); 61 includes
repointed at datazoo/oauth2/. There is now one implementation, not two.

The gate for this change is that the existing OAuth2 suites pass UNCHANGED --
if a test needs editing, the extraction was not behaviour-preserving. They
do: the only edits anywhere under test/ are include paths, no assertion is
touched, and test_datasphere_oauth2_consolidated.cpp / test_microsoft_entra_auth.cpp
are otherwise byte-identical.

  C++ suite    1141 assertions, 226 cases, all passing
  live         graph_entra, graph_planner, graph_sharepoint, graph_excel,
               graph_outlook, microsoft_entra, business_central -- all green
               against real tenants
  skipped      graph_teams_integration, business_central_integration
               (environment, not code)

Three things the swap needed beyond include paths, none of them behavioural:

- DATAZOO_OAUTH2_USE_HOST_TRACING, because this repo has a real ErplTracer
  and the library ships a shim defining the same macros and type.
- odata_edm.hpp no longer declares ODataVersion; it includes the library's
  odata_version.hpp. Two definitions of erpl_web::ODataVersion would break
  every TU seeing both headers.
- That include is the small enum header, NOT http_client.hpp. Including the
  latter pulls its global `using namespace duckdb;` in earlier than the old
  order did, which made EnumType ambiguous between duckdb::EnumType and
  erpl_web::EnumType over in test_odata_edm.cpp.

Note: `make debug` cannot link DuckDB's own tools/plan_serializer here
(multiple definition of duckdb::BufferedFileWriter::DEFAULT_OPEN_FLAGS,
both symbols DuckDB's). Pre-existing and unrelated; the live suites were run
against a directly-built build/debug/test/unittest.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Keeps both consumers on the same commit. 2973a99 drops the library's
vcpkg.json, which was a second match for the '**/vcpkg.json' glob that
extension CI uses to resolve the manifest -- it broke duckdb-gdrive's
Windows LTS build. No source change from the previous pin.

C++ suite 1141 assertions / 226 cases; live graph_entra, planner,
sharepoint, excel, outlook, microsoft_entra and business_central all green
against real tenants.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Keeps both consumers on the same commit. 91c18f9 stops the library building
its own Catch2 tests inside a consumer's tree, which broke duckdb-gdrive's
Windows LTS link (/MD Catch2 against /MT sources). This repo never hit it --
its vcpkg manifest has no catch2, so the library's find_package(Catch2)
failed here and the target was skipped. That was luck, not design.

C++ suite 1141 assertions / 226 cases.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jrosskopf
jrosskopf force-pushed the migrate/datazoo-oauth2 branch from e0a8231 to 654a27f Compare August 7, 2026 14:04
@jrosskopf
jrosskopf merged commit 61694e1 into main Aug 8, 2026
96 of 97 checks passed
@jrosskopf
jrosskopf deleted the migrate/datazoo-oauth2 branch August 8, 2026 05:20
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