Skip to content

fix: addresses stack too deep error #3389

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arthurgousset
Copy link

Description

This PR aims to address the stack too deep issue described here: #3373

It's a fix, I imagine it could be refactored and improved, but @priyankc and I thought we'd share it here.

We'd love feedback and suggestions on how to improve the PR.

Test

Reproduce the bug here #3373

  1. Add a file here modules/hello/plans/test.pp

    plan hello::test {
      fail_plan(
        'That should fail properly',
        'test/failure',
        foo => Error('foo'),
      )
    }
  2. Install and run the test plan (see stack too deep error)

    $ bundle install --path .bundle --without test
    $ bundle exec bolt plan run hello::test --format json
    
     bundler: failed to load command: bolt (/Users/arthur/Documents/hyperdrive-eng/customers/forks/bolt/.bundle/ruby/3.2.0/bin/bolt)
     /Users/arthur/Documents/hyperdrive-eng/customers/forks/bolt/.bundle/ruby/3.2.0/gems/puppet-8.10.0-universal-darwin/lib/puppet/pops/types/types.rb:3009:in `block in instance?': stack level too deep (SystemStackError)
  3. Apply changes in this PR

  4. Run test plan again (resolved stack too deep error)

    $ bundle exec bolt plan run hello::test --format json
    {"kind":"test/failure","msg":"That should fail properly","details":{"foo":{"msg":"foo"},"file":"/Users/arthur/Documents/hyperdrive-eng/customers/forks/bolt/modules/hello/plans/test.pp","line":2,"column":3}}

@arthurgousset arthurgousset requested a review from a team as a code owner May 15, 2025 05:01
@CLAassistant
Copy link

CLAassistant commented May 15, 2025

CLA assistant check
All committers have signed the CLA.

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.

2 participants