Skip to content

Conversation

@gmulz
Copy link
Member

@gmulz gmulz commented Dec 18, 2025

updates the reload command to set the organization for the package to be the primary organization of the part, instead of the module's owner org. this allows us to reload modules that do not belong to our own org, if we have the source code for it

APP PR redefining permissions on the cloud (prereq to merge): https://github.com/viamrobotics/app/pull/10599

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Dec 18, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Dec 18, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Dec 18, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Dec 18, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Dec 18, 2025
@gmulz gmulz changed the title get org from part for reload [APP-14739] get org from part for reload Dec 18, 2025
@gmulz gmulz marked this pull request as ready for review December 18, 2025 21:36
return nil, err
}

id := ctx.String(generalFlagID)
Copy link
Member Author

Choose a reason for hiding this comment

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

for reload this didn't seem to be initialized ever, so it was always defaulting to "" and so would always get set to the module id. figured we'd just make it explicitly ModuleID in the moduleCloudBuildInfo

Copy link
Member

Choose a reason for hiding this comment

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

this logic got leftover after a refactor I think, thanks for catching!

@gmulz gmulz requested a review from abe-winter December 19, 2025 03:48
Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

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

Generally looks reasonable to me! Though I haven't tested. i assume you did test to ensure that reload still works as expected?

return nil, err
}

id := ctx.String(generalFlagID)
Copy link
Member

Choose a reason for hiding this comment

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

this logic got leftover after a refactor I think, thanks for catching!

Copy link
Member

@michaellee1019 michaellee1019 left a comment

Choose a reason for hiding this comment

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

The RDK changes LGTM. Lets discuss more of the backend changes, which need to go first, before merging this in.

Also would recommend changing the gRPC API to get the primary org instead of compensating for it on the frontend.

Comment on lines +803 to +813
// module org
var orgID string
for _, org := range location.Location.Organizations {
if org.Primary {
orgID = org.GetOrganizationId()
break
}
}
if orgID == "" {
orgID = location.Location.Organizations[0].GetOrganizationId()
}
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure you don't want to champion for adding primary_org_id to the API? This feels a bit fragile to put on the client side. Its hard to predict the future but if we ever make changes to locations we'd break some range of versions of the CLI.

Copy link
Member Author

@gmulz gmulz Jan 9, 2026

Choose a reason for hiding this comment

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

agree this way to fetch locations sucks, but was the most workable thing to start with.

are you saying add primary_org_id to the robot collection or actually populate it in the response for GetLocation?

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test This pull request is marked safe to test from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants