-
Notifications
You must be signed in to change notification settings - Fork 19
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
Antagonize the Crucible Agent #1011
Conversation
The `agent-antagonist` will stress test the Crucible agent by continuously requesting and deleting regions, randomly taking and deleting snapshots of those regions.
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.
This is cool, and much needed to it sounds like.
I would like to see this running in CI, but to do that we need a way to loop for some time
or iteration count and that could be a follow on PR along with the buildomat stuff to
run it.
agent-antagonist/src/main.rs
Outdated
let log = build_logger(); | ||
|
||
let agent = if let Some(agent) = agent { | ||
info!(log, "using agent at argument {:?}", agent); |
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.
Nit: Agent at address?
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.
removed, see 1137af4
agent-antagonist/src/main.rs
Outdated
}; | ||
|
||
let dataset = if let Some(dataset) = dataset { | ||
info!(log, "using dataset at argument {:?}", dataset); |
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.
Also Nit, using dataset {:?} maybe? Maybe for the other one too?
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.
removed, see 1137af4
agent-antagonist/src/main.rs
Outdated
} | ||
|
||
let client = get_client(&agent); | ||
let r = client.region_get_snapshot(&RegionId(region_id.to_string()), &snapshot_id.to_string()).await; |
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.
Did cargo fmt
leave this line longer than 80 characters? Is it longer than 80?
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.
It's definitely longer, I wonder why fmt didn't pick it up?
create two new async functions to reduce indent level
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.
Did you move the entire loop to a new function just to
reduce the lines to < 80 characters?
If it's just a move, then go ahead and merge this with main. |
I did! Merging now. |
The
agent-antagonist
will stress test the Crucible agent by continuously requesting and deleting regions, randomly taking and deleting snapshots of those regions.