Skip to content

Conversation

0xaravindh
Copy link
Member

@0xaravindh 0xaravindh commented Jul 2, 2025

What type of PR is this?

Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking

/kind bug

/kind cleanup
/kind documentation
/kind feature
/kind hotfix
/kind release

What this PR does / Why we need it:

Fix Stackdriver metrics test by mocking GCE metadata server

Which issue(s) this PR fixes:

Closes #4212

Special notes for your reviewer:

@github-actions github-actions bot added kind/bug These are bugs. size/S labels Jul 2, 2025
@0xaravindh 0xaravindh requested review from markmandel and igooch July 2, 2025 09:42
@0xaravindh 0xaravindh changed the title Mock stackdriver metrics registration to prevent local test failure Mocked GCE metadata to fix the Stackdriver local test failure Jul 2, 2025
@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 2f97232d-0403-4b6c-9155-aa4529a8fe81

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: bd47cb7a-d980-4e6b-944f-d6166be50bab

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4215/head:pr_4215 && git checkout pr_4215
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.51.0-dev-885d017

Copy link
Collaborator

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

I think this is the best options - the only other option I came up with was to have a Fatal handler on Logrus:
https://github.com/sirupsen/logrus?tab=readme-ov-file#fatal-handlers

But since we're testing for "NoPanic", probably better to mock the metadata service.

@igooch I'm approving, but checking if you any have any objections?

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: f7ae95fc-346b-4f6f-abbd-ffa35cfbc813

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4215/head:pr_4215 && git checkout pr_4215
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.51.0-dev-887a8c3

@markmandel markmandel merged commit dde76a9 into googleforgames:main Jul 8, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug These are bugs. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test: TestSetupMetrics_StackdriverOnly_NoPanic fails when running locally
3 participants