Represent operation names with their instance name prefixes everywhere
The following discussion from !470 (merged) should be addressed:
-
@santigl started a discussion: (+2 comments) A tiny nit that I noticed is that
bgd operations
lists names starting with a"/"
(maybe it should omit that first character?), but when attempting a query for that exact string it returns:Error: Error parsing filter string. See docs for correct filter string syntax. Parser error follows: {str(e)}
Operation names are stored as plain UUIDs in the database for the SQL scheduler, but they are prefixed with the instance name when they are displayed to the user through ListOperations
, GetOperation
, or when returned from an Execute request. In other words, they look like dev/518d54ef-debc-444d-bee7-15567ec72e72
instead of just 518d54ef-debc-444d-bee7-15567ec72e72
.
This means that whenever they're generated or fetched from the database, they have to be prefixed. And when they're taken as input from GetOperation
, the prefix is required but immediately stripped off for use in a database query.
GetOperation
does not have a special instance name parameter, so the prefixes are unfortunately necessary to disambiguate between instances. However, the prefixing/unprefixing is wasteful. Instead, the database should store the full operation name, prefix included.
Note that the name
parameter in the ListOperations
filtering will not need to change, as it currently uses the entire string given to it in its database query.