Skip to content

feat: Switch from 'country' to 'location'#421

Merged
jedevc merged 1 commit into
prod-stagingfrom
craciunoiuc/country-to-iata
Jul 24, 2026
Merged

feat: Switch from 'country' to 'location'#421
jedevc merged 1 commit into
prod-stagingfrom
craciunoiuc/country-to-iata

Conversation

@craciunoiuc

@craciunoiuc craciunoiuc commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Use the 'x/iata' package for this.

Closes: TOOL-1150

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 country with location across 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.

Comment thread internal/config/profile.go

@jedevc jedevc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, but this is a breaking change, so let's mark with !

Comment thread internal/integration/config.go Outdated
Use the 'x/iata' package for this.

Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
@craciunoiuc
craciunoiuc force-pushed the craciunoiuc/country-to-iata branch from 6f09865 to d985dc0 Compare July 24, 2026 07:25
@craciunoiuc
craciunoiuc requested a review from jedevc July 24, 2026 07:34

@jedevc jedevc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed-by: Justin Chadwell <justin@unikraft.com>
Approved-by: Justin Chadwell <justin@unikraft.com>

@jedevc
jedevc merged commit f22da9f into prod-staging Jul 24, 2026
14 checks passed
@jedevc
jedevc deleted the craciunoiuc/country-to-iata branch July 24, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants