Hidden Assumptions in redash

10 assumptions this code never checks · 3 critical · spanning Contract, Ordering, Environment, Resource

Every codebase relies on things it never checks. Most of them are routine. CodeSea looked at getredash/redash and picked out the few most likely to cause trouble. The full list is just below.

Most of what this code assumes is routine. These 3 are the ones most likely to cause trouble here. The rest are minor; they're under "Show everything".

Worth your attention first

React app fails to mount, throws 'Cannot read property of null' error and entire UI is broken

Worth your attention first

Extension init() methods may fail or return unexpected values causing silent initialization failures or undefined behavior in registered extensions

Worth your attention first

If extensions directory is missing or contains malformed JS files, require.context() throws runtime errors breaking app initialization

Show everything (7 more)
Contract

Data source types like 'databricks' and 'databricks_internal' match exactly with DataSource.type field from the backend

If this fails: If backend returns different type strings or casing, wrong schema browser renders (default SchemaBrowser instead of DatabricksSchemaBrowser) causing missing features

client/app/components/queries/editor-components/index.js:registerEditorComponent
Resource

All images referenced by require.context exist and are readable at build time, no runtime fallback handling

If this fails: Missing image files cause build failures or broken image links in production, but app continues with missing assets

client/app/config/index.js:requireImages
Ordering

Import order matters - pages must register before extensions to allow extensions to override routes, but this dependency is not enforced

If this fails: If import order changes, extensions may fail to override intended routes leading to wrong page components loading for specific paths

client/app/config/index.js:module imports
Environment

Moment.js locale 'en' exists and supports relativeTime configuration object with these specific keys

If this fails: If moment.js version changes or locale structure differs, relative time formatting silently falls back to defaults potentially showing inconsistent time formats

client/app/config/index.js:moment.updateLocale
Contract

Widget components (VisualizationWidget, TextboxWidget, RestrictedWidget) implement compatible interfaces expected by dashboard grid layout system

If this fails: If widget components don't match expected props interface, dashboard grid fails to render widgets or passes wrong props causing widget crashes

client/app/components/dashboards/dashboard-widget/index.js:exports
Resource

Avatar.svg file exists in assets/images directory and is accessible during build process

If this fails: Build fails if avatar.svg is missing, or users see broken default avatar images throughout the application

client/app/config/index.js:@/assets/images/avatar.svg
Contract

All form field components (AceEditorField, CheckboxField, etc.) implement consistent field interface with props like value, onChange, error

If this fails: Dynamic forms break if any field component has incompatible interface - form validation fails or field values don't update properly

client/app/components/dynamic-form/fields/index.js:field exports

See the full structural analysis of redash: the pipeline, data models, and system behavior that put these assumptions in context.

Full analysis of getredash/redash →

Compare redash

Frequently Asked Questions

What does redash assume that could break in production?

The one most likely to cause trouble: Assumes DOM element with id 'application-root' exists in the HTML document when the script loads If this fails, React app fails to mount, throws 'Cannot read property of null' error and entire UI is broken

How many hidden assumptions does redash have?

CodeSea found 10 assumptions redash relies on but never validates, 3 of them critical, spanning Contract, Ordering, Environment, Resource. Most are routine — the analysis flags the two or three most likely to actually bite.

What is a hidden assumption?

Something the code depends on but never checks: a data shape, an ordering, an environment condition, a scale limit, or a contract with another service. It holds until the world it runs in changes, then fails silently.