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

Control plane testing overhaul #7

Merged
merged 46 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
441555e
remove unused image url param
roshanrags Nov 28, 2024
a574543
add a new outcome for enclave image updates and track directly
roshanrags Nov 28, 2024
c2510e0
clean up removed image url param
roshanrags Nov 28, 2024
6d6fcbf
add timestamp to update enclave outcome
roshanrags Nov 28, 2024
18b0a26
implement equality so it can be checked directly
roshanrags Nov 28, 2024
aed254e
refactor out a common test runner
roshanrags Nov 28, 2024
b9b8ca7
remove randomness and replace with deterministic hash of a counter
roshanrags Nov 28, 2024
49070c0
directly returns strings
roshanrags Nov 28, 2024
4deae8e
convert the first test to use the new runner
roshanrags Nov 28, 2024
a6785b9
convert test to use the new runner
roshanrags Nov 28, 2024
664bc7b
convert test to use the new runner
roshanrags Nov 28, 2024
cf1c242
convert test to use the new runner
roshanrags Nov 28, 2024
53ab62e
convert test to use the new runner
roshanrags Nov 29, 2024
391a0cc
convert test to use the new runner
roshanrags Nov 29, 2024
ed9c8c2
convert test to use the new runner
roshanrags Nov 29, 2024
a0574be
convert test to use the new runner
roshanrags Nov 29, 2024
aa1df53
convert test to use the new runner
roshanrags Nov 29, 2024
586ad3f
convert test to use the new runner
roshanrags Nov 29, 2024
3b82d33
convert test to use the new runner
roshanrags Nov 29, 2024
31b23fe
convert test to use the new runner
roshanrags Nov 29, 2024
6108d01
convert test to use the new runner
roshanrags Nov 29, 2024
dab3dde
convert test to use the new runner
roshanrags Nov 29, 2024
171ef1b
convert test to use the new runner
roshanrags Nov 29, 2024
a34565e
convert test to use the new runner
roshanrags Nov 29, 2024
f5d1791
convert test to use the new runner
roshanrags Nov 29, 2024
323f87e
convert test to use the new runner
roshanrags Nov 29, 2024
61ebdcc
remove unnecessary START sets in some tests
roshanrags Nov 29, 2024
3507878
create a SystemContext trait to encapsulate simulatable behaviour
roshanrags Nov 29, 2024
59d7a3e
implement a "real" system context with actual implementations
roshanrags Nov 29, 2024
ee1c2c2
should have self param
roshanrags Nov 29, 2024
3b079e5
store the context in JobState and use it for timestamps
roshanrags Nov 29, 2024
57247ce
create a real context and pass it along
roshanrags Nov 29, 2024
82d52e6
create a test system context with a settable start time
roshanrags Nov 29, 2024
9968211
replace now_timestamp call with plain 0, that is how it has more or l…
roshanrags Nov 29, 2024
c968a47
create test system context and pass along
roshanrags Nov 29, 2024
574859f
convert test to use the new runner
roshanrags Nov 29, 2024
c7ada6a
convert test to use the new runner
roshanrags Nov 29, 2024
c36d49b
convert test to use the new runner
roshanrags Nov 29, 2024
ca3b8e2
clean up
roshanrags Nov 29, 2024
471f2c4
clean up
roshanrags Nov 29, 2024
d525779
remove incorrect comment
roshanrags Dec 5, 2024
0a53292
add function to deterministically generate addresses
roshanrags Dec 5, 2024
adeb04c
use compute_address to get different addresses for each use instead o…
roshanrags Dec 5, 2024
b4f931f
fix tests
roshanrags Dec 5, 2024
b9631cf
add todo against unusual behaviour to revisit later
roshanrags Dec 5, 2024
b998397
rename compute_address -> compute_address_word
roshanrags Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions operator/control-plane/src/aws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,6 @@ EOF
&self,
job: &JobId,
instance_type: InstanceType,
image_url: &str,
family: &str,
architecture: &str,
region: &str,
Expand Down Expand Up @@ -1343,7 +1342,6 @@ EOF

pub async fn spin_up_instance(
&self,
image_url: &str,
job: &JobId,
instance_type: &str,
family: &str,
Expand Down Expand Up @@ -1397,7 +1395,7 @@ EOF
return Err(anyhow!("Required memory or vcpus are more than available"));
}
let instance = self
.launch_instance(job, instance_type, image_url, family, &architecture, region)
.launch_instance(job, instance_type, family, &architecture, region)
.await
.context("could not launch instance")?;
sleep(Duration::from_secs(100)).await;
Expand Down Expand Up @@ -1538,7 +1536,6 @@ EOF
impl InfraProvider for Aws {
async fn spin_up(
&mut self,
eif_url: &str,
job: &JobId,
instance_type: &str,
family: &str,
Expand All @@ -1548,15 +1545,7 @@ impl InfraProvider for Aws {
_bandwidth: u64,
) -> Result<String> {
let instance = self
.spin_up_instance(
eif_url,
job,
instance_type,
family,
region,
req_mem,
req_vcpu,
)
.spin_up_instance(job, instance_type, family, region, req_mem, req_vcpu)
.await
.context("could not spin up instance")?;
Ok(instance)
Expand Down
Loading