Skip to content

function does not render on Mac #46

@stevendborrelli

Description

@stevendborrelli

Bug Report

What happened?

Run crossplane render on a Mac fails with a signal: trace/breakpoint trap error.

$ crossplane render xr.yaml composition.yaml functions-remote.yaml  --extra-resources=ProviderConfig.yaml
crossplane: error: cannot render composite resource: pipeline step "shell" returned a fatal result: shellCmd ASSUME_ROLE_OUTPUT=$(aws sts assume-role --role-arn $AWS_ASSUME_ROLE_ARN --role-session-name "function-shell")
                   export AWS_ACCESS_KEY_ID=$(echo $ASSUME_ROLE_OUTPUT | grep -o '"AccessKeyId": "[^"]*"' | cut -d'"' -f4)
                   export AWS_SECRET_ACCESS_KEY=$(echo $ASSUME_ROLE_OUTPUT | grep -o '"SecretAccessKey": "[^"]*"' | cut -d'"' -f4)
                   export AWS_SESSION_TOKEN=$(echo $ASSUME_ROLE_OUTPUT | grep -o '"SessionToken": "[^"]*"' | cut -d'"' -f4)
                   aws iam list-roles | jq -r '.Roles[] .Arn'
                    for XR failed: signal: trace/breakpoint trap

Local builds on a Mac do not display the same problem.

How can we reproduce it?

Render the aws example with the marketplace image in functions.yaml:

apiVersion: pkg.crossplane.io/v1beta1
kind: Function
metadata:
  name: function-shell
#  annotations:
#    # This tells crossplane beta render to connect to the function locally.
#    render.crossplane.io/runtime: Development
spec:
  # This is ignored when using the Development runtime.
  package: xpkg.upbound.io/crossplane-contrib/function-shell:v0.3.0
---
apiVersion: pkg.crossplane.io/v1beta1
kind: Function
metadata:
  name: function-extra-resources
spec:
  package: xpkg.upbound.io/crossplane-contrib/function-extra-resources:v0.0.3

What environment did it happen in?

Function version: v0.3.0
Crossplane CLI: v1.18.0, v1.19.1
Docker Desktop 4.41.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions