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

Binary script fails with Node --max-old-space-size option set #1488

Open
chrisforrette opened this issue Nov 1, 2024 · 0 comments
Open

Binary script fails with Node --max-old-space-size option set #1488

chrisforrette opened this issue Nov 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@chrisforrette
Copy link

Bug description

We ran into an oddly specific failure scenario for this CLI. This took a while to figure out so I wanted to make sure to share it with y'all.

When running the Linux standalone binary of the datadog-ci CLI, if the Node --max-old-space-size option is set at all, any/all commands fail with bash exit code 4. We found this while running it in GitHub Actions:

Run datadog-ci version
  datadog-ci version
  shell: /usr/bin/bash -e {0}
  env:
    NODE_OPTIONS: --max-old-space-size=[4](https://github.com/splice/platform/actions/runs/11637324673/job/32410310394#step:3:4)096
Error: Process completed with exit code 4.

In "Steps to reproduce the issue" you will see that set --max-old-space-size to 4096 but I found that any value here would cause datadog-ci to fail.

Describe what you expected

I would expect to be able to set --max-old-space-size and other standard Node settings and the commands in this CLI to execute successfully, or communicate more obviously if the setting is restrictive enough to block the CLI from performing its tasks.

Steps to reproduce the issue

This GitHub Actions workflow does it:

name: 'Datadog CI Test Workflow'

on:
  push:
    branches:
      - name-of-your-branch

env:
  NODE_OPTIONS: '--max-old-space-size=4096'

jobs:
  datadog-ci:
    name: Test Datadog CI
    runs-on: [ubuntu-latest]
    steps:
      - name: Install Datadog CI
        run: curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" && chmod +x /usr/local/bin/datadog-ci

      - name: Datadog CI version
        run: datadog-ci version

If you remove/comment the NODE_OPTIONS environment variable entry, it works perfectly.

Additional context

No response

Command

None

@chrisforrette chrisforrette added the bug Something isn't working label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant