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

CI: fix docker/setup-buildx-action & update rustls #7445

Merged
merged 2 commits into from Apr 21, 2024

Conversation

bayandin
Copy link
Member

@bayandin bayandin commented Apr 21, 2024

Problem

  • cargo deny check is complaining about our rustls versions, causing CI to fail (see update rustls #7441)

  • Cleanup part for docker/setup-buildx-action started to fail with the following error (for no obvious reason):

/nvme/actions-runner/_work/_actions/docker/setup-buildx-action/v3/webpack:/docker-setup-buildx/node_modules/@actions/cache/lib/cache.js:175
            throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);
^
Error: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.
    at Object.rejected (/nvme/actions-runner/_work/_actions/docker/setup-buildx-action/v3/webpack:/docker-setup-buildx/node_modules/@actions/cache/lib/cache.js:175:1)
    at Generator.next (<anonymous>)
    at fulfilled (/nvme/actions-runner/_work/_actions/docker/setup-buildx-action/v3/webpack:/docker-setup-buildx/node_modules/@actions/cache/lib/cache.js:29:1)

Summary of changes

  • Downgrade docker/setup-buildx-action from v3 to v2
  • Update rustls to 0.21.11 / 0.22.4

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

@bayandin bayandin changed the title CI: downgrade docker/setup-buildx-action to v2 CI: try to fix cleanup for docker/setup-buildx-action Apr 21, 2024
@bayandin bayandin changed the title CI: try to fix cleanup for docker/setup-buildx-action CI: fix cleanup for docker/setup-buildx-action Apr 21, 2024
@bayandin bayandin enabled auto-merge (squash) April 21, 2024 11:16
@bayandin bayandin disabled auto-merge April 21, 2024 11:38
@bayandin bayandin changed the title CI: fix cleanup for docker/setup-buildx-action CI: fix docker/setup-buildx-action & update rustls Apr 21, 2024
@bayandin bayandin enabled auto-merge (rebase) April 21, 2024 11:39
bayandin and others added 2 commits April 21, 2024 12:43
- Cleanup part for `docker/setup-buildx-action` started to fail with the following error (for no obvious reason):
```
/nvme/actions-runner/_work/_actions/docker/setup-buildx-action/v3/webpack:/docker-setup-buildx/node_modules/@actions/cache/lib/cache.js:175
            throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);
^
Error: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.
    at Object.rejected (/nvme/actions-runner/_work/_actions/docker/setup-buildx-action/v3/webpack:/docker-setup-buildx/node_modules/@actions/cache/lib/cache.js:175:1)
    at Generator.next (<anonymous>)
    at fulfilled (/nvme/actions-runner/_work/_actions/docker/setup-buildx-action/v3/webpack:/docker-setup-buildx/node_modules/@actions/cache/lib/cache.js:29:1)
```

- Downgrade `docker/setup-buildx-action` from v3 to v2
## Problem

`cargo deny check` is complaining about our rustls versions, causing
CI to fail:

```
error[vulnerability]: `rustls::ConnectionCommon::complete_io` could fall into an infinite loop based on network input
    ┌─ /__w/neon/neon/Cargo.lock:395:1
    │
395 │ rustls 0.21.9 registry+https://github.com/rust-lang/crates.io-index
    │ ------------------------------------------------------------------- security vulnerability detected
    │
    = ID: RUSTSEC-2024-0336
    = Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0336
    = If a `close_notify` alert is received during a handshake, `complete_io`
      does not terminate.

      Callers which do not call `complete_io` are not affected.

      `rustls-tokio` and `rustls-ffi` do not call `complete_io`
      and are not affected.

      `rustls::Stream` and `rustls::StreamOwned` types use
      `complete_io` and are affected.
    = Announcement: GHSA-6g7w-8wpp-frhj
    = Solution: Upgrade to >=0.23.5 OR >=0.22.4, <0.23.0 OR >=0.21.11, <0.22.0 (try `cargo update -p rustls`)

error[vulnerability]: `rustls::ConnectionCommon::complete_io` could fall into an infinite loop based on network input
    ┌─ /__w/neon/neon/Cargo.lock:396:1
    │
396 │ rustls 0.22.2 registry+https://github.com/rust-lang/crates.io-index
    │ ------------------------------------------------------------------- security vulnerability detected
    │
    = ID: RUSTSEC-2024-0336
    = Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0336
    = If a `close_notify` alert is received during a handshake, `complete_io`
      does not terminate.

      Callers which do not call `complete_io` are not affected.

      `rustls-tokio` and `rustls-ffi` do not call `complete_io`
      and are not affected.

      `rustls::Stream` and `rustls::StreamOwned` types use
      `complete_io` and are affected.
    = Announcement: GHSA-6g7w-8wpp-frhj
    = Solution: Upgrade to >=0.23.5 OR >=0.22.4, <0.23.0 OR >=0.21.11, <0.22.0 (try `cargo update -p rustls`)
```

## Summary of changes

`cargo update -p rustls@0.21.9 -p rustls@0.22.2`
@bayandin bayandin force-pushed the bayandin/try-to-fix-docker/setup-buildx-action branch from b7601b8 to c28329a Compare April 21, 2024 11:45
@bayandin bayandin disabled auto-merge April 21, 2024 11:46
@bayandin bayandin enabled auto-merge (rebase) April 21, 2024 11:47
Copy link

2766 tests run: 2648 passed, 0 failed, 118 skipped (full report)


Code coverage* (full report)

  • functions: 28.1% (6459 of 23019 functions)
  • lines: 46.8% (45562 of 97373 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
c28329a at 2024-04-21T12:31:09.497Z :recycle:

@hlinnaka
Copy link
Contributor

Cleanup part for docker/setup-buildx-action started to fail with the following error (for no obvious reason):

Weird. A new version of docker/buildx was released a few days ago. Reading the sources of docker/setup-buildx-action a little, I think it tries to download the latest version of that.

That's too automatic for my taste, I'd like our builds to be more reproducible and not depend on downloading the latest version of anything. How about pinning the buildx version, using the version input to actions/setup-buildx-action? Or turn cache-binary on or off?

That said, I don't understand what the root problem here is. Are we missing a directory somewhere, and why did it work before and stop working now?

@hlinnaka
Copy link
Contributor

hlinnaka commented Apr 21, 2024

On a hunch, I restarted the job on the update-rustls PR (https://github.com/neondatabase/neon/actions/runs/8764153485/job/24073961820?pr=7441). It seems to be working now. I guess it got somehow unwedged when you ran it once with the setup-buildx-action v2?

EDIT: no, scratch that, it failed just like before.

Copy link
Contributor

@hlinnaka hlinnaka left a comment

Choose a reason for hiding this comment

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

Pretty disappointing to have to downgrade for this, but I haven't found a better fix either, so approving

@bayandin bayandin merged commit 0d21187 into main Apr 21, 2024
56 checks passed
@bayandin bayandin deleted the bayandin/try-to-fix-docker/setup-buildx-action branch April 21, 2024 20:10
@hlinnaka hlinnaka mentioned this pull request Apr 21, 2024
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.

None yet

2 participants