Repository navigation
feat(server): ad-hoc --vars, --load, --reload and load runs gated by run.vars and run.load - #1484
Merged
Merged
Conversation
… run.vars and run.load (WIP)
…ad mock with the server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Ad-hoc runs on the server refused
--vars,--load,--reloadandsqb load, so loading a managed source or building with different variables meant using the CLI outside the server. Both change what reaches the warehouse, so each needs its own permission rather than riding onrun.adhoc.Changes
--vars(a JSON object;{}is ignored),--load,--reloadand theloadverb.loadselects managed sources and runs as a build with loaders on and tests and audits off.run.varsfor a run with variables, andrun.loadover the loaded sources forload,--loadand--reload. Only Admin grants them among built-in roles. A plain build still loads the managed sources it reads underrun.adhoc. A plan preview with--varsalso needsrun.vars, because the location compiles with the variables.run_compiled) before any statement runs.loadverb and the new options with descriptions, and the role pages and mock data list both actions.Verification
sqlbuild-cliandsqlbuild-orchestration(SQLite and PostgreSQL).test_adhoc.pylaunch real workers: a Developer is refusedload,--reloadand--vars; a Developer's plain build still loads; an Admin's load runs only the selected loader; an Admin's--varsbuild writes the variable's value and records a compiled hash that differs from the published one.--load) and role pages.make check-ci.