-
Notifications
You must be signed in to change notification settings - Fork 98
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
Run Agones tests in CI #551
Conversation
This makes it such that on each PR, the Agones integration tests are run against the GKE + Agones cluster specified in ./agones/main.tf This includes: * Fix for main.tf to align release branch with Agones version. * Configure how long to wait before cleaning up past test namespaces. * Cleanup and optimisation of cloudbuild.yaml. Work on googleforgames#510
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only nits
@@ -16,35 +16,34 @@ steps: | |||
- name: gcr.io/cloud-builders/git | |||
args: [ submodule, update, --init, --recursive ] | |||
id: fetch-git-submodules | |||
waitFor: | |||
- "-" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment here explaining this. Maybe this is obvious to people who use cloudbuild, but it's not obvious to me compared to other usages of waitFor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent suggestion - will do.
agones/src/lib.rs
Outdated
let delay = env::var_os(DELETE_DELAY_SECONDS) | ||
.map(|value| chrono::Duration::seconds(value.into_string().unwrap().parse().unwrap())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: You don't need to use var_os
if you're converting to string anyway, and you can flatten the unwraps.
let delay = env::var_os(DELETE_DELAY_SECONDS) | |
.map(|value| chrono::Duration::seconds(value.into_string().unwrap().parse().unwrap())); | |
let delay = env::var(DELETE_DELAY_SECONDS) | |
.as_deref() | |
.ok() | |
.and_then(|s| i64::parse(s).ok()) | |
.map(chrono::Duration::seconds); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I swear I never saw env::var()
existing before. Totally missed that. Thank you!
GCP IAM permission on fail (which I expected but wasn't sure if we would hit). |
That took an hour - I should look at why. I think some of my optimisations in cloudbuild.yaml caused a bunch of redundant work to be done. I swore I tested this locally first, but I'll triple check things before merging. |
Ah! Found it. |
Build Succeeded 🥳 Build Id: 104f697e-da23-4050-95e6-fcdb4ddcd216 To build this version:
|
What type of PR is this?
/kind feature
What this PR does / Why we need it:
This makes it such that on each PR, the Agones integration tests are run
against the GKE + Agones cluster specified in ./agones/main.tf
This includes:
Which issue(s) this PR fixes:
Work on #510
Special notes for your reviewer: