Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(api): return variable configurations in/apps/:id/bricks andapps/:id/bricks/:id#18

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mirkoCrobu merged 12 commits intomainfromissue_809
Nov 6, 2025

Conversation

@mirkoCrobu
Copy link
Contributor

@mirkoCrobumirkoCrobu commentedOct 23, 2025
edited by dido18
Loading

Motivation

To complete the new flow “RUN an app with mandatory configuration”, the mandatory bricks variables should be set before running the app.

Currently, the App Lab to retrieve a mandatory app from an app must do the following:

  • call/v1/apps/{appID}/bricksto list all the instance bricks for the current app(it doesn’t return the bricks variables information)
  • For each brickInstance, it has to call the/v1/apps/{appID}/bricks/{brickID} to check brickInstance variables current value(the response does not contain information about the mandatory requirement of a variable, but just the value).
  • For each brick instance, it has to call the/v1/bricks/{brickID} to check which variable is mandatory.

This set of calls is tedious and inefficient.

Change description

Integrate the/v1/apps/{appID}/bricks/{brickID} and/v1/apps/{appID}/bricks , adding for each brickInstance theconfig_variables array with the list of variables with their complete information.

Additional Notes

Reviewer checklist

  • PR addresses a single concern.
  • PR title and description are properly filled.
  • Changes will be merged inmain.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.

@per1234per1234 added the enhancementNew feature or request labelOct 24, 2025
@mirkoCrobumirkoCrobu self-assigned thisOct 24, 2025
@mirkoCrobumirkoCrobu requested a review froma teamOctober 24, 2025 07:25
Copy link
Contributor

@dido18dido18 left a comment
edited
Loading

Choose a reason for hiding this comment

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

Why not using a list of variables like this instead of the object with the name of the variable as key?

"variables":[    {     "name: "CUSTOM_MODEL_PATH",      "default_value": "/home/arduino/.arduino-bricks/ei-models",      "description": "path to the custom model directory",      "required": false    },    {    "name" "EI_CLASSIFICATION_MODEL",     "default_value": "/models/ootb/ei/mobilenet-v2-224px.eim",      "description": "path to the model file",      "required": false    }  ],

mirkoCrobu reacted with thumbs up emoji
@mirkoCrobu
Copy link
ContributorAuthor

@dido18 I kept the same structure asBrickInstance.Variables for consistency. The only difference is the fielddefault_valuebecomingvalue.
But yes, we can use the array that you suggested.
What do you think?

@CLAassistant
Copy link

CLAassistant commentedNov 3, 2025
edited
Loading

CLA assistant check
All committers have signed the CLA.

@mirkoCrobumirkoCrobuforce-pushed theissue_809 branch 3 times, most recently fromd43f0e5 to1c1fc7eCompareNovember 4, 2025 11:31
@mirkoCrobumirkoCrobu requested review froma team andlucarin91November 4, 2025 13:13
Copy link
Contributor

@dido18dido18 left a comment

Choose a reason for hiding this comment

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

LGTM.

Could you add an example of the new json respone in the PR description ?

Thanks

mirkoCrobu reacted with thumbs up emoji
@mirkoCrobu
Copy link
ContributorAuthor

mirkoCrobu commentedNov 6, 2025
edited
Loading

GEThttp://localhost:8080/v1/apps/ZXhhbXBsZXM6aW1hZ2UtY2xhc3NpZmljYXRpb24/bricks

{    "bricks": [        {            "id": "arduino:web_ui",            "name": "WebUI - HTML",            "author": "Arduino",            "category": "ui",            "status": "installed"        },        {            "id": "arduino:image_classification",            "name": "Image Classification",            "author": "Arduino",            "category": "video",            "status": "installed",            "variables": {                "CUSTOM_MODEL_PATH": "overidden",                "EI_CLASSIFICATION_MODEL": "/models/ootb/ei/mobilenet-v2-224px.eim"            },            "config_variables": [                {                    "name": "CUSTOM_MODEL_PATH",                    "value": "overidden",                    "description": "path to the custom model directory",                    "required": false                },                {                    "name": "EI_CLASSIFICATION_MODEL",                    "value": "/models/ootb/ei/mobilenet-v2-224px.eim",                    "description": "path to the model file",                    "required": false                }            ]        }    ]}

@mirkoCrobu
Copy link
ContributorAuthor

mirkoCrobu commentedNov 6, 2025
edited
Loading

GEThttp://localhost:8080/v1/apps/ZXhhbXBsZXM6aW1hZ2UtY2xhc3NpZmljYXRpb24/bricks/arduino:image_classification

{    "id": "arduino:image_classification",    "name": "Image Classification",    "author": "Arduino",    "category": "video",    "status": "installed",    "variables": {        "CUSTOM_MODEL_PATH": "overidden",        "EI_CLASSIFICATION_MODEL": "/models/ootb/ei/mobilenet-v2-224px.eim"    },    "config_variables": [        {            "name": "CUSTOM_MODEL_PATH",            "value": "overidden",            "description": "path to the custom model directory",            "required": false        },        {            "name": "EI_CLASSIFICATION_MODEL",            "value": "/models/ootb/ei/mobilenet-v2-224px.eim",            "description": "path to the model file",            "required": false        }    ],    "model": "mobilenet-image-classification"}

@dido18dido18 changed the titleIntegrate bricks details endpoint with variables informationfeat(api): return variable configurations in/apps/:id/bricks andapps/{appID}/bricks/:idNov 6, 2025
@dido18dido18 changed the titlefeat(api): return variable configurations in/apps/:id/bricks andapps/{appID}/bricks/:idfeat(api): return variable configurations in/apps/:id/bricks andapps/:id/bricks/:idNov 6, 2025
Copy link
Contributor

@dido18dido18 left a comment
edited
Loading

Choose a reason for hiding this comment

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

LGTM

mirkoCrobu reacted with heart emoji
@mirkoCrobumirkoCrobu merged commitc64fbf6 intomainNov 6, 2025
6 checks passed
@mirkoCrobumirkoCrobu deleted the issue_809 branchNovember 6, 2025 15:55
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lucarin91lucarin91lucarin91 approved these changes

@dido18dido18dido18 approved these changes

Assignees

@mirkoCrobumirkoCrobu

Labels

enhancementNew feature or request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@mirkoCrobu@CLAassistant@lucarin91@dido18@per1234

[8]ページ先頭

©2009-2025 Movatter.jp