Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(json-schema): align schema and config file names #5798

Merged

Conversation

ambroise-arm
Copy link
Contributor

@ambroise-arm ambroise-arm commented Dec 6, 2023

Description

The current paths of the schema/config files need to be changed slightly to account for a limitation in the current design where a package can't have more than one schema file (otherwise the CI fails). The update to the design is described in autowarefoundation/autoware-github-actions#232 (comment)

The schema files need to follow a NODE_NAME.schema.json naming convention and the configuration files need to follow a NODE_NAME*.param.yaml naming convention. It allows to have one schema file per node in a package.

Rename files that didn't match this pattern.

Related links

Align the autoware.universe codebase with #5289

After this PR is merged, autowarefoundation/autoware-github-actions#263 can be moved out of draft

This will probably unblock #4902

Tests performed

Verified the configurations files renamed were not referred to in other autoware.universe packages.

Only CI tests were run

Notes for reviewers

Interface changes

Changed the paths of some .schema.json and .param.yaml files.

Effects on system behavior

None

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) component:system System design and integration. (auto-assigned) labels Dec 6, 2023
@ambroise-arm ambroise-arm added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 6, 2023
@isamu-takagi
Copy link
Contributor

@ambroise-arm Different nodes may be created with partially matching names (e.g. my_node and my_node_tool). In this case, my_node.schema.json will check both my_node.param.yaml and my_node_tool.param.yaml.

So, I suggest using a slash that cannot be used in nodes as a separator. In other words, create a directory with the node name like below.

  • schema/my_node.schema.json
  • schema/my_node_tool.schema.json
  • config/my_node/setting1.param.yaml
  • config/my_node/setting2.param.yaml
  • config/my_node_tool/default.param.yaml

@ambroise-arm
Copy link
Contributor Author

Ah yes, indeed. I agree that it will not work if nodes have names that partially match. And your suggestion looks good to me. However, it would imply a change touching every single package in autoware.universe. I suppose it would need to be discussed and agreed first. I am not planning to do that in this PR.

I think the change I introduce here is strictly better than the current design, as it would allow to unblock #4902 while introducing no regression to the packages that have already implemented a schema file.

@isamu-takagi
Copy link
Contributor

@ambroise-arm OK. We will discuss the issue of partially matching names separately.

Copy link
Contributor

@isamu-takagi isamu-takagi left a comment

Choose a reason for hiding this comment

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

LGTM (mission_planner package)

@ambroise-arm
Copy link
Contributor Author

@miursh @scepter914 Please review when you have time

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4016c05) 15.25% compared to head (1bbb4f5) 15.25%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5798   +/-   ##
=======================================
  Coverage   15.25%   15.25%           
=======================================
  Files        1750     1750           
  Lines      120562   120562           
  Branches    36735    36735           
=======================================
  Hits        18390    18390           
  Misses      81543    81543           
  Partials    20629    20629           
Flag Coverage Δ *Carryforward flag
differential 18.38% <ø> (?)
total 15.25% <ø> (ø) Carriedforward from 4016c05

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@scepter914 scepter914 left a comment

Choose a reason for hiding this comment

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

LGTM (radar_object_fusion_to_detected_object)

The schema files need to follow a NODE_NAME.schema.json naming
convention and the configuration files need to follow a
NODE_NAME*.param.yaml naming convention. It allows to have one schema
file per node in a package.

Rename files that didn't match this pattern.

Signed-off-by: Ambroise Vincent <[email protected]>
@satoshi-ota satoshi-ota force-pushed the refactor-schema-paths branch from b5a15bb to 1bbb4f5 Compare December 26, 2023 23:57
@satoshi-ota satoshi-ota enabled auto-merge (squash) December 27, 2023 00:23
@satoshi-ota satoshi-ota merged commit 4e0503b into autowarefoundation:main Dec 27, 2023
28 of 31 checks passed
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 26, 2024
…undation#5798)

The schema files need to follow a NODE_NAME.schema.json naming
convention and the configuration files need to follow a
NODE_NAME*.param.yaml naming convention. It allows to have one schema
file per node in a package.

Rename files that didn't match this pattern.

Signed-off-by: Ambroise Vincent <[email protected]>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 2024
…undation#5798)

The schema files need to follow a NODE_NAME.schema.json naming
convention and the configuration files need to follow a
NODE_NAME*.param.yaml naming convention. It allows to have one schema
file per node in a package.

Rename files that didn't match this pattern.

Signed-off-by: Ambroise Vincent <[email protected]>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 2024
…undation#5798)

The schema files need to follow a NODE_NAME.schema.json naming
convention and the configuration files need to follow a
NODE_NAME*.param.yaml naming convention. It allows to have one schema
file per node in a package.

Rename files that didn't match this pattern.

Signed-off-by: Ambroise Vincent <[email protected]>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…undation#5798)

The schema files need to follow a NODE_NAME.schema.json naming
convention and the configuration files need to follow a
NODE_NAME*.param.yaml naming convention. It allows to have one schema
file per node in a package.

Rename files that didn't match this pattern.

Signed-off-by: Ambroise Vincent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) component:system System design and integration. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants