Skip to content

fix: allow tag rename without type payload#36182

Merged
lyzno1 merged 3 commits into
mainfrom
codex/fix-tag-rename-payload
May 15, 2026
Merged

fix: allow tag rename without type payload#36182
lyzno1 merged 3 commits into
mainfrom
codex/fix-tag-rename-payload

Conversation

@lyzno1
Copy link
Copy Markdown
Member

@lyzno1 lyzno1 commented May 14, 2026

Summary

  • split console tag create and update payload schemas so renaming a tag only requires name
  • keep tag type sourced from the existing tag record during rename instead of requiring clients to resend it
  • update the oRPC tag update contract to return the updated tag and use the server response for cache updates

Context

This fixes a regression introduced by #34422. That refactor made TagBasePayload.type required while PATCH /tags/{tag_id} still reused the create payload, causing rename requests with { name } to fail with type Field required.

Tests

  • uv run --project api pytest api/tests/unit_tests/controllers/console/tag/test_tags.py -q
  • pnpm -C web test service/client.spec.ts
  • uv run --project api python -m py_compile api/controllers/console/tag/tags.py api/controllers/service_api/dataset/dataset.py api/services/tag_service.py

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 14, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 0.00% 43.71% +43.71%
Strict coverage 0.00% 43.23% +43.23%
Typed symbols 0 22,054 +22,054
Untyped symbols 0 28,718 +28,718
Modules 0 2552 +2,552

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.93%. Comparing base (5798610) to head (5d77b2b).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
api/controllers/service_api/dataset/dataset.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #36182      +/-   ##
==========================================
- Coverage   85.93%   85.93%   -0.01%     
==========================================
  Files        4454     4454              
  Lines      210842   210847       +5     
  Branches    39412    39414       +2     
==========================================
- Hits       181189   181188       -1     
- Misses      26453    26459       +6     
  Partials     3200     3200              
Flag Coverage Δ
api 85.41% <85.71%> (+<0.01%) ⬆️
dify-ui 94.40% <ø> (ø)
web 86.60% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels May 14, 2026
@lyzno1 lyzno1 enabled auto-merge May 14, 2026 12:50
@lyzno1 lyzno1 force-pushed the codex/fix-tag-rename-payload branch from e10c7bc to f927f05 Compare May 14, 2026 12:53
@lyzno1 lyzno1 force-pushed the codex/fix-tag-rename-payload branch from f927f05 to 5d77b2b Compare May 14, 2026 12:54
@lyzno1 lyzno1 requested a review from asukaminato0721 May 14, 2026 13:09
@lyzno1 lyzno1 added this pull request to the merge queue May 15, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 15, 2026
Merged via the queue into main with commit 194b54b May 15, 2026
37 checks passed
@lyzno1 lyzno1 deleted the codex/fix-tag-rename-payload branch May 15, 2026 01:38
lyzno1 added a commit that referenced this pull request May 15, 2026
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants