feat: Switch from 'country' to 'location'#421
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the CLI’s metro configuration and presentation to use an IATA-based location field instead of country, aligning metro metadata with the unikraft.com/x/iata package and propagating the rename through config parsing, CLI resources, tests, and CI.
Changes:
- Replace metro
countrywithlocationacross config models and CLI resource output. - Normalize metro IATA codes when fetching metros from the control plane using
unikraft.com/x/iata. - Update unit/golden help fixtures and GitHub Actions integration config to use
location.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/multimetro/client.go | Switches fetched metro metadata to populate Location and normalizes via x/iata. |
| internal/integration/config.go | Updates integration config shaping to set Metro.Location. |
| internal/config/profile.go | Renames the persisted metro field from Country to Location in the profile schema. |
| internal/config/config_test.go | Adds coverage around parsing location, missing location, and legacy country behavior. |
| internal/cmd/metros.go | Updates the metro resource fields/output to expose location instead of country. |
| go.mod | Adds dependency on unikraft.com/x/iata. |
| go.sum | Adds checksums for unikraft.com/x/iata. |
| cmd/unikraft/testdata/TestHelp/config | Updates golden help output field list from country to location. |
| cmd/unikraft/testdata/TestHelp/auth | Updates golden help output field list from country to location. |
| .github/workflows/test.yaml | Updates generated integration config snippets to use location. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jedevc
reviewed
Jul 23, 2026
jedevc
left a comment
Member
There was a problem hiding this comment.
LGTM, but this is a breaking change, so let's mark with !
Use the 'x/iata' package for this. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
craciunoiuc
force-pushed
the
craciunoiuc/country-to-iata
branch
from
July 24, 2026 07:25
6f09865 to
d985dc0
Compare
jedevc
approved these changes
Jul 24, 2026
jedevc
left a comment
Member
There was a problem hiding this comment.
Reviewed-by: Justin Chadwell <justin@unikraft.com>
Approved-by: Justin Chadwell <justin@unikraft.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.
Use the 'x/iata' package for this.
Closes: TOOL-1150