Skip to content

Commit f054f09

Browse files
authored
Jeadie/26 04 16/spice sql (spiceai#10343)
* correct 'spice sql --cloud us-east-1' * formatting
1 parent 4be85ba commit f054f09

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

bin/spice/src/commands/sql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn build_repl_config(ctx: &RuntimeContext, args: &SqlArgs) -> repl::ReplConfig {
9191
.map_or_else(
9292
|| {
9393
if let Some(region) = ctx.cloud_region() {
94-
format!("https://{region}-flight.spiceai.io")
94+
format!("https://{region}-prod-aws-flight.spiceai.io")
9595
} else {
9696
"http://localhost:50051".to_string()
9797
}

bin/spice/src/context.rs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl RuntimeContext {
122122
}
123123

124124
if let Some(region) = cloud {
125-
ctx.http_endpoint = format!("https://{region}-data.spiceai.io");
125+
ctx.http_endpoint = format!("https://{region}-prod-aws-data.spiceai.io");
126126
ctx.cloud_region = Some(region.to_string());
127127
}
128128

@@ -889,7 +889,10 @@ mod tests {
889889
.expect("with_args should succeed");
890890

891891
assert!(ctx.is_cloud());
892-
assert_eq!(ctx.http_endpoint(), "https://us-east-1-data.spiceai.io");
892+
assert_eq!(
893+
ctx.http_endpoint(),
894+
"https://us-east-1-prod-aws-data.spiceai.io"
895+
);
893896
assert_eq!(ctx.cloud_region(), Some("us-east-1"));
894897
}
895898

@@ -1007,7 +1010,10 @@ mod tests {
10071010
.expect("with_args should succeed");
10081011

10091012
assert!(ctx.is_cloud());
1010-
assert_eq!(ctx.http_endpoint(), "https://us-west-2-data.spiceai.io");
1013+
assert_eq!(
1014+
ctx.http_endpoint(),
1015+
"https://us-west-2-prod-aws-data.spiceai.io"
1016+
);
10111017
}
10121018

10131019
#[test]
@@ -1022,7 +1028,10 @@ mod tests {
10221028
.expect("with_args should succeed");
10231029

10241030
assert!(ctx.is_cloud());
1025-
assert_eq!(ctx.http_endpoint(), "https://us-west-2-data.spiceai.io");
1031+
assert_eq!(
1032+
ctx.http_endpoint(),
1033+
"https://us-west-2-prod-aws-data.spiceai.io"
1034+
);
10261035
assert_eq!(ctx.api_key(), Some("cloud-api-key-12345"));
10271036
}
10281037

@@ -1069,7 +1078,10 @@ mod tests {
10691078
.expect("with_args should succeed");
10701079

10711080
// Cloud mode socket address should strip https://
1072-
assert_eq!(ctx.http_socket_address(), "us-east-1-data.spiceai.io");
1081+
assert_eq!(
1082+
ctx.http_socket_address(),
1083+
"us-east-1-prod-aws-data.spiceai.io"
1084+
);
10731085
}
10741086

10751087
#[test]

0 commit comments

Comments
 (0)