Repository navigation
quant serve: portal rules and remote KV (7.4.0) - #298
Merged
Merged
Conversation
A 422 can say that the requested rule order cannot be kept (a retry does not help), and a 409 can say that the change may already be live. Print that message as one short line. The old texts stay as the fallback when the response has no message.
…to the background When the --run command exits 0 and its process group is still alive, print one notice that it moved to the background instead of "stopped (exit code 0)". quant serve already stops the whole group on exit. When only the --proxy URL still answers, say that quant serve cannot stop that dev server. A non-zero exit keeps the old message. Windows has no process group, which the README now says.
The value is stored as a function stores it with secret: true. A function on quant serve reads it, and a list shows it masked.
quant serve and quant kv --local read optional org, project and meta from quant/serve.json, so a project without quant.json needs no flags on every call. A flag still wins, and quant/serve.json wins over quant.json. The values are validated.
…nt org or project The quant/serve.json value is used. quant serve prints the warning in the start-up output, and quant kv --local prints it to stderr.
A yes/no question after the JSON value, default no.
…code A string error without a message is printed above the old advice (retry for 409, check URL and scopes for 422). A message still replaces the advice. deployError moves its text into helpers (complexity 10 or less).
…e stops stopRun aborts the poll, so it never keeps Node alive after a stop.
set prints the entry with the value [ENCRYPTED], the mask of a list. The menu asks for a secret value with hidden input. --secret on get, list or delete prints one notice that it is ignored.
…ge and proxy rules
The portal client calls an optional onRequest hook for each HTTP attempt, so readStore counts 429 retries in requests and in maxRequests. A keys page with has_more and no next_cursor now stops the read as truncated.
…place A rules deploy creates or updates only the manifest rules of its own namespace and never removes a rule. The merge now drops only a pulled managed rule whose deploy namespace and id match a rule of quant/edge-rules.json, and keeps every other pulled rule in its order.
…rors - One request budget of 200 for the whole start-up, shared by the rules, headers and KV reads. The client checks it before each attempt, 429 retries included, and refuses the attempt once it is spent. The KV read then stops as truncated (request limit). - A 5xx or no answer from the project headers gives one warning and no portal global headers instead of a stop. The 403 warning names the headers read. - static_error_page is on for any value that is not empty. - readStore no longer takes a request count or returns one.
ruleLabel comes from rule-actions.js, listsStatus from rules.js, and isObject from src/helper/is-object.js. No behaviour change.
The portal store list can send a display name in name (for example "org/project: store"). Match the meta.json name on user_name first, then on the project store id, then on name.
Add a docs note that the trailing-slash setting and the edge cache settings are not pulled.
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.
Adds two start-up options to
quant servethat read from the portal. Both needQUANT_API_TOKENandQUANT_BASE_URLin the environment. Nothing read from the portal is written to disk.Stacked on #297 (7.3.0). Merge #297 first; this PR then shows only the 7.4.0 commits.
--pull-rulesrules:read) and global headers (projects:read) once at start, and runs them in edge order with the rules ofquant/edge-rules.json.--kv-remote <store>quant/meta.jsonname, also when the portal list shows a display name.Limits
Retry-After.Tests
--pull-rules --kv-remotetogether: rule order, global headers, KV reads and local writes, no writes to the portal.