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

Improve AWS Chaos #4085

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

miketonks-form3
Copy link
Contributor

@miketonks-form3 miketonks-form3 commented Jun 16, 2023

What problem does this PR solve?

Extends the ASWChaos type to allow selecting instances using filters.

Work towards: #4082

What's changed and how it works?

Proposal: RFC: Improve Cloud Chaos Providers

Related changes

  • This change also requires further updates to the website (e.g. docs)
  • This change also requires further updates to the UI interface

Cherry-pick to release branches (optional)

This PR should be cherry-picked to the following release branches:

  • release-2.6
  • release-2.5

Checklist

CHANGELOG

Must include at least one of them.

  • I have updated the CHANGELOG.md
  • I have labeled this PR with "no-need-update-changelog"

Tests

Must include at least one of them.

  • Unit test
  • E2E test
  • Manual test

Side effects

  • Breaking backward compatibility

DCO

If you find the DCO check fails, please run commands like below (Depends on the actual situations. For example, if the failed commit isn't the most recent) to fix it:

git commit --amend --signoff
git push --force

})))
}

// TODO How to get namespace for secret??
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could use some help here. I can't see how to get the namespace in the selector module.

It seems like the pod selector must do this, but I couldn't really follow the code.

Copy link
Member

Choose a reason for hiding this comment

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

we assume that the secret is in the same namespace with the AWSChaos, so we could use the namespace of AWSChaos.

Is it OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it seems to be good 👍

type SelectImpl struct {
c client.Client
generic.Option
}

func (impl *SelectImpl) Select(ctx context.Context, awsSelector *v1alpha1.AWSSelector) ([]*v1alpha1.AWSSelector, error) {
Copy link
Member

Choose a reason for hiding this comment

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

It seems that we could use an other type instead of []*v1alpha1.AWSSelector in the return value as the "selected records". v1alpha1.AWSSelector carries too much noise info that we do not need in the next steps.

How about creating a new struct to introduce the selected ec2 or volume info?

also cc @cwen0 @YangKeao

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree it's better. I added aws.Instance struct type for this. Thanks!

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Attention: Patch coverage is 43.92523% with 60 lines in your changes missing coverage. Please review.

Project coverage is 38.72%. Comparing base (f4a070b) to head (d43214d).
Report is 22 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4085      +/-   ##
==========================================
+ Coverage   38.68%   38.72%   +0.03%     
==========================================
  Files         169      170       +1     
  Lines       13950    14057     +107     
==========================================
+ Hits         5397     5443      +46     
- Misses       8105     8163      +58     
- Partials      448      451       +3     
Files Coverage Δ
api/v1alpha1/awschaos_types.go 0.00% <ø> (ø)
pkg/selector/aws/selector.go 43.92% <43.92%> (ø)

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a13bfc8...d43214d. Read the comment docs.

@miketonks-form3
Copy link
Contributor Author

Fixed a few small issues, we are now running the build on our CI and everything is passing. Could someone take a look at this?

@STRRL STRRL assigned STRRL and cwen0 Jul 25, 2023
@chaotic-prow
Copy link

chaotic-prow bot commented Aug 29, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from cwen0. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kenneth-buck-form3 kenneth-buck-form3 force-pushed the mike-aws-chaos branch 2 times, most recently from 7d1ad74 to 6e47a78 Compare August 29, 2023 19:15
@kenneth-buck-form3
Copy link

Hello, I am one of the people that is picking up this PR to help see it through. I updated the branch and fixed any missing signed-by commits. Is there anything else that I can do in order to help land this in master? Thank you in advance :)

@g1eny0ung g1eny0ung added chaos/aws type/enhancement Request for an improvement. labels Sep 5, 2023
@g1eny0ung
Copy link
Member

Hello, I am one of the people that is picking up this PR to help see it through. I updated the branch and fixed any missing signed-by commits. Is there anything else that I can do in order to help land this in master? Thank you in advance :)

Hi @kenneth-buck-form3, thank you very much for your work! We are going to go review the recent changes this week (Possibly at the weekend).

@miketonks-form3
Copy link
Contributor Author

Hi, this PR is quite old now. I have updated it with latest changes. Are we still waiting for a review @g1eny0ung ?

I'm not sure why the tests failed on previous run, I think it may be unrelated to my changes. Hoping that it will pass with latest updates from master.

miketonks-form3 and others added 2 commits February 2, 2024 09:43
Signed-off-by: Mike Tonks <michael.tonks@form3.tech>
Signed-off-by: Kenneth Buck <kenneth.buck@form3.tech>
Signed-off-by: Graham Brereton <graham.brereton@form3.tech>
@tanguyfalconnet
Copy link

👋 Any news about it ? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chaos/aws type/enhancement Request for an improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants