Skip to content

Conversation

@mirkoCrobu
Copy link
Contributor

@mirkoCrobu mirkoCrobu commented Oct 23, 2025

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}/bricks to 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 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 in main.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.

@per1234 per1234 added the enhancement New feature or request label Oct 24, 2025
@mirkoCrobu mirkoCrobu self-assigned this Oct 24, 2025
@mirkoCrobu mirkoCrobu requested a review from a team October 24, 2025 07:25
Copy link
Contributor

@dido18 dido18 left a comment

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
Copy link
Contributor Author

@dido18 I kept the same structure as BrickInstance.Variables for consistency. The only difference is the field default_value becoming value.
But yes, we can use the array that you suggested.
What do you think?

@CLAassistant
Copy link

CLAassistant commented Nov 3, 2025

CLA assistant check
All committers have signed the CLA.

@mirkoCrobu mirkoCrobu force-pushed the issue_809 branch 2 times, most recently from 14b14f1 to d43f0e5 Compare November 4, 2025 11:27
@mirkoCrobu mirkoCrobu requested a review from lucarin91 November 4, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants