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

Fatal error vs. exit code 0 #1556

Closed
TWiStErRob opened this issue Feb 8, 2024 · 1 comment
Closed

Fatal error vs. exit code 0 #1556

TWiStErRob opened this issue Feb 8, 2024 · 1 comment

Comments

@TWiStErRob
Copy link

Go Version

Not sure, we're using https://github.com/newrelic/deployment-marker-action which has a Dockerfile.

Current behavior

We got a fatal error, but the exit code is 0.

Expected behavior

Somehow the error is propagated to the Workflow running the action.
https://github.com/newrelic/deployment-marker-action/blob/main/entrypoint.sh seems to do its part.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create a deployment with a very long changelog via https://github.com/newrelic/newrelic-cli/blob/main/docs/cli/newrelic_entity_deployment_create.md

Debug Output (if applicable)

(Look for bold text. ... was used to redact.)

/usr/bin/docker run --name ... --label ... --workdir /github/workspace --rm -e "INPUT_APIKEY" -e "INPUT_GUID" -e "INPUT_VERSION" -e "INPUT_COMMIT" -e "INPUT_DESCRIPTION" -e "INPUT_DEEPLINK" -e "INPUT_CHANGELOG" -e "INPUT_DEPLOYMENTTYPE" -e "INPUT_REGION" -e "INPUT_USER" -e "INPUT_GROUPID" -e "NEW_RELIC_API_KEY" -e "NEW_RELIC_DEPLOYMENT_ENTITY_GUID" -e "NEW_RELIC_REGION" -e "NEW_RELIC_DEPLOYMENT_USER" -e "NEW_RELIC_DEPLOYMENT_VERSION" -e "NEW_RELIC_DEPLOYMENT_CHANGE_LOG" -e "NEW_RELIC_DEPLOYMENT_COMMIT" -e "NEW_RELIC_DEPLOYMENT_DESCRIPTION" -e "NEW_RELIC_DEPLOYMENT_DEEPLINK" -e "NEW_RELIC_DEPLOYMENT_TYPE" -e "NEW_RELIC_DEPLOYMENT_GROUP_ID" -e "NEW_RELIC_SERVICE_NAME" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_DEBUG" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/repo-name/repo-name":"/github/workspace" ...:...
level=fatal msg="maximum retries reached: Exception while fetching data (/createDeployment) : The following field(s) contain more than the 4096 max allowed characters: 'changelog'. Please remove the validationFlags within dataHandlingRules if you want us to automatically truncate your data."
##[debug]Docker Action run completed with exit code 0
##[debug]deploymentId=''

Additional Context

We narrowed it down via Dockerfile and entrypoint.sh that this CLI is the actual one returning 0.
We haven't tried directly calling the CLI, but it looks like the problem is here.

References or Related Issues

N/A

@TWiStErRob
Copy link
Author

TWiStErRob commented Feb 8, 2024

Ooops, we were using an older version of the action but was looking at main code. This was fixed at newrelic/deployment-marker-action@98d7dd4#diff-6f9d41d046756f0ddc2fcee0626bdb50100d12b88f293734eff742818e03efa2R16 (ref newrelic/deployment-marker-action#54)

@TWiStErRob TWiStErRob closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2024
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

No branches or pull requests

1 participant