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

e2e: reload test #1683

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

Ronnie-personal
Copy link
Contributor

What type of PR is this? chore: add E2E reload test

What this PR does / why we need it: Define multiple HTTPRoute, TLSRoute. Restart Envoy gateway and check if Envoy proxy configurations change or not

Which issue(s) this PR fixes: #1503

Fixes #

Ronnie-personal and others added 5 commits July 15, 2023 17:24
Co-authored-by: tony-2023 <138949958+tony-2023@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
@Ronnie-personal Ronnie-personal requested a review from a team as a code owner July 20, 2023 01:00
@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #1683 (4e54a68) into main (9a2908d) will increase coverage by 0.13%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1683      +/-   ##
==========================================
+ Coverage   60.40%   60.54%   +0.13%     
==========================================
  Files          86       86              
  Lines       12737    12737              
==========================================
+ Hits         7694     7711      +17     
+ Misses       4545     4533      -12     
+ Partials      498      493       -5     

see 3 files with indirect coverage changes

@zirain zirain changed the title E2E Reload1503 e2e: reload test Jul 20, 2023
Co-authored-by: tony-2023 <138949958+tony-2023@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
fmt.Printf("Port forwarding started. Access the service locally at: localhost:%d\n", localPort)

// Perform an HTTP GET request to the forwarded port
resp, err := http.Get(fmt.Sprintf("http://localhost:%d/config_dump", localPort))
Copy link
Contributor

Choose a reason for hiding this comment

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

var numReloads = 5

for i := 0; i < numReloads; i++ {
// Step 2: Restart or reload the Envoy Gateway
Copy link
Contributor

Choose a reason for hiding this comment

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

can we run step2 and (step3 and step4) in an async way (in a go routine) to ensure that state while reloading doesnt change versus state after reloading doesnt change ?

@arkodg
Copy link
Contributor

arkodg commented Jul 20, 2023

hey @Ronnie-personal the PR is looking good, left some comments

Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
@Ronnie-personal
Copy link
Contributor Author

hey @Ronnie-personal the PR is looking good, left some comments

Thank you for the comments, I will check them out.

Thanks.

Ronnie-personal and others added 12 commits July 23, 2023 12:01
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
Co-authored-by: tony-2023 <138949958+tony-2023@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
Co-authored-by: tony-2023 <138949958+tony-2023@users.noreply.github.com>
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
@Ronnie-personal
Copy link
Contributor Author

@arkodg
The new e2e reload test passed.

But one existing e2e test TestE2E/RateLimitBasedJwtClaims failed, here is the log
https://github.com/envoyproxy/gateway/actions/runs/5651263931/job/15309249007?pr=1683#step:6:2966

I'm not sure it's an intermittent issue or not.

Could you help to assess?

Thanks.

@arkodg
Copy link
Contributor

arkodg commented Jul 25, 2023

/retest

@arkodg arkodg requested a review from Alice-Lilith July 25, 2023 21:13
@arkodg arkodg added this to the 0.5.0 milestone Jul 25, 2023

// Step 4: Compare the obtained `/config_dump` output with the initial configuration
// Define options for comparison
sortOpts := cmpopts.SortSlices(func(a, b interface{}) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we not comparing everything and why are we sorting ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It fails if we compare without sorting.
Cluster 'accesslog' and cluster 'tracing' are the two values in 'synamic_endpoint_configs' array. The contents are same, but the order is different.

Please find more detailed log at https://github.com/envoyproxy/gateway/actions/runs/5638125714/job/15272037648#step:6:4166
image

Copy link
Contributor

Choose a reason for hiding this comment

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

this might be because we are marshaling into a map, is there a need to do that, can't we just compare the o/p of /config_dump as a string ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure I will double check on that and run one more test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@arkodg
I would like to follow up on this comment if you don't mind. Please let me know if you have any other questions.

Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@arkodg
I would like to follow up once again. Please let me know if there is anything else I can do for this PR.

Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

hi @Ronnie-personal, we need to investigate to see why these values are changing

Copy link
Contributor Author

@Ronnie-personal Ronnie-personal Aug 16, 2023

Choose a reason for hiding this comment

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

hi @Ronnie-personal, we need to investigate to see why these values are changing

Thanks for the comment, I will think about it.
I guess this PR #1798 will fix the issue of values changing?

@arkodg arkodg modified the milestones: 0.5.0, 0.6.0-rc1 Aug 1, 2023
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale label Sep 19, 2023
@arkodg arkodg modified the milestones: 0.6.0-rc1, Backlog Oct 20, 2023
@github-actions github-actions bot removed the stale label Oct 21, 2023
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale label Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants