Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtgrinevich committed Oct 7, 2024
1 parent fe11ed4 commit d9a4647
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions environment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ func (env *ExecutionEnvironment) ContainerOverrides() []*ecs.ContainerOverride {
override.MemoryReservation = &memory
}

// Env vars and command var are passed on task definition register phase for generic env due to:
// Task definition ovveride max symbols num constraint:
// InvalidParameterException: Container Overrides length must be at most 8192.
// When task definition register max symbols constraint is much higher:
// ClientException: Actual length: '117374'. Max allowed length is '65536' bytes.
// It is also possible because we always register new generic task definition before it starts
if env.Type != envtype.GENERIC {
override.Command = aws.StringSlice(container.Command)
env := []*ecs.KeyValuePair{}
Expand Down Expand Up @@ -184,6 +190,12 @@ func (env *ExecutionEnvironment) ContainerDefinitions() []*ecs.ContainerDefiniti
}
containerDefinition.PortMappings = portMappings

// Env vars and command var are passed on task definition register phase for generic env due to:
// Task definition ovveride max symbols num constraint:
// InvalidParameterException: Container Overrides length must be at most 8192.
// When task definition register max symbols constraint is much higher:
// ClientException: Actual length: '117374'. Max allowed length is '65536' bytes.
// It is also possible because we always register new generic task definition before it starts
if env.Type == envtype.GENERIC {
env := []*ecs.KeyValuePair{}
for k, v := range c.Env {
Expand Down

0 comments on commit d9a4647

Please sign in to comment.