aws / aws/ec2-macos-init

Misleading error classification

Open
#43 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
167
Forks
21
Avg merge
58m
Merged PRs (30d)
1

Description

When userdata exits with an error, the error handling checks output and tries to classify the error to print out some helpful message (with content type).

This message is confusing when scripts themselves run into issues that "grok" as exec format errors (intended to help determine issues with the provided userdata script itself, not from errors in the userdata script's execution).

Concerned line:

https://github.com/aws/ec2-macos-init/blob/97875d5249a9b376d86cb263d2687c6dba03b38d/lib/ec2macosinit/userdata.go#L54

Instead, we should only print the helpful message when the *userdata* itself is found to be an unsuitable format.

Contributor guide

Open the contributing guide

Research direction

Start in lib/ec2macosinit/userdata.go at the classification logic around line 54. Trace how userdata execution errors are identified, then make the helpful message apply only when the userdata format itself is unsuitable. Verify the resulting behavior for both an invalid userdata format and a script that exits with an exec format error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, go, macos
Domain
cloud, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.