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

Adding EnableFaultInjection to task payload #4364

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

harishxr
Copy link
Contributor

@harishxr harishxr commented Sep 24, 2024

Summary

This pull request adds EnableFaultInjection to the task payload.

Implementation details

  • Introducing EnableFaultInjection into the task struct.
  • Sets the EnableFaultInjection field to true in the task struct when the corresponding AcsTask is not nil.

Testing

Ran the existing set of tests to verify the change to EnableFaultInjection

Description for the changelog

Adding EnableFaultInjection to task payload

Additional Information

Does this PR include breaking model changes? If so, Have you added transformation functions?

Does this PR include the addition of new environment variables in the README?

Licensing

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

@harishxr harishxr changed the title [WIP] Adding enableFaultInjection to task payload [WIP] Adding EnableFaultInjection to task payload Sep 25, 2024
@harishxr harishxr marked this pull request as ready for review September 25, 2024 19:56
@harishxr harishxr requested a review from a team as a code owner September 25, 2024 19:56
@harishxr harishxr changed the title [WIP] Adding EnableFaultInjection to task payload Adding EnableFaultInjection to task payload Sep 25, 2024
@@ -38,7 +38,7 @@ type TaskResponse struct {
EphemeralStorageMetrics *EphemeralStorageMetrics `json:"EphemeralStorageMetrics,omitempty"`
CredentialsID string `json:"-"`
TaskNetworkConfig *TaskNetworkConfig `json:"-"`
FaultInjectionEnabled bool `json:"-"`
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the current name is intentional.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Contributor

Choose a reason for hiding this comment

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

we have a change for this field in the feature branch

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we should add a comment either in the PR description or in the code denoting that EnabledFaultInjection within the Task struct of agent/api/task essentially relates/maps to FaultInjectionEnabled within the task response struct of ecs-agent/tmds/handlers/v4/state/

@harishxr harishxr force-pushed the fis-payload branch 2 times, most recently from 98dba89 to 553903c Compare September 25, 2024 21:04
agent/api/task/task.go Outdated Show resolved Hide resolved
@harishxr harishxr force-pushed the fis-payload branch 2 times, most recently from 19fad6a to 1d123a7 Compare September 25, 2024 22:51
@harishxr harishxr merged commit cb4bbf6 into aws:dev Sep 26, 2024
40 checks passed
mye956 pushed a commit to mye956/amazon-ecs-agent that referenced this pull request Oct 3, 2024
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.

5 participants