Skip to content
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

silo_user_fetch_by_external_id should use LookupPath machinery #1284

Open
jmpesp opened this issue Jun 27, 2022 · 0 comments
Open

silo_user_fetch_by_external_id should use LookupPath machinery #1284

jmpesp opened this issue Jun 27, 2022 · 0 comments

Comments

@jmpesp
Copy link
Contributor

jmpesp commented Jun 27, 2022

From #1210:

This seems really analogous to a lookup of, say, a Project by name within its parent Organization. It'd be nice to use LookupPath here, since it ensures consistent patterns, authz, filter conditions, etc. But I guess we can't do that now because this isn't actually a "name" field (different field name and type).

It would be nice to use

let (_, db_silo_user) = LookupPath::new(&opctx, datastore)
  .silo_name(some name)
  .silo_user_external_id(some external id)
  .fetch()
  .await?;

silo_user_fetch_by_external_id returns Result<Option<SiloUser>, Error> so the LookupPath code will have to add a function with an optional return value.

leftwo pushed a commit that referenced this issue Apr 30, 2024
Propolis:
Update oximeter dependency to pull in automatic producer registration (#689)
Propagate ReplaceResult up; return disk status (#687)
Enable clippy warnings for lossless casts
Update rustls deps for CVE-2024-32650
migration: refrain from offering all pages when possible (#682)

Crucible:
DTrace probes for IO on/off the network (#1284)
Update oximeter dep to pull in automatic producer registration (#1279)
Remove `ReadResponse` in favor of `RawReadResponse` (#1212)
Fix typo in DTrace upstairs_info (#1276)
replace needing no work should not be an error (#1275)
Add some DTrace scripts to the package. (#1274)
More Pantry updates for Region replacement (#1269)
Send the correct task count for reconciliations (#1271)
Raw extent cleanup (#1268)
leftwo added a commit that referenced this issue Apr 30, 2024
Propolis:
Update oximeter dependency to pull in automatic producer registration (#689)
Propagate ReplaceResult up; return disk status (#687)
Enable clippy warnings for lossless casts
Update rustls deps for CVE-2024-32650
migration: refrain from offering all pages when possible (#682)

Crucible:
DTrace probes for IO on/off the network (#1284)
Update oximeter dep to pull in automatic producer registration (#1279)
Remove `ReadResponse` in favor of `RawReadResponse` (#1212)
Fix typo in DTrace upstairs_info (#1276)
replace needing no work should not be an error (#1275)
Add some DTrace scripts to the package. (#1274)
More Pantry updates for Region replacement (#1269)
Send the correct task count for reconciliations (#1271)
Raw extent cleanup (#1268)

---------

Co-authored-by: Alan Hanson <alan@oxide.computer>
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

No branches or pull requests

1 participant