Skip to content

chore: remove publish-workflow.sh scaffold - #10

Merged
eddietejeda merged 5 commits into
masterfrom
chore/remove-publish-workflow-script
May 25, 2026
Merged

eddietejeda merged 5 commits into
masterfrom
chore/remove-publish-workflow-script

Conversation

@eddietejeda

Copy link
Copy Markdown
Contributor

publish-workflow.sh is a one-time scaffold that generates publish.yml — that workflow already exists in every repo, so the script has no ongoing purpose.

…tabase scoping

Pass database= to client.execute_sql() so queries are scoped to a
managed database via the X-Database-Id header (hotdata-runtime>=0.2.1).
- HotdataMarimoEngine: add default_database= constructor param, pass to execute()
- SqlEditor: add database= constructor param, pass to both execute_sql calls
- ManagedDatabaseWriter: use description= kwarg matching ManagedDatabase v0.2.0 API
- Fix test_databases_marimo.py syntax error and update assertions
…remove dead code

- table_browser: extract _set_table_pick() replacing duplicate _init/_rebuild methods;
  _sync_table_catalog returns bool so ui drops _rebuilt_table_pick_this_run flag;
  standardize _active_connection_id to use 'or None' consistently
- sql_engine: unregister now restores original engine_to_data_source_connection and
  resets sentinel so register/unregister/register round-trip works correctly
- sql_editor: remove dead 'or ""' on _cached_sql (already guarded by None check above)
- workspace_selector: cache HotdataClient, only reconstruct when workspace_id changes
…t param

When options is a dict {label: value}, Marimo validates value= against the
dict keys (labels), not the values. _rebuild_database_pick was passing a
database ID (dict value) which raised ValueError on startup. Now resolves
the label key corresponding to the previously-selected ID instead.
return
options = {db.name: db.name for db in dbs}
value = current if current in options else next(iter(options))
options = {db.description or db.id: db.id for db in dbs}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: (not blocking) Building the options dict directly with {db.description or db.id: db.id for db in dbs} silently collapses entries when two managed databases share a description. Unlike the old name field, description is free-form user text, so collisions are plausible — and the affected database becomes unreachable from this widget.

The repo already has unique_label_options for exactly this case (see connection_options in _options.py:47 and the workspace picker in workspace_selector.py:44-48). Consider:

from hotdata_marimo._options import unique_label_options
...
pairs = [(db.description or db.id, db.id) for db in dbs]
options = unique_label_options(
    pairs,
    disambiguate=lambda label, value, count: f"{label} ({value})",
)

@eddietejeda
eddietejeda merged commit 0c40968 into master May 25, 2026
2 checks passed
@eddietejeda
eddietejeda deleted the chore/remove-publish-workflow-script branch May 25, 2026 02:31
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