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

chore(rustc-perf): update aws terraform provider from 3.59 to 4.67 #485

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

marcoieni
Copy link
Member

No description provided.

@marcoieni marcoieni changed the title chore: update aws 3.59 terraform provider chore: update aws terraform provider from 3.59 to 4.67 Aug 22, 2024
@marcoieni marcoieni changed the title chore: update aws terraform provider from 3.59 to 4.67 chore(rustc-perf): update aws terraform provider from 3.59 to 4.67 Aug 30, 2024
Copy link
Member

@jdno jdno left a comment

Choose a reason for hiding this comment

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

As discussed last week, let's try to create a aws_cloudfront_response_headers_policy and see what diff Terraform will produce. 🙂

@marcoieni
Copy link
Member Author

marcoieni commented Sep 2, 2024

plan:

# aws_cloudfront_response_headers_policy.response_policy will be created
  + resource "aws_cloudfront_response_headers_policy" "response_policy" {
      + comment = "Policy for RustcPerf website"
      + etag    = (known after apply)
      + id      = (known after apply)
      + name    = "RustcPerfPolicy"

      + security_headers_config {
          + content_type_options {
              + override = true
            }
          + frame_options {
              + frame_option = "DENY"
              + override     = true
            }
          + referrer_policy {
              + override        = true
              + referrer_policy = "no-referrer"
            }
          + xss_protection {
              + mode_block = true
              + override   = true
              + protection = true
            }
        }
    }

  # module.static_website.aws_cloudfront_distribution.website will be updated in-place
  ~ resource "aws_cloudfront_distribution" "website" {
      ~ http_version                   = "http2" -> "http2and3"
        id                             = "E355NZKQL79WTL"
        tags                           = {}
        # (19 unchanged attributes hidden)

      ~ default_cache_behavior {
          + cache_policy_id            = "658327ea-f89d-4fab-a63d-7e88639e58f6"
          + response_headers_policy_id = (known after apply)
            # (11 unchanged attributes hidden)

          - forwarded_values {
              - headers                 = [] -> null
              - query_string            = false -> null
              - query_string_cache_keys = [] -> null

              - cookies {
                  - forward           = "none" -> null
                  - whitelisted_names = [] -> null
                }
            }
        }

      ~ viewer_certificate {
          ~ minimum_protocol_version       = "TLSv1" -> "TLSv1.2_2021"
            # (3 unchanged attributes hidden)
        }

        # (2 unchanged blocks hidden)
    }

Plan: 1 to add, 1 to change, 0 to destroy.
╷
│ Warning: Argument is deprecated
│
│   with aws_s3_bucket.bucket,
│   on s3.tf line 86, in resource "aws_s3_bucket" "bucket":
│   86: resource "aws_s3_bucket" "bucket" {
│
│ Use the aws_s3_bucket_versioning resource instead
│
│ (and 5 more similar warnings elsewhere)
╵

@marcoieni marcoieni force-pushed the chore-update-aws-3.59-terraform-provider branch from 5c6092d to fca3102 Compare September 2, 2024 12:17
@@ -7,6 +7,31 @@ module "static_website" {
domain_name = "perf-data.rust-lang.org"
origin_domain_name = aws_s3_bucket.bucket.bucket_regional_domain_name
origin_access_identity = aws_cloudfront_origin_access_identity.bucket.cloudfront_access_identity_path
response_policy_id = aws_cloudfront_response_headers_policy.response_policy.id
Copy link
Member Author

Choose a reason for hiding this comment

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

I had to add this field because it's required now

@marcoieni
Copy link
Member Author

@Kobzol does the policy I added look reasonable?
How can I make sure nothing breaks after I deploy this change?

I would like to understand and document how perf-data.rust-lang.org is used 👍

@marcoieni marcoieni marked this pull request as ready for review September 2, 2024 12:23
@Kobzol
Copy link
Contributor

Kobzol commented Sep 2, 2024

How can I make sure nothing breaks after I deploy this change?

You wait until you hear from angry users 😆 The way the collector talks to the website, and how it's all wired up, is a bit brittle.

I wrote a high-level description on my blog (https://kobzol.github.io/rust/rustc/2023/08/18/rustc-benchmark-suite.html). The database is somehow documented here. The rest is a set of invariants hidden within the source code of rustc-perf.

@Kobzol
Copy link
Contributor

Kobzol commented Sep 2, 2024

Wait, perf-data.rust-lang.org? I actually have no idea what that is. I thought that you're talking about perf.rust-lang.org :)

@marcoieni
Copy link
Member Author

it's used in rustc-perf: https://github.com/search?q=repo%3Arust-lang%2Frustc-perf%20perf-data.rust-lang.org&type=code

@Kobzol
Copy link
Contributor

Kobzol commented Sep 2, 2024

Right, I asked Mark and he explained stuff to me, as always. It is used to download self-profile results from S3, mostly (and also manually uploaded DB dumps).

@marcoieni
Copy link
Member Author

Ok, thanks! I'll merge and apply this PR. hopefully there will be no angry users 😁

@marcoieni marcoieni merged commit e352679 into master Sep 2, 2024
6 checks passed
@marcoieni marcoieni deleted the chore-update-aws-3.59-terraform-provider branch September 2, 2024 13:06
@marcoieni
Copy link
Member Author

I just applied. Let me know if there's any issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants