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

bug-1894282: Support gcp stage in systemtest #1002

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions systemtest/test_content_length.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,23 @@ def test_content_length_1000(self, posturl, crash_generator, nginx):
with http_post(posturl, headers, payload) as resp:
status_code = resp.getcode()
except RemoteDisconnected:
# If there's an ELB and nginx times out waiting for the rest of the
# request, then we get an HTTP 504. If there's no ELB (we're
# connecting directly to nginx), then nginx just drops the
# connection and we get back a RemoteDisconnected error.
status_code = 504
# If there's no LB (we're connecting directly to nginx), then nginx
# may drop the connection and we get back a RemoteDisconnected error
status_code = None

# Verify we get an HTTP 504 because something timed out waiting for the
# Verify we get an error because something timed out waiting for the
# HTTP client (us) to send the rest of the data which is expected
# because we sent a bad content-length
assert status_code == 504
assert status_code in (
# without LB, nginx drops the connection
None,
Copy link
Contributor

Choose a reason for hiding this comment

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

What environment do we run the system tests in that doesn't have a load balancer, but does have nginx?

Copy link
Member Author

@relud relud Apr 30, 2024

Choose a reason for hiding this comment

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

when i have a spare moment: local dev and CI

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand what that means. Does that mean you wrote up a bug to change the local dev environment such that it includes nginx running in local dev?

Copy link
Member Author

@relud relud May 3, 2024

Choose a reason for hiding this comment

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

good point, i have filed a bug about it https://bugzilla.mozilla.org/show_bug.cgi?id=1894955

We should support nginx without a cloud load balancer for a future where that bug is implemented.

# with LB in GCP if nginx drops the connection we get 502, or if LB
# times out first we get 408. clients might not retry a 4XX error
# like they will a 5XX, so we don't accept a 408 here.
502,
# with LB in AWS if nginx drops the connection we get 504
504,
)

def test_content_length_non_int(self, posturl, crash_generator):
"""Post a crash with a content-length that isn't an int"""
Expand Down
7 changes: 6 additions & 1 deletion systemtest/test_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ case $1 in
# The host to submit to
export HOST=http://web:8000/
;;
"stage")
"stage" | "aws-stage")
export NGINX_TESTS=1
export POST_CHECK=0
export HOST=https://crash-reports.allizom.org/
;;
"gcp-stage")
export NGINX_TESTS=1
export POST_CHECK=0
export HOST=https://antenna-stage.socorro.nonprod.webservices.mozgcp.net/
;;
*)
echo "${USAGE}"
exit 1;
Expand Down