Repository navigation
test(engine): the cancel tests run every read made ahead, from one registry #2662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,65 +10,6 @@ use serde_json::{Value, json}; | |
| use super::{b, f, ps}; | ||
| use crate::{CmdResult, CommandSpec as C, Session}; | ||
|
|
||
| /// Commands that make the map fetch from an address they're given (a plugin needs the | ||
| /// `network` permission to run them). | ||
| pub const NETWORK: &[&str] = &[ | ||
| "map.route", | ||
| "map.addTiles", | ||
| "map.body", | ||
| "map.terrain", | ||
| "layer.addUrl", | ||
| "service.layers", | ||
| "service.add", | ||
| "identify.featureInfo", | ||
| "service.import", | ||
| "service.refresh", | ||
| "service.groupPlan", | ||
| "service.coverage", | ||
| "catalog.search", | ||
| "stac.collections", | ||
| "stac.search", | ||
| "stac.addAsset", | ||
| "stac.addBands", | ||
| "stac.addIndex", | ||
| "stac.addCube", | ||
| // From the catalog entry's address (a Zarr entry also as `layer.addZarr`: plugins.rs). | ||
| "cube.open", | ||
| "map.findPlace", | ||
| "layer.geocode", | ||
| "osm.download", | ||
| "boundaries.add", | ||
| "boundaries.countries", | ||
| "s3.list", | ||
| "overture.add", | ||
| "sourcecoop.products", | ||
| "sourcecoop.list", | ||
| "portal.search", | ||
| "portal.add", | ||
| "nationalMap.add", | ||
| "fieldsOfTheWorld.add", | ||
| "portal.files", | ||
| "embeddings.search", | ||
| "embeddings.add", | ||
| "embeddings.addCube", | ||
| "embeddings.similarity", | ||
| "embeddings.change", | ||
| "earthdata.collections", | ||
| "earthdata.granules", | ||
| "nldi.flowline", | ||
| "nldi.comid", | ||
| "nldi.basin", | ||
| "nldi.sources", | ||
| "nldi.navigate", | ||
| // A sign-in reaches the portal, and a sign-out revokes its token there; a token is sent to | ||
| // the server it is given for. | ||
| "arcgis.signIn", | ||
| "arcgis.signOut", | ||
| "arcgis.token", | ||
| // A sign-in reaches Copernicus Data Space's sign-in host. | ||
| "copernicus.login", | ||
| ]; | ||
|
|
||
| /// Registers commands for tile-layer sources, drawing properties, coverage and celestial bodies. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The description says every id on the removed Category: security
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No permission changes. On |
||
| pub fn commands() -> Vec<C> { | ||
| vec![ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -154,29 +154,8 @@ impl Session { | |
| } | ||
| /// Private pre-handler capture shared by native reads and the exact scoped archive entry. | ||
| fn capture_read(&mut self, command: &str, params: &Value) -> Result<crate::cmd::reads::ReadAhead, String> { | ||
| if !matches!( | ||
| command, | ||
| "layer.addData" | ||
| | "layer.loadAll" | ||
| | "layer.reloadData" | ||
| | "layer.repairSource" | ||
| | "labels.convert" | ||
| | "model.run" | ||
| | "script.run" | ||
| | "map.reloadTiles" | ||
| | "map.repairTiles" | ||
| | "topology.validate" | ||
| | "service.layers" | ||
| | "service.add" | ||
| | "source.syncState" | ||
| | "table.statistics" | ||
| | "data.similar" | ||
| | "raster.imageGrid" | ||
| | "edit.previewShapeConversion" | ||
| | "layer.sizeBy" | ||
| ) && crate::cmd::edit::table_edit_in_background(command).is_none() | ||
| { | ||
| return Err("only Add Data, Load All, Repair/Reload Data, Convert To Annotation, models, scripts, tile archives, service reads, topology, Source File State, Read Original Image Grid, Preview Shape Conversion, Column Statistics, Similar and Size by Field prepare background work".into()); | ||
| if crate::cmd::reads::in_background(command).is_none() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The registry isn't the only copy of these ids. Category: quality
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The scoped list names a different property (which reads may start scoped), and the description lists it among the lists left alone. Checking it against the registry and taking the progress names from one place are left for the release quality pass. |
||
| return Err(crate::cmd::reads::not_in_background(command)); | ||
| } | ||
| let mut params = params.as_object().cloned().ok_or("read parameters must be an object")?; | ||
| // Scoped previews retain the raw invocation that was approved. Their admitted owner | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits, grouped: the comment reads "A look at Cancel as the work's own are", which is hard to parse. "As the work's own checks are" would say it. The new
not_in_backgroundmessage (reads.rs:252) is also much less helpful than the old one, which listed the commands that do prepare background work. The behaviour change is fine: in productionlooked_atcounts only for a test control, so the pre-start check behaves as before.Category: quality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left for the release quality pass: the comment's wording, and naming the commands in the refusal.