-
Notifications
You must be signed in to change notification settings - Fork 12
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
mock API: Move floating IP checks earlier in instance create handler #2466
Merged
Conversation
This file contains 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
david-crespo
force-pushed
the
move-floating-ips-checks
branch
from
October 3, 2024 16:01
de0315f
to
6fdcace
Compare
david-crespo
force-pushed
the
move-floating-ips-checks
branch
from
October 3, 2024 16:02
6fdcace
to
4794428
Compare
david-crespo
added a commit
to oxidecomputer/omicron
that referenced
this pull request
Oct 3, 2024
oxidecomputer/console@5561f28...073471c * [073471c4](oxidecomputer/console@073471c4) mock api: disks are created straight into detached state * [612ec90c](oxidecomputer/console@612ec90c) oxidecomputer/console#2485 * [614f1bb5](oxidecomputer/console@614f1bb5) oxidecomputer/console#2466 * [df2dc14c](oxidecomputer/console@df2dc14c) bump vite related deps for a weird vuln * [a030b9e0](oxidecomputer/console@a030b9e0) oxidecomputer/console#2464 * [dec48497](oxidecomputer/console@dec48497) oxidecomputer/console#2461 * [e46216aa](oxidecomputer/console@e46216aa) oxidecomputer/console#2482 * [0d897efe](oxidecomputer/console@0d897efe) oxidecomputer/console#2479 * [f88790db](oxidecomputer/console@f88790db) oxidecomputer/console#2478 * [d634c8f0](oxidecomputer/console@d634c8f0) oxidecomputer/console#2477 * [eeaa14c3](oxidecomputer/console@eeaa14c3) oxidecomputer/console#2475 * [5ece6e18](oxidecomputer/console@5ece6e18) oxidecomputer/console#2467 * [4b699e01](oxidecomputer/console@4b699e01) oxidecomputer/console#2448 * [9c9dc149](oxidecomputer/console@9c9dc149) oxidecomputer/console#2465 * [1aa0fc9b](oxidecomputer/console@1aa0fc9b) oxidecomputer/console#2463 * [57db4054](oxidecomputer/console@57db4054) oxidecomputer/console#2462 * [da7fe328](oxidecomputer/console@da7fe328) oxidecomputer/console#2460 * [e0d52efd](oxidecomputer/console@e0d52efd) oxidecomputer/console#2437 * [1625d02a](oxidecomputer/console@1625d02a) oxidecomputer/console#2458 * [fd82458e](oxidecomputer/console@fd82458e) oxidecomputer/console#2457 * [7daaa337](oxidecomputer/console@7daaa337) oxidecomputer/console#2453
david-crespo
added a commit
to oxidecomputer/omicron
that referenced
this pull request
Oct 3, 2024
oxidecomputer/console@5561f28...073471c * [073471c4](oxidecomputer/console@073471c4) mock api: disks are created straight into detached state * [612ec90c](oxidecomputer/console@612ec90c) oxidecomputer/console#2485 * [614f1bb5](oxidecomputer/console@614f1bb5) oxidecomputer/console#2466 * [df2dc14c](oxidecomputer/console@df2dc14c) bump vite related deps for a weird vuln * [a030b9e0](oxidecomputer/console@a030b9e0) oxidecomputer/console#2464 * [dec48497](oxidecomputer/console@dec48497) oxidecomputer/console#2461 * [e46216aa](oxidecomputer/console@e46216aa) oxidecomputer/console#2482 * [0d897efe](oxidecomputer/console@0d897efe) oxidecomputer/console#2479 * [f88790db](oxidecomputer/console@f88790db) oxidecomputer/console#2478 * [d634c8f0](oxidecomputer/console@d634c8f0) oxidecomputer/console#2477 * [eeaa14c3](oxidecomputer/console@eeaa14c3) oxidecomputer/console#2475 * [5ece6e18](oxidecomputer/console@5ece6e18) oxidecomputer/console#2467 * [4b699e01](oxidecomputer/console@4b699e01) oxidecomputer/console#2448 * [9c9dc149](oxidecomputer/console@9c9dc149) oxidecomputer/console#2465 * [1aa0fc9b](oxidecomputer/console@1aa0fc9b) oxidecomputer/console#2463 * [57db4054](oxidecomputer/console@57db4054) oxidecomputer/console#2462 * [da7fe328](oxidecomputer/console@da7fe328) oxidecomputer/console#2460 * [e0d52efd](oxidecomputer/console@e0d52efd) oxidecomputer/console#2437 * [1625d02a](oxidecomputer/console@1625d02a) oxidecomputer/console#2458 * [fd82458e](oxidecomputer/console@fd82458e) oxidecomputer/console#2457 * [7daaa337](oxidecomputer/console@7daaa337) oxidecomputer/console#2453
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.
Noticed while working on #2464.
As the comment says: because we don't bother with being "smart" or "correct" in the mock API, we don't have sagas or transactions that let us undo DB writes when we run into an error in a complex handler like instance create. Instead, we have to make sure we do as much validation as we can up front so we can be Moderately Confident the DB writing portion of the operation is going to work if we manage to get that far. The floating IPs code combined validation and DB writes, which meant we could attach one IP and then blow up on the next one, leaving the first IP attached even though instance create overall failed. This change moves the validation earlier so we can blow up before any DB writes have happened.