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

Akamai SDK build timeout due to CPU/Memory starvation in GitHub Actions? #366

Open
jooooel opened this issue Dec 11, 2023 · 6 comments
Open
Labels
impact/performance Something is slower than expected kind/bug Some behavior is incorrect or out of spec

Comments

@jooooel
Copy link
Contributor

jooooel commented Dec 11, 2023

What happened?

I'm trying to run pulumi up/preview in GitHub Actions, but there seems to be some issues with building the Pulumi Akamai Go SDK.

The job is stuck for a really long time and it looks like nothing happens. After a while (close to an hour maybe), the job fails and I get the following error:

The hosted runner: GitHub Actions 2 lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.

Example

I have narrowed it down to building github.com/pulumi/pulumi-akamai/sdk/v6/go/akamai. Here is a minimal reproduction. One part is a main.go that only references the SDK. And the other part is the config for a GitHub Action that can trigger the issue.

package main

import (
	"github.com/pulumi/pulumi-akamai/sdk/v6/go/akamai"
)

func main() {
	_ = akamai.Property{}
}
name: "Test"

on:
  push:
    branches:
      - main

  pull_request:
    branches:
      - main

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: "Checkout code"
        uses: actions/checkout@v4

      - uses: actions/setup-go@v4
        with:
          go-version-file: go.mod
          cache-dependency-path: go.sum

      - name: Build
        run: |
          go build -v -o goapp

Output of pulumi about

Not really relevant I guess...

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@jooooel jooooel added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Dec 11, 2023
@iwahbe
Copy link
Member

iwahbe commented Dec 12, 2023

Hi @jooooel. I'm sorry you're hitting that issue. Profiling Akamai, it looks like it takes ~2.9GB to build Akamai. That should fall within GitHub's memory limit, but its still a lot. We hope to be able to get that down in the near future.

@iwahbe iwahbe added impact/performance Something is slower than expected and removed needs-triage Needs attention from the triage team labels Dec 12, 2023
@jooooel
Copy link
Contributor Author

jooooel commented Dec 12, 2023

Ah yes, that sounds like it could be an issue yes… do you have a recommendation about what do to in the mean time? Can I use pre built binaries for Akamai maybe? 🤔

@iwahbe
Copy link
Member

iwahbe commented Dec 13, 2023

You can't use a pre-built binary for Akamai (since it is a library), but you can use a pre-built binary for your pulumi program by setting the runtime: { ..., binary: "path/to/pre-built/binary" }. (docs)

@jooooel
Copy link
Contributor Author

jooooel commented Dec 13, 2023

I “solved” it by using a larger GitHub Action runner 😅

@iwahbe
Copy link
Member

iwahbe commented Dec 13, 2023

That also works 😄

@iwahbe
Copy link
Member

iwahbe commented Sep 26, 2024

Related to pulumi/pulumi-terraform-bridge#1468.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/performance Something is slower than expected kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants