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

Bug: sam build fails with ruby 3.2.x #5530

Closed
hirowatari opened this issue Jul 15, 2023 · 11 comments
Closed

Bug: sam build fails with ruby 3.2.x #5530

hirowatari opened this issue Jul 15, 2023 · 11 comments
Labels
area/build sam build command stage/bug-repro The issue/bug needs to be reproduced

Comments

@hirowatari
Copy link

Description:

Running sam build fails

Steps to reproduce:

Run sam build
Sample repo: https:/hirowatari/aws-sam-lambda-ruby322-bundler-error

Observed result:


2023-07-14 22:47:45,517 | Config file location: /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/samconfig.toml
2023-07-14 22:47:45,519 | Config file '/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/samconfig.toml' does not exist
2023-07-14 22:47:45,521 | Using SAM Template at /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml
2023-07-14 22:47:45,536 | Using config file: samconfig.toml, config environment: default
2023-07-14 22:47:45,536 | Expand command line arguments to:
2023-07-14 22:47:45,537 | --template_file=/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml --mount_with=READ --build_dir=.aws-sam/build --cache_dir=.aws-sam/cache
2023-07-14 22:47:45,573 | 'build' command is called
2023-07-14 22:47:45,574 | No Parameters detected in the template
2023-07-14 22:47:45,586 | There is no customer defined id or cdk path defined for resource Ruby32Lambda, so we will use the resource logical id as the resource id
2023-07-14 22:47:45,587 | 0 stacks found in the template
2023-07-14 22:47:45,588 | No Parameters detected in the template
2023-07-14 22:47:45,596 | There is no customer defined id or cdk path defined for resource Ruby32Lambda, so we will use the resource logical id as the resource id
2023-07-14 22:47:45,597 | 1 resources found in the stack
2023-07-14 22:47:45,597 | Found Serverless function with name='Ruby32Lambda' and CodeUri='src/'
2023-07-14 22:47:45,598 | --base-dir is not presented, adjusting uri src/ relative to /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml
2023-07-14 22:47:45,599 | 1 resources found in the stack
2023-07-14 22:47:45,600 | Found Serverless function with name='Ruby32Lambda' and CodeUri='src/'
2023-07-14 22:47:45,600 | Instantiating build definitions
2023-07-14 22:47:45,602 | Same function build definition found, adding function (Previous: BuildDefinition(ruby3.2, /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src, Zip, , 4cbee539-5af8-44c3-af71-d83ef954d83f, {}, {}, x86_64, []), Current: BuildDefinition(ruby3.2, /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src, Zip, , 7ca04e0b-2a30-43d9-905b-bbafa1a78a33, {}, {}, x86_64, []), Function:
Function(function_id='Ruby32Lambda', name='Ruby32Lambda', functionname='Ruby32Lambda', runtime='ruby3.2', memory=None, timeout=None, handler='function.handler', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src', environment=None, rolearn=None, layers=[], events=None, metadata={'SamResourceId': 'Ruby32Lambda'}, inlinecode=None, codesign_config_arn=None,
architectures=None, function_url_config=None, function_build_info=<FunctionBuildInfo.BuildableZip: ('BuildableZip', 'Regular ZIP function which can be build with SAM CLI')>, stack_path='', runtime_management_config=None))
2023-07-14 22:47:45,605 | Building codeuri: /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src runtime: ruby3.2 metadata: {} architecture: x86_64 functions: Ruby32Lambda
2023-07-14 22:47:45,606 | Building to following folder /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-14 22:47:45,606 | Loading workflow module 'aws_lambda_builders.workflows'
2023-07-14 22:47:45,607 | Registering workflow 'CustomMakeBuilder' with capability 'Capability(language='provided', dependency_manager=None, application_framework=None)'
2023-07-14 22:47:45,609 | Registering workflow 'DotnetCliPackageBuilder' with capability 'Capability(language='dotnet', dependency_manager='cli-package', application_framework=None)'
2023-07-14 22:47:45,610 | Registering workflow 'GoModulesBuilder' with capability 'Capability(language='go', dependency_manager='modules', application_framework=None)'
2023-07-14 22:47:45,611 | Registering workflow 'JavaGradleWorkflow' with capability 'Capability(language='java', dependency_manager='gradle', application_framework=None)'
2023-07-14 22:47:45,613 | Registering workflow 'JavaMavenWorkflow' with capability 'Capability(language='java', dependency_manager='maven', application_framework=None)'
2023-07-14 22:47:45,614 | Registering workflow 'NodejsNpmBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm', application_framework=None)'
2023-07-14 22:47:45,615 | Registering workflow 'NodejsNpmEsbuildBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm-esbuild', application_framework=None)'
2023-07-14 22:47:45,617 | Registering workflow 'PythonPipBuilder' with capability 'Capability(language='python', dependency_manager='pip', application_framework=None)'
2023-07-14 22:47:45,618 | Registering workflow 'RubyBundlerBuilder' with capability 'Capability(language='ruby', dependency_manager='bundler', application_framework=None)'
2023-07-14 22:47:45,619 | Registering workflow 'RustCargoLambdaBuilder' with capability 'Capability(language='rust', dependency_manager='cargo', application_framework=None)'
2023-07-14 22:47:45,620 | Found workflow 'RubyBundlerBuilder' to support capabilities 'Capability(language='ruby', dependency_manager='bundler', application_framework=None)'
2023-07-14 22:47:45,621 | Running workflow 'RubyBundlerBuilder'
2023-07-14 22:47:45,621 | Running RubyBundlerBuilder:CopySource
2023-07-14 22:47:45,622 | Creating target folders at /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-14 22:47:45,622 | Copying directory metadata from source (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda)
2023-07-14 22:47:45,623 | Copying source file (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src/function.rb) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda/function.rb)
2023-07-14 22:47:45,623 | Copying source file (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src/Gemfile) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda/Gemfile)
2023-07-14 22:47:45,624 | RubyBundlerBuilder:CopySource succeeded
2023-07-14 22:47:45,624 | Running RubyBundlerBuilder:RubyBundle
2023-07-14 22:47:45,625 | Running bundle install in /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-14 22:47:45,625 | executing Bundler: ['bundle', 'install', '--without', 'development', 'test']
2023-07-14 22:47:45,797 | RubyBundlerBuilder:RubyBundle failed
Traceback (most recent call last):
  File "aws_lambda_builders/workflows/ruby_bundler/actions.py", line 32, in execute
  File "aws_lambda_builders/workflows/ruby_bundler/bundler.py", line 69, in run
aws_lambda_builders.workflows.ruby_bundler.bundler.BundlerExecutionError: Bundler Failed:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "aws_lambda_builders/workflow.py", line 369, in run
  File "aws_lambda_builders/workflows/ruby_bundler/actions.py", line 34, in execute
aws_lambda_builders.actions.ActionFailedError: Bundler Failed:

Build Failed
2023-07-14 22:47:45,799 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2023-07-14 22:47:45,806 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2023-07-14 22:47:45,806 | Sending Telemetry: {'metrics': [{'commandRun': {'requestId': 'ca9c11e5-7ab1-4e79-8575-63a6c71ff055', 'installationId': '18afec76-7a49-4f25-9885-bf255430f395', 'sessionId': 'ca6a651a-06b2-46a3-9402-a03011339d2d', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.11.3', 'samcliVersion': '1.90.0', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam
build', 'metricSpecificAttributes': {'projectType': 'CFN', 'gitOrigin': None, 'projectName': '543d9497f10f7225629cacc4345571ccd668ebe34b812df09e57cbffc6b9233c', 'initialCommit': None}, 'duration': 263, 'exitReason': 'WorkflowFailedError', 'exitCode': 1}}]}
2023-07-14 22:47:45,806 | Unable to find Click Context for getting session_id.
2023-07-14 22:47:45,809 | Sending Telemetry: {'metrics': [{'events': {'requestId': 'a00b78a6-7ddc-4400-9f69-a21911e3139f', 'installationId': '18afec76-7a49-4f25-9885-bf255430f395', 'sessionId': 'ca6a651a-06b2-46a3-9402-a03011339d2d', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.11.3', 'samcliVersion': '1.90.0', 'metricSpecificAttributes': {'events': [{'event_name': 'BuildFunctionRuntime', 'event_value':
'ruby3.2', 'thread_id': 'dfbbaf0b781b41069b2d2667d95e530f', 'time_stamp': '2023-07-15 05:47:45.600', 'exception_name': None}, {'event_name': 'BuildWorkflowUsed', 'event_value': 'ruby-bundler', 'thread_id': 'a7b33168e1594e49a57a23e43f6fc74b', 'time_stamp': '2023-07-15 05:47:45.606', 'exception_name': None}]}}}]}
2023-07-14 22:47:45,882 | Telemetry response: 200
Error: RubyBundlerBuilder:RubyBundle - Bundler Failed:
2023-07-14 22:47:45,913 | Telemetry response: 200

Expected result:

build to succeed

Additional environment details

  1. OS: Arch
  2. sam --version: SAM CLI, version 1.90.0
  3. AWS region: us-east-1
{
  "version": "1.90.0",
  "system": {
    "python": "3.11.3",
    "os": "Linux-6.4.2-arch1-1-x86_64-with-glibc2.37"
  },
  "additional_dependencies": {
    "docker_engine": "24.0.2",
    "aws_cdk": "Not available",
    "terraform": "Not available"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}

Notes

  • The sample repo assumes that rbenv is installed since there is only an issue with ruby 3.2.x.
  • There is no issue with ruby versions <3.2. Tested/working with 2.7.2, 2.7.8, 3.0.3, 3.1.4. That is, the build succeeds.
@hirowatari hirowatari added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Jul 15, 2023
@hawflau hawflau added stage/bug-repro The issue/bug needs to be reproduced area/build sam build command and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Jul 18, 2023
@hawflau
Copy link
Contributor

hawflau commented Jul 18, 2023

@hirowatari I tried both sam build and sam build --use-container but couldn't reproduce the issue. Somehow the log you provided doesn't give very useful info. Can you try to run bundle install --without development test in your ruby code dir and check if there's any error? If there's any error, can you provide the log? Thanks!

@hirowatari
Copy link
Author

  • sam build --use-container succeeds
  • cd src; bundle install --without development test succeeds as well. Is there any way to get more information from sam about bundler is failing?
  • a few other details
$ bundler --version
Bundler version 2.4.10
$ ruby --version
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
$ gem -v
3.4.10

@hirowatari
Copy link
Author

Sorry for the bump, but could you perhaps give me any advice on how to further debug this? I looked at this for a long time today but couldn't get any further on debugging the issue.

@moelasmar
Copy link
Contributor

could you please share the logs of bundle install --without development test command in your side, and check the command return code.

Can you also try to upgrade gem to 3.4.17, and bundler to 2.4.17 to match the versions in the SAM Build image, as sam build --use-container works for you.

Last thing, could you do the following steps to give us more debugging logs:

cd /tmp
python3 -m venv .sam_bug
source .sam_bug/bin/activate
pip install aws-sam-cli

Then, update this file .sam_bug/lib/python3.8/site-packages/aws_lambda_builders/workflows/ruby_bundler/bundler.py and replace the line out, _ = p.communicate() to the following:

out, err = p.communicate()
print(f"bundler output stream: {out.decode("utf8")}")
print(f"bundler error stream: {err.decode("utf8")}")

Then, change directory to your project, and run sam build --debug command, and share the logs with us.

@moelasmar moelasmar added blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days labels Jul 26, 2023
@hirowatari
Copy link
Author

Thank you kindly for your attention to this

could you please share the logs of bundle install --without development test command in your side, and check the command return code.

$ cd src/
$ bundle install --without development test
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'development test'`, and stop using this flag
Using bundler 2.4.10
Using uri 0.12.2
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ echo $?
0

and here's the verbose output:

$ bundle install --verbose --without development test
Running `bundle install --verbose --without "development" "test"` with bundler 2.4.10
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'development test'`, and stop using this flag
Found no changes, using resolution from the lockfile
Using bundler 2.4.10
0:  bundler (2.4.10) from /home/kenton/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/specifications/default/bundler-2.4.10.gemspec
Using uri 0.12.2
0:  uri (0.12.2) from /home/kenton/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/specifications/uri-0.12.2.gemspec
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

changing the gem & bundler versions didn't change the output

$ bundler -v
Bundler version 2.4.17
$ gem -v
3.4.17
$ DEBUG=true sam build --debug
2023-07-26 20:16:27,648 | No config file found in this directory.
2023-07-26 20:16:27,650 | OSError occurred while reading TOML file: [Errno 2] No such file or directory: '/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/samconfig.toml'
2023-07-26 20:16:27,651 | Config file location: /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/samconfig.toml
2023-07-26 20:16:27,651 | Config file '/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/samconfig.toml' does not exist
2023-07-26 20:16:27,653 | Using SAM Template at /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml
2023-07-26 20:16:27,668 | Using config file: samconfig.toml, config environment: default
2023-07-26 20:16:27,669 | Expand command line arguments to:
2023-07-26 20:16:27,669 | --template_file=/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml --mount_with=READ --build_dir=.aws-sam/build --cache_dir=.aws-sam/cache
2023-07-26 20:16:27,705 | 'build' command is called
2023-07-26 20:16:27,707 | No Parameters detected in the template
2023-07-26 20:16:27,719 | There is no customer defined id or cdk path defined for resource Ruby32Lambda, so we will use the resource logical id as the resource id
2023-07-26 20:16:27,720 | 0 stacks found in the template
2023-07-26 20:16:27,720 | No Parameters detected in the template
2023-07-26 20:16:27,729 | There is no customer defined id or cdk path defined for resource Ruby32Lambda, so we will use the resource logical id as the resource id
2023-07-26 20:16:27,729 | 1 resources found in the stack
2023-07-26 20:16:27,730 | Found Serverless function with name='Ruby32Lambda' and CodeUri='src/'
2023-07-26 20:16:27,730 | --base-dir is not presented, adjusting uri src/ relative to /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml
2023-07-26 20:16:27,732 | 1 resources found in the stack
2023-07-26 20:16:27,732 | Found Serverless function with name='Ruby32Lambda' and CodeUri='src/'
2023-07-26 20:16:27,733 | Instantiating build definitions
2023-07-26 20:16:27,735 | Same function build definition found, adding function (Previous: BuildDefinition(ruby3.2, /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src, Zip, , 4cbee539-5af8-44c3-af71-d83ef954d83f, {}, {}, x86_64, []), Current: BuildDefinition(ruby3.2, /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src, Zip, , 8535938d-74a6-4a15-b9fa-6d6fc851b319, {}, {}, x86_64, []), Function:
Function(function_id='Ruby32Lambda', name='Ruby32Lambda', functionname='Ruby32Lambda', runtime='ruby3.2', memory=None, timeout=None, handler='function.handler', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src', environment=None, rolearn=None, layers=[], events=None, metadata={'SamResourceId': 'Ruby32Lambda'}, inlinecode=None, codesign_config_arn=None,
architectures=None, function_url_config=None, function_build_info=<FunctionBuildInfo.BuildableZip: ('BuildableZip', 'Regular ZIP function which can be build with SAM CLI')>, stack_path='', runtime_management_config=None))
2023-07-26 20:16:27,737 | Building codeuri: /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src runtime: ruby3.2 metadata: {} architecture: x86_64 functions: Ruby32Lambda
2023-07-26 20:16:27,738 | Building to following folder /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-26 20:16:27,739 | Loading workflow module 'aws_lambda_builders.workflows'
2023-07-26 20:16:27,740 | Registering workflow 'CustomMakeBuilder' with capability 'Capability(language='provided', dependency_manager=None, application_framework=None)'
2023-07-26 20:16:27,741 | Registering workflow 'DotnetCliPackageBuilder' with capability 'Capability(language='dotnet', dependency_manager='cli-package', application_framework=None)'
2023-07-26 20:16:27,742 | Registering workflow 'GoModulesBuilder' with capability 'Capability(language='go', dependency_manager='modules', application_framework=None)'
2023-07-26 20:16:27,744 | Registering workflow 'JavaGradleWorkflow' with capability 'Capability(language='java', dependency_manager='gradle', application_framework=None)'
2023-07-26 20:16:27,745 | Registering workflow 'JavaMavenWorkflow' with capability 'Capability(language='java', dependency_manager='maven', application_framework=None)'
2023-07-26 20:16:27,746 | Registering workflow 'NodejsNpmBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm', application_framework=None)'
2023-07-26 20:16:27,747 | Registering workflow 'NodejsNpmEsbuildBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm-esbuild', application_framework=None)'
2023-07-26 20:16:27,749 | Registering workflow 'PythonPipBuilder' with capability 'Capability(language='python', dependency_manager='pip', application_framework=None)'
2023-07-26 20:16:27,750 | Registering workflow 'RubyBundlerBuilder' with capability 'Capability(language='ruby', dependency_manager='bundler', application_framework=None)'
2023-07-26 20:16:27,751 | Registering workflow 'RustCargoLambdaBuilder' with capability 'Capability(language='rust', dependency_manager='cargo', application_framework=None)'
2023-07-26 20:16:27,752 | Found workflow 'RubyBundlerBuilder' to support capabilities 'Capability(language='ruby', dependency_manager='bundler', application_framework=None)'
2023-07-26 20:16:27,753 | Running workflow 'RubyBundlerBuilder'
2023-07-26 20:16:27,753 | Running RubyBundlerBuilder:CopySource
2023-07-26 20:16:27,754 | Creating target folders at /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-26 20:16:27,754 | Copying directory metadata from source (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda)
2023-07-26 20:16:27,755 | Copying source file (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src/function.rb) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda/function.rb)
2023-07-26 20:16:27,755 | Copying source file (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src/Gemfile) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda/Gemfile)
2023-07-26 20:16:27,756 | RubyBundlerBuilder:CopySource succeeded
2023-07-26 20:16:27,757 | Running RubyBundlerBuilder:RubyBundle
2023-07-26 20:16:27,757 | Running bundle install in /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-26 20:16:27,757 | executing Bundler: ['bundle', 'install', '--without', 'development', 'test']
2023-07-26 20:16:27,948 | RubyBundlerBuilder:RubyBundle failed
Traceback (most recent call last):
  File "aws_lambda_builders/workflows/ruby_bundler/actions.py", line 32, in execute
  File "aws_lambda_builders/workflows/ruby_bundler/bundler.py", line 69, in run
aws_lambda_builders.workflows.ruby_bundler.bundler.BundlerExecutionError: Bundler Failed: Running `bundle install --without "development" "test"` with bundler 2.4.17

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "aws_lambda_builders/workflow.py", line 369, in run
  File "aws_lambda_builders/workflows/ruby_bundler/actions.py", line 34, in execute
aws_lambda_builders.actions.ActionFailedError: Bundler Failed: Running `bundle install --without "development" "test"` with bundler 2.4.17

Build Failed
2023-07-26 20:16:27,951 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2023-07-26 20:16:27,958 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2023-07-26 20:16:27,958 | Sending Telemetry: {'metrics': [{'commandRun': {'requestId': 'b0934926-62e4-4fc0-9edb-88a8db88499c', 'installationId': '18afec76-7a49-4f25-9885-bf255430f395', 'sessionId': 'fe402d96-9ed1-4777-8069-c46398c58046', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.11.3', 'samcliVersion': '1.92.0', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam
build', 'metricSpecificAttributes': {'projectType': 'CFN', 'gitOrigin': None, 'projectName': '543d9497f10f7225629cacc4345571ccd668ebe34b812df09e57cbffc6b9233c', 'initialCommit': None}, 'duration': 282, 'exitReason': 'WorkflowFailedError', 'exitCode': 1}}]}
2023-07-26 20:16:27,958 | Unable to find Click Context for getting session_id.
2023-07-26 20:16:27,961 | Sending Telemetry: {'metrics': [{'events': {'requestId': 'b528ebc2-d0d5-4c27-9c56-496117ad395a', 'installationId': '18afec76-7a49-4f25-9885-bf255430f395', 'sessionId': 'fe402d96-9ed1-4777-8069-c46398c58046', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.11.3', 'samcliVersion': '1.92.0', 'metricSpecificAttributes': {'events': [{'event_name': 'SamConfigFileExtension', 'event_value':
'.toml', 'thread_id': '2ef10728be2f428bbc7870ec35a9d712', 'time_stamp': '2023-07-27 03:16:27.651', 'exception_name': None}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'ruby3.2', 'thread_id': '763b5a1798df4dc49707f98c6f2aeaae', 'time_stamp': '2023-07-27 03:16:27.733', 'exception_name': None}, {'event_name': 'BuildWorkflowUsed', 'event_value': 'ruby-bundler', 'thread_id': 'db99e0413ff34036a61197f8e313be4e',
'time_stamp': '2023-07-27 03:16:27.739', 'exception_name': None}]}}}]}
2023-07-26 20:16:28,030 | Telemetry response: 200
Error: RubyBundlerBuilder:RubyBundle - Bundler Failed: Running `bundle install --without "development" "test"` with bundler 2.4.17
2023-07-26 20:16:28,032 | Telemetry response: 200

Last thing could you...
Done but made a couple minor changes

  • the path was python3.11 not python3.8. I assume that fine
  • I got a syntax error until I replace
print(f"bundler output stream: {out.decode("utf8")}")
print(f"bundler error stream: {err.decode("utf8")}")

with

out, err = p.communicate()
print(f"bundler output stream: {out.decode('utf8')}")
print(f"bundler error stream: {err.decode('utf8')}")
]$ sam build --debug
2023-07-26 20:29:31,934 | No config file found in this directory.
2023-07-26 20:29:31,936 | OSError occurred while reading TOML file: [Errno 2] No such file or directory: '/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/samconfig.toml'
2023-07-26 20:29:31,937 | Config file location: /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/samconfig.toml
2023-07-26 20:29:31,938 | Config file '/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/samconfig.toml' does not exist
2023-07-26 20:29:31,939 | Using SAM Template at /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml
2023-07-26 20:29:31,950 | Using config file: samconfig.toml, config environment: default
2023-07-26 20:29:31,951 | Expand command line arguments to:
2023-07-26 20:29:31,951 | --template_file=/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml --mount_with=READ --build_dir=.aws-sam/build --cache_dir=.aws-sam/cache
2023-07-26 20:29:31,983 | 'build' command is called
2023-07-26 20:29:31,984 | No Parameters detected in the template
2023-07-26 20:29:31,994 | There is no customer defined id or cdk path defined for resource Ruby32Lambda, so we will use the resource logical id as the resource id
2023-07-26 20:29:31,995 | 0 stacks found in the template
2023-07-26 20:29:31,995 | No Parameters detected in the template
2023-07-26 20:29:32,002 | There is no customer defined id or cdk path defined for resource Ruby32Lambda, so we will use the resource logical id as the resource id
2023-07-26 20:29:32,003 | 1 resources found in the stack
2023-07-26 20:29:32,003 | Found Serverless function with name='Ruby32Lambda' and CodeUri='src/'
2023-07-26 20:29:32,004 | --base-dir is not presented, adjusting uri src/ relative to /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml
2023-07-26 20:29:32,005 | 1 resources found in the stack
2023-07-26 20:29:32,006 | Found Serverless function with name='Ruby32Lambda' and CodeUri='src/'
2023-07-26 20:29:32,006 | Instantiating build definitions
2023-07-26 20:29:32,008 | Same function build definition found, adding function (Previous: BuildDefinition(ruby3.2, /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src, Zip, , 4cbee539-5af8-44c3-af71-d83ef954d83f, {}, {}, x86_64, []), Current: BuildDefinition(ruby3.2, /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src, Zip, , 61c12f16-f096-46a6-ba30-4f285365c3a7, {}, {}, x86_64, []), Function:
Function(function_id='Ruby32Lambda', name='Ruby32Lambda', functionname='Ruby32Lambda', runtime='ruby3.2', memory=None, timeout=None, handler='function.handler', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src', environment=None, rolearn=None, layers=[], events=None, metadata={'SamResourceId': 'Ruby32Lambda'}, inlinecode=None, codesign_config_arn=None,
architectures=None, function_url_config=None, function_build_info=<FunctionBuildInfo.BuildableZip: ('BuildableZip', 'Regular ZIP function which can be build with SAM CLI')>, stack_path='', runtime_management_config=None))
2023-07-26 20:29:32,010 | Building codeuri: /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src runtime: ruby3.2 metadata: {} architecture: x86_64 functions: Ruby32Lambda
2023-07-26 20:29:32,011 | Building to following folder /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-26 20:29:32,011 | Loading workflow module 'aws_lambda_builders.workflows'
2023-07-26 20:29:32,012 | Registering workflow 'CustomMakeBuilder' with capability 'Capability(language='provided', dependency_manager=None, application_framework=None)'
2023-07-26 20:29:32,014 | Registering workflow 'DotnetCliPackageBuilder' with capability 'Capability(language='dotnet', dependency_manager='cli-package', application_framework=None)'
2023-07-26 20:29:32,015 | Registering workflow 'GoModulesBuilder' with capability 'Capability(language='go', dependency_manager='modules', application_framework=None)'
2023-07-26 20:29:32,016 | Registering workflow 'JavaGradleWorkflow' with capability 'Capability(language='java', dependency_manager='gradle', application_framework=None)'
2023-07-26 20:29:32,017 | Registering workflow 'JavaMavenWorkflow' with capability 'Capability(language='java', dependency_manager='maven', application_framework=None)'
2023-07-26 20:29:32,018 | Registering workflow 'NodejsNpmBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm', application_framework=None)'
2023-07-26 20:29:32,019 | Registering workflow 'NodejsNpmEsbuildBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm-esbuild', application_framework=None)'
2023-07-26 20:29:32,021 | Registering workflow 'PythonPipBuilder' with capability 'Capability(language='python', dependency_manager='pip', application_framework=None)'
2023-07-26 20:29:32,022 | Registering workflow 'RubyBundlerBuilder' with capability 'Capability(language='ruby', dependency_manager='bundler', application_framework=None)'
2023-07-26 20:29:32,023 | Registering workflow 'RustCargoLambdaBuilder' with capability 'Capability(language='rust', dependency_manager='cargo', application_framework=None)'
2023-07-26 20:29:32,023 | Found workflow 'RubyBundlerBuilder' to support capabilities 'Capability(language='ruby', dependency_manager='bundler', application_framework=None)'
2023-07-26 20:29:32,024 | Running workflow 'RubyBundlerBuilder'
2023-07-26 20:29:32,025 | Running RubyBundlerBuilder:CopySource
2023-07-26 20:29:32,025 | Creating target folders at /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-26 20:29:32,025 | Copying directory metadata from source (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda)
2023-07-26 20:29:32,026 | Copying source file (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src/function.rb) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda/function.rb)
2023-07-26 20:29:32,026 | Copying source file (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src/Gemfile) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda/Gemfile)
2023-07-26 20:29:32,027 | RubyBundlerBuilder:CopySource succeeded
2023-07-26 20:29:32,027 | Running RubyBundlerBuilder:RubyBundle
2023-07-26 20:29:32,028 | Running bundle install in /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-26 20:29:32,028 | executing Bundler: ['bundle', 'install', '--without', 'development', 'test']
bundler output stream: Fetching gem metadata from http://rubygems.org/.
Resolving dependencies...
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

