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

fix: gracefully handle logName on undefined Arn #99

Merged
merged 2 commits into from
Jul 13, 2022

Conversation

Canas
Copy link
Contributor

@Canas Canas commented Jul 10, 2022

*Issue #, if available: #98

Description of changes:
Apparently when triggering CodeBuild jobs we expected that the initial response to startBuild would include logs.cloudWatchLogsArn. Maybe AWS updated their APIs, but the matter of fact is that this is no longer the case and the Arn won't be available during the provisioning phase of the CodeBuild project instance. This means that everyone currently using this action is getting an Cannot read property 'split' of undefined when trying to grab the log group and log stream.

This PR adds a conditional check in case Arn is not available yet so it returns undefined log-group and log-stream. A test case was also added to validate the behavior.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

@rbusato-ts
Copy link

@josephvusich could you help us get this fix merged?

@subinataws subinataws merged commit 95cc38b into aws-actions:master Jul 13, 2022
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.

4 participants