Skip to content

Added LocalBrickRename action#341

Open
cmaglie wants to merge 2 commits intomainfrom
add_rename
Open

Added LocalBrickRename action#341
cmaglie wants to merge 2 commits intomainfrom
add_rename

Conversation

@cmaglie
Copy link
Copy Markdown
Member

@cmaglie cmaglie commented Apr 8, 2026

Motivation

Adds LocalBrickRename action.

Change description

Updates local Bricks Name (and consequently ID).
In case of errors, it tries to keep the system in a consistent state using deferred rollbacks.

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.

@Xayton Xayton linked an issue Apr 8, 2026 that may be closed by this pull request

// LocalBrickRename renames a local brick by changing its ID, folder name, and display name.
// The newID is derived from the newName by the caller (handler layer).
func (s *Service) LocalBrickRename(appCurrent *app.ArduinoApp, oldID, newID, newName string) (_ LocalBrickRenameResult, _err error) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would add unit tests for this

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.

localbrick(api): add the "rename" of a local brick

2 participants