bundler error stream: [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'development test'`, and stop using this flag

2023-07-26 20:29:32,632 | RubyBundlerBuilder:RubyBundle succeeded
2023-07-26 20:29:32,633 | Running RubyBundlerBuilder:RubyBundleDeployment
2023-07-26 20:29:32,633 | Running bundle install --deployment in /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-26 20:29:32,634 | executing Bundler: ['bundle', 'install', '--deployment', '--without', 'development', 'test']
bundler output stream: Fetching gem metadata from http://rubygems.org/.
Fetching uri 0.12.2
Installing uri 0.12.2
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Bundled gems are installed into `./vendor/bundle`

bundler error stream: [DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local deployment 'true'`, and stop using this flag
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'development test'`, and stop using this flag

2023-07-26 20:29:33,298 | RubyBundlerBuilder:RubyBundleDeployment succeeded
2023-07-26 20:29:33,299 | There is no customer defined id or cdk path defined for resource Ruby32Lambda, so we will use the resource logical id as the resource id
2023-07-26 20:29:33,299 | 1 resources found in the stack
2023-07-26 20:29:33,300 | Found Serverless function with name='Ruby32Lambda' and CodeUri='src/'

Build Succeeded

Built Artifacts  : .aws-sam/build
Built Template   : .aws-sam/build/template.yaml

Commands you can use next
=========================
[*] Validate SAM template: sam validate
[*] Invoke Function: sam local invoke
[*] Test Function in the Cloud: sam sync --stack-name {{stack-name}} --watch
[*] Deploy: sam deploy --guided
2023-07-26 20:29:33,302 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2023-07-26 20:29:33,309 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2023-07-26 20:29:33,309 | Sending Telemetry: {'metrics': [{'commandRun': {'requestId': '5a726674-fb44-410c-99b1-49d9fa3ec8f8', 'installationId': '18afec76-7a49-4f25-9885-bf255430f395', 'sessionId': '532661f3-929d-45d1-9be4-b9ac5f9b0adc', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.11.3', 'samcliVersion': '1.93.0', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam
build', 'metricSpecificAttributes': {'projectType': 'CFN', 'gitOrigin': None, 'projectName': '543d9497f10f7225629cacc4345571ccd668ebe34b812df09e57cbffc6b9233c', 'initialCommit': None}, 'duration': 1351, 'exitReason': 'success', 'exitCode': 0}}]}
2023-07-26 20:29:33,309 | Unable to find Click Context for getting session_id.
2023-07-26 20:29:33,311 | Sending Telemetry: {'metrics': [{'events': {'requestId': '1decff08-1111-4fd9-aa02-31155b0cc8e6', 'installationId': '18afec76-7a49-4f25-9885-bf255430f395', 'sessionId': '532661f3-929d-45d1-9be4-b9ac5f9b0adc', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.11.3', 'samcliVersion': '1.93.0', 'metricSpecificAttributes': {'events': [{'event_name': 'SamConfigFileExtension', 'event_value':
'.toml', 'thread_id': '67bb9bd5110645ff9e5b8531bcd92294', 'time_stamp': '2023-07-27 03:29:31.937', 'exception_name': None}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'ruby3.2', 'thread_id': 'a46074b176c744599597a44fd716b7dc', 'time_stamp': '2023-07-27 03:29:32.006', 'exception_name': None}, {'event_name': 'BuildWorkflowUsed', 'event_value': 'ruby-bundler', 'thread_id': '34a944ad903a400dadd9d30c401f0113',
'time_stamp': '2023-07-27 03:29:32.011', 'exception_name': None}]}}}]}
2023-07-26 20:29:33,389 | Telemetry response: 200
2023-07-26 20:29:33,414 | Telemetry response: 200

Woah, it worked 🥳.
It also worked when I removed those debugging lines.
Not sure what to make of that or how to fix this in my deployment env.

Is there any other info I can provide?

@moelasmar
Copy link
Contributor

actually I was looking for errors when you use SAM CLI that got installed using pip, to know if you have any environment setup issue, but it looks like no. We need to handle the without parameter deprecation, but I do not think that is the thing causing your problem, but to confirm can you downgrade your bundler version to 2.3.26 and test using the normal SAM CLI and share the output with us.

@moelasmar
Copy link
Contributor

could you please also upgrade to the latest SAM CLI to match the same version you used when you installed SAM CLI using pip.

@hirowatari
Copy link
Author

Thanks for your continued attention to this.
I've updated the versions to match what you requested, but I didn't have any joy.

$ bundler -v
Bundler version 2.3.26
$ gem -v # installed because it gives the default version of bundler that you requested
3.3.26 
$ sam --version
SAM CLI, version 1.93.0
$ sam build --debug
2023-07-29 07:16:24,680 | No config file found in this directory.
2023-07-29 07:16:24,683 | OSError occurred while reading TOML file: [Errno 2] No such file or directory: '/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/samconfig.toml'
2023-07-29 07:16:24,683 | Config file location: /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/samconfig.toml
2023-07-29 07:16:24,684 | Config file '/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/samconfig.toml' does not exist
2023-07-29 07:16:24,685 | Using SAM Template at /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml
2023-07-29 07:16:24,701 | Using config file: samconfig.toml, config environment: default
2023-07-29 07:16:24,702 | Expand command line arguments to:
2023-07-29 07:16:24,702 | --template_file=/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml --mount_with=READ --build_dir=.aws-sam/build --cache_dir=.aws-sam/cache
2023-07-29 07:16:24,740 | 'build' command is called
2023-07-29 07:16:24,742 | No Parameters detected in the template
2023-07-29 07:16:24,754 | There is no customer defined id or cdk path defined for resource Ruby32Lambda, so we will use the resource logical id as the resource id
2023-07-29 07:16:24,755 | 0 stacks found in the template
2023-07-29 07:16:24,755 | No Parameters detected in the template
2023-07-29 07:16:24,764 | There is no customer defined id or cdk path defined for resource Ruby32Lambda, so we will use the resource logical id as the resource id
2023-07-29 07:16:24,765 | 1 resources found in the stack
2023-07-29 07:16:24,765 | Found Serverless function with name='Ruby32Lambda' and CodeUri='src/'
2023-07-29 07:16:24,766 | --base-dir is not presented, adjusting uri src/ relative to /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/template.yml
2023-07-29 07:16:24,767 | 1 resources found in the stack
2023-07-29 07:16:24,768 | Found Serverless function with name='Ruby32Lambda' and CodeUri='src/'
2023-07-29 07:16:24,768 | Instantiating build definitions
2023-07-29 07:16:24,770 | Same function build definition found, adding function (Previous: BuildDefinition(ruby3.2, /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src, Zip, , 4cbee539-5af8-44c3-af71-d83ef954d83f, {}, {}, x86_64, []), Current: BuildDefinition(ruby3.2, /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src, Zip, , e6546b31-fda7-4a72-9614-146123c84a39, {}, {}, x86_64, []), Function:
Function(function_id='Ruby32Lambda', name='Ruby32Lambda', functionname='Ruby32Lambda', runtime='ruby3.2', memory=None, timeout=None, handler='function.handler', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src', environment=None, rolearn=None, layers=[], events=None, metadata={'SamResourceId': 'Ruby32Lambda'}, inlinecode=None, codesign_config_arn=None,
architectures=None, function_url_config=None, function_build_info=<FunctionBuildInfo.BuildableZip: ('BuildableZip', 'Regular ZIP function which can be build with SAM CLI')>, stack_path='', runtime_management_config=None))
2023-07-29 07:16:24,773 | Building codeuri: /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src runtime: ruby3.2 metadata: {} architecture: x86_64 functions: Ruby32Lambda
2023-07-29 07:16:24,774 | Building to following folder /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-29 07:16:24,774 | Loading workflow module 'aws_lambda_builders.workflows'
2023-07-29 07:16:24,775 | Registering workflow 'CustomMakeBuilder' with capability 'Capability(language='provided', dependency_manager=None, application_framework=None)'
2023-07-29 07:16:24,777 | Registering workflow 'DotnetCliPackageBuilder' with capability 'Capability(language='dotnet', dependency_manager='cli-package', application_framework=None)'
2023-07-29 07:16:24,778 | Registering workflow 'GoModulesBuilder' with capability 'Capability(language='go', dependency_manager='modules', application_framework=None)'
2023-07-29 07:16:24,779 | Registering workflow 'JavaGradleWorkflow' with capability 'Capability(language='java', dependency_manager='gradle', application_framework=None)'
2023-07-29 07:16:24,781 | Registering workflow 'JavaMavenWorkflow' with capability 'Capability(language='java', dependency_manager='maven', application_framework=None)'
2023-07-29 07:16:24,782 | Registering workflow 'NodejsNpmBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm', application_framework=None)'
2023-07-29 07:16:24,783 | Registering workflow 'NodejsNpmEsbuildBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm-esbuild', application_framework=None)'
2023-07-29 07:16:24,785 | Registering workflow 'PythonPipBuilder' with capability 'Capability(language='python', dependency_manager='pip', application_framework=None)'
2023-07-29 07:16:24,804 | Registering workflow 'RubyBundlerBuilder' with capability 'Capability(language='ruby', dependency_manager='bundler', application_framework=None)'
2023-07-29 07:16:24,805 | Registering workflow 'RustCargoLambdaBuilder' with capability 'Capability(language='rust', dependency_manager='cargo', application_framework=None)'
2023-07-29 07:16:24,806 | Found workflow 'RubyBundlerBuilder' to support capabilities 'Capability(language='ruby', dependency_manager='bundler', application_framework=None)'
2023-07-29 07:16:24,806 | Running workflow 'RubyBundlerBuilder'
2023-07-29 07:16:24,807 | Running RubyBundlerBuilder:CopySource
2023-07-29 07:16:24,807 | Creating target folders at /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-29 07:16:24,808 | Copying directory metadata from source (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda)
2023-07-29 07:16:24,809 | Copying source file (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src/function.rb) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda/function.rb)
2023-07-29 07:16:24,809 | Copying source file (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/src/Gemfile) to destination (/home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda/Gemfile)
2023-07-29 07:16:24,810 | RubyBundlerBuilder:CopySource succeeded
2023-07-29 07:16:24,810 | Running RubyBundlerBuilder:RubyBundle
2023-07-29 07:16:24,811 | Running bundle install in /home/kenton/hack/aws-sam-lambda-ruby322-bundler-error/.aws-sam/build/Ruby32Lambda
2023-07-29 07:16:24,811 | executing Bundler: ['bundle', 'install', '--without', 'development', 'test']
2023-07-29 07:16:24,962 | RubyBundlerBuilder:RubyBundle failed
Traceback (most recent call last):
  File "aws_lambda_builders/workflows/ruby_bundler/actions.py", line 32, in execute
  File "aws_lambda_builders/workflows/ruby_bundler/bundler.py", line 69, in run
aws_lambda_builders.workflows.ruby_bundler.bundler.BundlerExecutionError: Bundler Failed:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "aws_lambda_builders/workflow.py", line 369, in run
  File "aws_lambda_builders/workflows/ruby_bundler/actions.py", line 34, in execute
aws_lambda_builders.actions.ActionFailedError: Bundler Failed:

Build Failed
2023-07-29 07:16:24,964 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2023-07-29 07:16:24,972 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2023-07-29 07:16:24,972 | Sending Telemetry: {'metrics': [{'commandRun': {'requestId': '423cb6df-c54e-47b9-b1e0-cd453ea08d34', 'installationId': '18afec76-7a49-4f25-9885-bf255430f395', 'sessionId': '23a37420-05d9-4354-b232-98b7aa487ef8', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.11.3', 'samcliVersion': '1.93.0', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam
build', 'metricSpecificAttributes': {'projectType': 'CFN', 'gitOrigin': None, 'projectName': '543d9497f10f7225629cacc4345571ccd668ebe34b812df09e57cbffc6b9233c', 'initialCommit': None}, 'duration': 262, 'exitReason': 'WorkflowFailedError', 'exitCode': 1}}]}
2023-07-29 07:16:24,972 | Unable to find Click Context for getting session_id.
2023-07-29 07:16:24,976 | Sending Telemetry: {'metrics': [{'events': {'requestId': 'a77fb586-a124-4329-82c0-e4c8efcd0c14', 'installationId': '18afec76-7a49-4f25-9885-bf255430f395', 'sessionId': '23a37420-05d9-4354-b232-98b7aa487ef8', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.11.3', 'samcliVersion': '1.93.0', 'metricSpecificAttributes': {'events': [{'event_name': 'SamConfigFileExtension', 'event_value':
'.toml', 'thread_id': '855ee736708a4659b5799ec545fabf76', 'time_stamp': '2023-07-29 14:16:24.683', 'exception_name': None}, {'event_name': 'BuildFunctionRuntime', 'event_value': 'ruby3.2', 'thread_id': 'a2dd7dd69eab4ea79ffc29312b4660e1', 'time_stamp': '2023-07-29 14:16:24.768', 'exception_name': None}, {'event_name': 'BuildWorkflowUsed', 'event_value': 'ruby-bundler', 'thread_id': '7a9d0e10859947fd91d8967a15992610',
'time_stamp': '2023-07-29 14:16:24.774', 'exception_name': None}]}}}]}
2023-07-29 07:16:25,097 | Telemetry response: 200
Error: RubyBundlerBuilder:RubyBundle - Bundler Failed:
2023-07-29 07:16:25,100 | Telemetry response: 200

@moelasmar moelasmar removed blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days labels Aug 1, 2023
@moelasmar
Copy link
Contributor

thanks @hirowatari for the reply, could you please let us know how did you install SAM CLI in your environment?

@hirowatari
Copy link
Author

I used https://aur.archlinux.org/packages/aws-sam-cli-bin
Which runs this: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=aws-sam-cli-bin.

I'm using the pip install aws-sam-cli now. It works so I'm going to move forward with that for the time being.

Thank you kindly for the help.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build sam build command stage/bug-repro The issue/bug needs to be reproduced
Projects
None yet
Development

No branches or pull requests

3 participants