Conversation
If the requested service is "ndt7" or "ndt7_client", then the Autojoin API should not return, for example, Wehe servers. Prometheus (well, gcp-service-discovery) queries the Autojoin API for script-exporter targets for ndt7 e2e testing. The list endpoint should not return machines running experiments that are not compatible with the requested service.
See the change in this commit to understand what the comment was added for, which may not have previously been obvious.
When a node registers with an IATA code that is not present in the ip2location airport dataset (e.g. a metropolitan code like MIL rather than an airport code like LIN), Register returns a 500 with error type "iata.find". This branch was the only 500 path in Register that emitted no server-side log, so the failure was invisible in AppEngine logs and could only be diagnosed by reading the code and inspecting request URLs. Add a log line capturing the offending iata code, org, and service so future occurrences are identifiable directly from the logs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a node registers with an IATA code that is not present in the ip2location airport dataset,
Registerreturns a 500 with error typeiata.find. This branch was the only 500 path inRegisterthat emitted no server-side log, so the failure was invisible in App Engine logs and could only be diagnosed by reading the code and inspecting raw request URLs.This adds a single log line capturing the offending IATA code, org, and service, so future occurrences are identifiable directly from the logs.
Motivation
A Milan autonode was switched from IATA
LIN(Milan-Linate airport) toMIL.MILis a valid IATA metropolitan code, but our dataset (ip2location-iata-icao.csv) is airport-keyed and contains no metropolitan codes, soiata.Find("mil")fails and the node gets a 500 on every registration attempt (observed: 323 consecutive 500s over ~14 days). Nothing appeared in App Engine logs because this error branch didn't log — diagnosing it required reading the handler source. TheType/Titlefields are returned to the client in the JSON body but never recorded server-side; this closes that observability gap.Change
Consistent with the existing
log.Println(...)calls in the same handler (dns register / tracker / service-account-key failures), with the IATA code, org, and service added so the log line is self-identifying.Testing
go build ./...passesgo test ./handler/ ./iata/passessandbox-kinkade(mlab-sandbox) green, including deploy🤖 Generated with Claude Code
This change is