Skip to content

feat: add feedback banner and issue links to errors - #12

Merged
jrosskopf merged 6 commits into
mainfrom
feat/feedback-banner
Aug 8, 2026
Merged

feat: add feedback banner and issue links to errors#12
jrosskopf merged 6 commits into
mainfrom
feat/feedback-banner

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

OAuth breaks against real IdP configurations we cannot reproduce here — Entra app roles, Google's string-typed numeric claims, Keycloak realms — so the users who hit a problem are the only ones who can tell us what it was. Two surfaces now point at the tracker.

Part of a fleet-wide rollout; implementation is the shared DataZooDE/duckdb-extension-banner submodule, so the wording is fixed in one place. Same pattern as erpl-tunnel#2 and erpl-adt#36.

What changed

Once-a-day banner on interactive load. Prints only when stderr is a terminal, no CI marker is set, DATAZOO_NO_BANNER is unset, SET datazoo_banner is not false, and the ~/.duckdb stamp is over a day old. Piped output, notebooks, CI and the test suite see nothing — which is why no existing expected output changes.

Issue link on every error raised by a registered function, via DATAZOO_GUARD at the 11 registration sites. Preserves the original ExceptionType; leaves INTERRUPT, FATAL, OUT_OF_MEMORY alone.

Invalid Input Error: quack_oauth_login: SECRET 'nope' not found
-> Unexpected? Please report it: https://github.com/DataZooDE/quack-oauth/issues

Two things worth reviewing

Errors DuckDB raises before dispatch are deliberately not annotated. Binder, catalog and arity errors are not ours, and claiming them would send users to the wrong tracker. quack_oauth_feedback.test pins this.

The banner include is placed unconditionally, not after each file's last #include. In check_authorization_function.cpp and diagnose.cpp the latter would have landed the include inside #ifndef EMSCRIPTEN and broken the wasm configuration — the identical mistake broke erpl-tunnel's SSH-only and musl builds before I caught it.

Verified

  • Banner once interactively, silent on repeat, silent when piped
  • Error footer present with the original diagnostic intact
  • 168 assertions in 11 cases pass, plus the new quack_oauth_feedback.test (5 assertions)
  • duckdb submodule pin untouched (the dirty marker is the pre-existing configure-time fmt patch)

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

Bump posthog-telemetry to the analysis-first API. Register product
identity and the deployment group at load via SetProduct + AssociateGroup,
and migrate CaptureFunctionExecution -> RecordFunctionCall across all
function binds. Add TELEMETRY.md documenting what is collected and the
privacy guarantee.
OAuth breaks against real IdP configurations we cannot reproduce here --
Entra app roles, Google's string-typed numeric claims, Keycloak realms --
so the users who hit a problem are the only ones who can tell us what it
was. Two surfaces now point at the tracker.

A once-a-day banner on interactive load, from the shared
DataZooDE/duckdb-extension-banner submodule. DuckDB has no notice
channel, so it can only go to stderr, which makes the gating the
load-bearing part: stderr must be a terminal, no CI marker set,
DATAZOO_NO_BANNER unset, SET datazoo_banner not false, and the
~/.duckdb stamp over a day old. Piped output, notebooks, CI and the test
suite therefore see nothing, so no existing expected output changes.

An issue link on every error raised by a registered function, via
DATAZOO_GUARD at the eleven registration sites. The guard yields a plain
function pointer with the same signature, preserves the original
ExceptionType, and leaves INTERRUPT, FATAL and OUT_OF_MEMORY alone.

Errors DuckDB raises before dispatch -- binder, catalog, arity -- are
deliberately left unannotated; they are not ours, and claiming them would
send users to the wrong tracker. quack_oauth_feedback.test pins that.

The banner include is placed unconditionally rather than after the last
#include in each file: in check_authorization_function.cpp and
diagnose.cpp the latter would have landed inside #ifndef EMSCRIPTEN and
broken the wasm configuration.

Suite green: 168 assertions in 11 cases.
jrosskopf and others added 4 commits August 6, 2026 16:26
The banner library declared INTERFACE cxx_std_17. That propagates through
the extension target into DuckDB's own tools/plan_serializer, which then
compiles as C++17 while libduckdb_static stays C++11 --
BufferedFileWriter::DEFAULT_OPEN_FLAGS ends up COMDAT-weak on one side
and strong on the other, and the link fails with a multiple definition
error. anofox-statistics CI caught it; the declaration has been removed
upstream since every consumer already builds at C++17.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
On MinGW the 'struct _stat64' tag hides the function of the same name in
C++, so the banner's _stat64 call parsed as a constructor and every
rtools/MinGW Windows job failed to compile. The shared library now uses
plain stat() everywhere except MSVC.

Caught by anofox-similarity CI, which builds windows_amd64_rtools.
The merge resolution left this branch's older pin (e41682b, 12 Jul) in
place, which would have regressed main's newer f550a66 (16 Jul) on merge.
git checkout --theirs silently skips submodules, so the conflict looked
resolved while the wrong commit stayed staged.

f550a66 contains e41682b, so taking main's is strictly newer and keeps
the schema-2 telemetry work on this branch intact.
@jrosskopf
jrosskopf merged commit eea1b52 into main Aug 8, 2026
53 checks passed
@jrosskopf
jrosskopf deleted the feat/feedback-banner branch August 8, 2026 04:42
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