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

mantle/platform/gcloud: fix confidential compute check #3876

Merged
merged 3 commits into from
Sep 13, 2024

Commits on Sep 13, 2024

  1. mantle/platform/gcloud: fix confidential compute check

    In db803c3 we add support for ConfidentialType but we made it so
    that we always execute this code where we don't want to do that if
    the user didn't specify any ConfidentialType for GCP.
    
    The way the code is now we can't run any GCP tests on non confidential
    instances.
    
    ```
    failed to create instance "kola-dd144aac7413f66c85e9":
        Does not support confidential type , should be: sev, sev_snp
    ```
    dustymabe committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    a7fc9f9 View commit details
    Browse the repository at this point in the history
  2. mantle/kola: remove rand.Seed()

    This is to appease golangci-lint:
    
    ```
    Error: SA1019: rand.Seed has been deprecated since Go 1.20 and an alternative
    has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed
    with a random value. Programs that call Seed with a known value to get a
    specific sequence of results should use New(NewSource(seed)) to obtain a local
    random generator.  (staticcheck)
    ```
    
    According to https://pkg.go.dev/math/rand#Seed "If Seed is not called, the
    generator is seeded randomly at program startup." so I think it's safe to
    just drop it.
    dustymabe committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    6c022c4 View commit details
    Browse the repository at this point in the history
  3. mantle: math/rand -> crypto/rand

    To appease golangci-lint:
    
    ```
    Error: SA1019: rand.Read has been deprecated since Go 1.20 because
    it shouldn't be used: For almost all use cases, [crypto/rand.Read]
    is more appropriate.
    ```
    dustymabe committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    8af0e65 View commit details
    Browse the repository at this point in the history