Skip to content

feat: add the tagtype command for user tags - #37

Merged
marevol merged 1 commit into
mainfrom
feat/tagtype
Oct 4, 2026
Merged

marevol merged 1 commit into
mainfrom
feat/tagtype

Conversation

@marevol

@marevol marevol commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds fessctl tagtype for the /api/admin/tagtype admin API, which manages per-user tags (codelibs/fess#3551, Fess 15.9). It follows the labeltype command.

  • create / get / list / update / delete
  • --name, --owner, --path (repeatable), --permission (repeatable), --virtual-host, --sort-order
  • update: the PUT replaces the whole tag, so the command reads the tag first and sends back every field you did not change. That includes its paths, seq_no and primary_term. When a rename changes the id, the command reports the new id.
  • list: the API leaves out each tag's paths; use get to see them.
  • The skills docs (SKILL.md, references/features/tagtype.md) are updated.

Testing

  • uv run pytest tests/unit: 129 passed, including new mocked tests for create, list and the update merge.
  • Integration tests run against a Fess built from the #3551 code with OpenSearch 3.9.0. They pass for tagtype (full create/get/update/list/delete cycle, and the paths survive an update) and for labeltype.
  • Manual checks:
    • A rename reports the new id.
    • A duplicate name exits 1 with "already exists".
    • An invalid --sort-order exits 1 with a validation error.
  • The tagtype integration test skips on Fess versions without the API, such as 15.8.

Add `fessctl tagtype` (create/update/delete/get/list) for the
/api/admin/tagtype admin API, following the labeltype command.
`update` reads the tag first and sends back every unchanged field,
including its paths, seq_no and primary_term, since the PUT replaces
the whole tag; it reports the new id when a rename changes it.

The integration test skips when the Fess under test does not provide
the API; unit tests cover the update merge with a mocked client.
@marevol marevol self-assigned this Oct 4, 2026
@marevol
marevol merged commit 5e52f77 into main Oct 4, 2026
4 checks passed
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.

1 participant