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

"lookup_resource" macro needs to be more flexible #905

Merged
merged 12 commits into from
Apr 13, 2022
Merged

Conversation

davepacheco
Copy link
Collaborator

Fixes #847.

This is definitely getting a lot hairier than I like. However, it seems to be blocking multiple projects (at least ssh key support, and likely some silo work as well) and I do think it's an improvement over what we've got today (which is a family of slightly different hand-rolled lookup functions for these cases).

@@ -2554,32 +2553,6 @@ impl DataStore {
})
}

pub async fn update_available_artifact_fetch(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The upside of the mess: we can get rid of hand-rolled functions like this one! (We should be able to get rid of the built-in user and role ones too but I didn't want this change to get much bigger.)

@davepacheco davepacheco marked this pull request as ready for review April 13, 2022 00:20
@davepacheco
Copy link
Collaborator Author

I had some changes to the updates test here, but I'm going to do them in a separate PR since they're more non-trivial than I appreciated at first.

Copy link
Contributor

@plotnick plotnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change indeed makes lookup_resource much more flexible, and I think also clearer. It also unblocks my SSH key work, so thanks!

@davepacheco davepacheco enabled auto-merge (squash) April 13, 2022 18:05
@davepacheco davepacheco merged commit f380f83 into main Apr 13, 2022
@davepacheco davepacheco deleted the lookup-pkey branch April 13, 2022 18:44
leftwo pushed a commit that referenced this pull request Sep 11, 2023
Crucible:
update rust crate base64 to 0.21.3 (#913)
update rust crate slog-async to 2.8 (#915)
update rust crate async-recursion to 1.0.5 (#912)
Move active jobs into a separate data structure and optimize `ackable_work` (#908)
Check repair IDs correctly (#910)
update actions/checkout action to v4 (#903)
update rust crate tokio to 1.32 (#890)
Remove single-item Vecs (#898)
Move "extent under repair" into a helper function (#907)
offset_mod shouldn't be randomized (#905)
Only rehash if a write may have failed (#899)
Make negotiation state an enum (#901)
Test update for fast write ack and gather errors on test failure (#897)

Propolis:
Update cpuid-gen util for better coverage
Make storage backend config more flexible and consistent
Use correct register sizes for PIIX3 PM device
Update bitflags dependency
fix softnpu port order (#517)
Use hex formatting for unhandled MMIO/PIO/MSRs
Update deps for new crucible and oximeter
Update standalone-with-crucible docs (#514)
leftwo added a commit that referenced this pull request Sep 12, 2023
Crucible:
update rust crate base64 to 0.21.3 (#913)
update rust crate slog-async to 2.8 (#915)
update rust crate async-recursion to 1.0.5 (#912)
Move active jobs into a separate data structure and optimize
`ackable_work` (#908) Check repair IDs correctly (#910)
update actions/checkout action to v4 (#903)
update rust crate tokio to 1.32 (#890)
Remove single-item Vecs (#898)
Move "extent under repair" into a helper function (#907) offset_mod
shouldn't be randomized (#905)
Only rehash if a write may have failed (#899)
Make negotiation state an enum (#901)
Test update for fast write ack and gather errors on test failure (#897)

Propolis:
Update cpuid-gen util for better coverage
Make storage backend config more flexible and consistent Use correct
register sizes for PIIX3 PM device
Update bitflags dependency
fix softnpu port order (#517)
Use hex formatting for unhandled MMIO/PIO/MSRs
Update deps for new crucible and oximeter
Update standalone-with-crucible docs (#514)

Co-authored-by: Alan Hanson <[email protected]>
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

Successfully merging this pull request may close these issues.

"lookup_resource" macro should support different primary keys
2 participants