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

Assorted doc & mz cli changes for aws/us-west-2 launch #22287

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions doc/developer/platform/ux.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ by Materialize Cloud:

* aws:us-east-1
* aws:eu-west-1
* aws:us-west-2

### Cluster

Expand Down
1 change: 1 addition & 0 deletions doc/user/content/releases/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this should reflect the time of the calendar event, not the local time at which the event occurs. I put up #22566 to adjust.


{{< note >}}
Upgrade windows follow any daylight saving time or summer time rules
Expand Down
2 changes: 1 addition & 1 deletion doc/user/layouts/shortcodes/replica-options.html
Original file line number Diff line number Diff line change
@@ -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.<br>Default: `1s`
`INTROSPECTION DEBUGGING` | `bool` | Whether to introspect the gathering of the introspection data.<br>Default: `FALSE`
`IDLE ARRANGEMENT MERGE EFFORT` | `integer` | ***Unstable.** This option may be changed or removed at any time.*<br>The amount of effort the replica should exert on compacting arrangements during idle periods.
Expand Down
7 changes: 7 additions & 0 deletions src/cloud-api/src/client/cloud_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
}
Expand All @@ -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 {
Expand All @@ -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),
}
}
Expand All @@ -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"),
}
}
}
Expand All @@ -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),
}
}
Expand Down
1 change: 1 addition & 0 deletions src/mz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions test/mz-e2e/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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}")
Expand Down