From b75d3b54adddeea250a257987bd3102ea5999df2 Mon Sep 17 00:00:00 2001 From: Roshan Jobanputra Date: Tue, 10 Oct 2023 09:19:29 -0700 Subject: [PATCH] Assorted doc & mz cli changes for aws/us-west-2 launch --- doc/developer/platform/ux.md | 1 + doc/user/content/releases/_index.md | 1 + doc/user/layouts/shortcodes/replica-options.html | 2 +- src/cloud-api/src/client/cloud_provider.rs | 7 +++++++ src/mz/README.md | 1 + test/mz-e2e/mzcompose.py | 11 ++++++----- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/doc/developer/platform/ux.md b/doc/developer/platform/ux.md index 5e830c334496..819bf6652741 100644 --- a/doc/developer/platform/ux.md +++ b/doc/developer/platform/ux.md @@ -538,6 +538,7 @@ by Materialize Cloud: * aws:us-east-1 * aws:eu-west-1 + * aws:us-west-2 ### Cluster diff --git a/doc/user/content/releases/_index.md b/doc/user/content/releases/_index.md index 34c02289c88f..f1d7f7c3bab7 100644 --- a/doc/user/content/releases/_index.md +++ b/doc/user/content/releases/_index.md @@ -30,6 +30,7 @@ Region | Day of week | Time --------------|-------------|----------------------------- aws/eu-west-1 | Wednesday | 2100-2300 [Europe/Dublin] aws/us-east-1 | Thursday | 0500-0700 [America/New_York] +aws/us-west-2 | Thursday | 0200-0400 [America/Los_Angeles] {{< note >}} Upgrade windows follow any daylight saving time or summer time rules diff --git a/doc/user/layouts/shortcodes/replica-options.html b/doc/user/layouts/shortcodes/replica-options.html index 2be6b9a325bf..155175ec53fa 100644 --- a/doc/user/layouts/shortcodes/replica-options.html +++ b/doc/user/layouts/shortcodes/replica-options.html @@ -1,7 +1,7 @@ Field | Value | Description ------------------------------------|------------|------------------------------------- `SIZE` | `text` | The size of the replica. For valid sizes, see [Size](/sql/create-cluster-replica#size). -`AVAILABILITY ZONE` | `text` | The availability zone of the underlying clodu provider in which to provision the replica. You must specify an [AWS availability zone ID](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html) in either `us-east-1` or `eu-west-1`, e.g. `use1-az1`. Note that you must use the zone's ID, not its name. +`AVAILABILITY ZONE` | `text` | The availability zone of the underlying clodu provider in which to provision the replica. You must specify an [AWS availability zone ID](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html) in either `us-east-1`, `eu-west-1`, or `us-west-2`, e.g. `use1-az1`. Note that you must use the zone's ID, not its name. `INTROSPECTION INTERVAL` | `interval` | The interval at which to collect introspection data. See [Troubleshooting](/ops/troubleshooting) for details about introspection data. The special value `0` entirely disables the gathering of introspection data.
Default: `1s` `INTROSPECTION DEBUGGING` | `bool` | Whether to introspect the gathering of the introspection data.
Default: `FALSE` `IDLE ARRANGEMENT MERGE EFFORT` | `integer` | ***Unstable.** This option may be changed or removed at any time.*
The amount of effort the replica should exert on compacting arrangements during idle periods. diff --git a/src/cloud-api/src/client/cloud_provider.rs b/src/cloud-api/src/client/cloud_provider.rs index 7bc56fc0f41b..8452e12abbbe 100644 --- a/src/cloud-api/src/client/cloud_provider.rs +++ b/src/cloud-api/src/client/cloud_provider.rs @@ -67,6 +67,7 @@ impl CloudProvider { match self.id.as_str() { "aws/us-east-1" => Ok(CloudProviderRegion::AwsUsEast1), "aws/eu-west-1" => Ok(CloudProviderRegion::AwsEuWest1), + "aws/us-west-2" => Ok(CloudProviderRegion::AwsUsWest2), _ => Err(Error::CloudProviderRegionParseError), } } @@ -83,6 +84,9 @@ pub enum CloudProviderRegion { /// Represents `aws/eu-west-1` cloud provider and region #[serde(rename = "aws/eu-west-1")] AwsEuWest1, + /// Represents `aws/us-west-2` cloud provider and region + #[serde(rename = "aws/us-west-2")] + AwsUsWest2, } impl CloudProviderRegion { @@ -91,6 +95,7 @@ impl CloudProviderRegion { match cloud_provider.id.as_str() { "aws/us-east-1" => Ok(CloudProviderRegion::AwsUsEast1), "aws/eu-west-1" => Ok(CloudProviderRegion::AwsEuWest1), + "aws/us-west-2" => Ok(CloudProviderRegion::AwsUsWest2), _ => Err(Error::CloudProviderRegionParseError), } } @@ -101,6 +106,7 @@ impl Display for CloudProviderRegion { match self { CloudProviderRegion::AwsUsEast1 => write!(f, "aws/us-east-1"), CloudProviderRegion::AwsEuWest1 => write!(f, "aws/eu-west-1"), + CloudProviderRegion::AwsUsWest2 => write!(f, "aws/us-west-2"), } } } @@ -112,6 +118,7 @@ impl FromStr for CloudProviderRegion { match s.to_lowercase().as_str() { "aws/us-east-1" => Ok(CloudProviderRegion::AwsUsEast1), "aws/eu-west-1" => Ok(CloudProviderRegion::AwsEuWest1), + "aws/us-west-2" => Ok(CloudProviderRegion::AwsUsWest2), _ => Err(Error::CloudProviderRegionParseError), } } diff --git a/src/mz/README.md b/src/mz/README.md index a156c22e85f4..3a40140a6395 100644 --- a/src/mz/README.md +++ b/src/mz/README.md @@ -55,6 +55,7 @@ SUBCOMMANDS: ``` aws/us-east-1 enabled aws/eu-west-1 disabled + aws/us-west-2 disabled ``` 4. Launch a SQL shell connected to one of the enabled regions in your diff --git a/test/mz-e2e/mzcompose.py b/test/mz-e2e/mzcompose.py index 2fb286371a31..a2412aac863c 100644 --- a/test/mz-e2e/mzcompose.py +++ b/test/mz-e2e/mzcompose.py @@ -26,7 +26,7 @@ ) from materialize.mzcompose.services.mz import Mz -REGION = "aws/us-east-1" +REGION = "aws/us-west-2" ENVIRONMENT = os.getenv("ENVIRONMENT", "production") USERNAME = os.getenv("NIGHTLY_MZ_USERNAME", "infra+bot@materialize.com") APP_PASSWORD = os.environ["MZ_CLI_APP_PASSWORD"] @@ -207,10 +207,11 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None: # Enable, disable and show are already tested. output = c.run("mz", "region", "list", "--format", "json", capture=True) regions = json.loads(output.stdout) - us_region = regions[0] - if us_region["region"] != "aws/us-east-1": - us_region = regions[1] - assert "enabled" == us_region["status"] + us_region = None + for region in regions: + if region["region"] == REGION: + us_region = region + assert us_region is not None and "enabled" == us_region["status"] # Verify the content is ok print(f"Path: {psql_config_path}")