Skip to content

Add region to site and device metadata with automatic propagation - #35

Open
noursaidi wants to merge 1 commit into
masterfrom
add-region-to-metadata-17728302459280877011
Open

Add region to site and device metadata with automatic propagation#35
noursaidi wants to merge 1 commit into
masterfrom
add-region-to-metadata-17728302459280877011

Conversation

@noursaidi

Copy link
Copy Markdown
Owner

This change introduces a new region field to the UDMI metadata schemas. It is added as a top-level property in site_metadata.json and as a property within the location object in model_system.json (used for device metadata).

The Registrar has been updated to automatically propagate this region from the site metadata to any device that does not have its own region explicitly set. This ensures consistency across a site while allowing for per-device overrides.

Java classes were regenerated to include the new fields, and unit tests were added to LocalDeviceTest.java to verify that:

  1. A missing region in device metadata is correctly populated from site metadata.
  2. An existing region in device metadata is preserved and not overwritten.

PR created automatically by Jules for task 17728302459280877011 started by @noursaidi

- Update schema/site_metadata.json to include region.
- Update schema/model_system.json to include region under location.
- Regenerate Java schema classes.
- Update Registrar and LocalDevice to automatically copy region from site metadata to device metadata if unset during normalization.
- Add unit tests in LocalDeviceTest to verify the propagation logic.

Co-authored-by: noursaidi <9341216+noursaidi@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant