Skip to content

editoast: add --skip-if-exists to user add cli#16722

Open
flomonster wants to merge 1 commit into
devfrom
fam/fix-add-user-setup
Open

editoast: add --skip-if-exists to user add cli#16722
flomonster wants to merge 1 commit into
devfrom
fam/fix-add-user-setup

Conversation

@flomonster
Copy link
Copy Markdown
Member

This fixes crash loop from editoast using docker compose.

Example:

$ editoast user add --help
Add a user

Usage: editoast user add [OPTIONS] [NAME] [IDENTITIES]...

Arguments:
  [NAME]           Name of the user
  [IDENTITIES]...  Identities of the user

Options:
  -s, --skip-if-exists  Skip if one of the identities already exists
  -h, --help            Print help
$ editoast user add -s 'Lol' 'lol2' 'mock/mocked'
Skipped: Identity mock/mocked already exists

@flomonster flomonster requested review from a team as code owners May 13, 2026 09:43
@github-actions github-actions Bot added the area:editoast Work on Editoast Service label May 13, 2026
This fixes crash loop from editoast using docker compose.

Signed-off-by: Florian Amsallem <florian.amsallem@gmail.com>
@flomonster flomonster force-pushed the fam/fix-add-user-setup branch from f9835b0 to 4d195d1 Compare May 13, 2026 11:51
@flomonster flomonster enabled auto-merge May 13, 2026 11:51
Copy link
Copy Markdown
Contributor

@younesschrifi younesschrifi left a comment

Choose a reason for hiding this comment

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

LGTM

/// Identities of the user
identities: Vec<String>,
/// Skip if one of the identities already exists
#[arg(short, long)]
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.

Suggested change
#[arg(short, long)]
#[arg(long)]

nit: -s for "skip" is unusual I think

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

Labels

area:editoast Work on Editoast Service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants