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

Config: Do not compute endpoint; make region fatal #81

Merged
merged 2 commits into from
May 20, 2015

Conversation

euank
Copy link
Contributor

@euank euank commented May 19, 2015

The SDK can handle setting the endpoint better than the Config code did;
the endpoint behavior before was a legacy from a time with no SDK.

The specific issue was that the endpoint would be set incorrectly if the
ec2 metadata service did not return any value.

In line with this, if no region can be determined it now is a fatal
error.

Possibly relates to #74, though I'm not certain.

r? @samuelkarp

The SDK can handle setting the endpoint better than the Config code did;
the endpoint behavior before was a legacy of a time with no sdk.

The specific issue was that the endpoint would be set incorrectly if the
ec2 metadata service did not return any value.

In line with this, if no region can be determined it now is a fatal
error.

Relates to aws#74
if *versionFlag {
versionableEngine := engine.NewTaskEngine(cfg)
version.PrintVersion(versionableEngine)
return exitcodes.ExitSuccess
}

if err != nil {
log.Criticalf("Error loading config: %v", err)
return exitcodes.ExitTerminal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a distinction between retry-able config errors (can't read from metadata service because it's not up yet) versus total failures (cannot parse)? Your only fatal one right now is AWSRegion which can potentially be retry-able.

@euank
Copy link
Contributor Author

euank commented May 20, 2015

@samuelkarp Addressed your comments.

@samuelkarp
Copy link
Contributor

👍

euank added a commit that referenced this pull request May 20, 2015
Config: Do not compute endpoint; make region fatal
@euank euank merged commit 2551337 into aws:dev May 20, 2015
danehlim pushed a commit to danehlim/amazon-ecs-agent that referenced this pull request Oct 26, 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.

None yet

2 participants