aws / aws/ec2-macos-utils

Add flag to suppress command errors

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
19
Forks
8
PR merge metrics
No merged PRs in 30d

Description

After adding ec2-macos-utils grow root container command to ec2-macos-init in https://github.com/aws/ec2-macos-init/commit/97875d5249a9b376d86cb263d2687c6dba03b38d, ec2-macos-init can be seen erroring on the new module when there isn't enough free space. For this case, it would be better to not error and return exit status 0 as the default EBS volume size for EC2 mac instances is 100GB with no available space to grow.

A new flag can be introduced to the CLI to suppress any error messages that might crop up due to a lack of available free space. This will allow ec2-macos-init to not log an expected failure case and continue without errors.

Example flag: `--ignore-errors`

Example usage:
```
ec2-macos-utils grow --id root --ignore-errors
```

Related issue - https://github.com/aws/ec2-macos-init/issues/41

Contributor guide

Open the contributing guide

Research direction

Start at the CLI entry point for the `grow` command and trace how the root container operation reports insufficient free space. Add the `--ignore-errors` behavior described in the example, then verify that this expected failure produces no error output and exits with status 0 while normal errors remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.