Skip to content

Members improvements - #196

Draft
Gerrit91 wants to merge 12 commits into
mainfrom
members-improvements
Draft

Gerrit91 wants to merge 12 commits into
mainfrom
members-improvements

Conversation

@Gerrit91

@Gerrit91 Gerrit91 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

While working on the CLI apply commands, I realized the following shortcomings in the API:

  • Projects and tenants cannot be created with fixed IDs even for admins, this was possible with V1
    • For some reason we have an admin tenant create service method, but it does exactly the same as the one for the user
  • ProjectServiceRemoveMemberResponse returns ProjectRole instead of ProjectMember, which is wrong
  • Members do not contain their parent's ID (tenant member does not contain the tenant ID it belongs to, project member does not contain the project ID it belongs to)
    • This prevents a member apply because the member add requests require the parent IDs

In order to fix these shortcomings, I turned the member methods into own CRUDs into dedicated services. The admin member add / remove methods need to stay because this allows unscoped member creation, for the regular API these calls must be scoped.

Used AI-Tools ✨

  • None used for generation

@majst01

majst01 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

would like to discuss this in person

@Gerrit91
Gerrit91 force-pushed the members-improvements branch from fced08b to 4ac3661 Compare October 20, 2026 09:33
Comment on lines +49 to +62
message ProjectServiceCreateRequest {
// Login is the tenant of this project.
string login = 1 [(buf.validate.field).string.(metalstack.api.v2.is_name) = true];
// Name of this project, unique per tenant.
string name = 2 [(buf.validate.field).string.(metalstack.api.v2.is_name) = true];
// Description of this project.
string description = 3 [(buf.validate.field).string.(metalstack.api.v2.is_description) = true];
// Avatar URL of the project.
optional string avatar_url = 4 [(buf.validate.field).string.(metalstack.api.v2.is_uri) = true];
// Labels on the project.
metalstack.api.v2.Labels labels = 5;
// Project is the uuid of the project.
optional string project = 6 [(buf.validate.field).string.uuid = true];
}

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.

this should already exist in api/v2/project.proto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants