Repository navigation
[GIT-221] fix(cycle): guard against no end_date when archiving cycle - #9200
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo cycle archive endpoints are updated to safely validate whether a cycle can be archived when its ChangesCycle Archive End Date Validation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
…akeplane#9200) (cherry picked from commit da1a7ab)
Bring Hangar onto upstream v1.4.3 as one signed commit: preview requires signed commits and 24 of the upstream commits are unsigned, so the tag cannot be merged directly. Upstream package versions stay at Hangar's own. Where upstream and Hangar fixed the same endpoint, the stricter variant is kept: Hangar's all-or-nothing sub-issue reparenting with row locks and cycle checks, validated asset metadata, deduplicating assignee/label validation and the password-auth throttle. Public comment updates and deletes now combine Hangar's field allowlist with upstream's workspace and EXTERNAL-access binding. SECUR-247 (project membership required to publish) is taken from upstream with its tests, alongside Hangar's own deploy-board tests. Upstream's MinIO image moves are left out; object storage moves to SeaweedFS separately. Upstream commits: - bc0b1bb [GIT-384] Fix voting on published work items with no votes (makeplane#10103) - dc93e16 [SECUR-247] fix(security): require project membership to publish (makeplane#10033) (makeplane#10034) - 90717e5 fix: address v1.4.3 release review comments (makeplane#9925) - b348e44 [INFRA-1039] fix(deployments): find the latest release when the GitHub API returns compact JSON (makeplane#9916) - 5864647 [INFRA-804] fix(airgapped and minio): harden community restore-airgapped.sh script and minio image fix (makeplane#9727) - 5fcc65f fix(security): bump the fast-uri pin to 3.1.8 (makeplane#9919) - ec1e5de fix(deps): resolve dependabot security alerts (makeplane#9839) - 1258f53 fix(security): clear the 2026-09-10 nightly Trivy findings (makeplane#9806) - 00ecb12 [INFRA-843] fix(security): clear nightly Trivy findings (makeplane#9773) - a97680d chore(deps): bump sanitize-html (makeplane#9736) - c6be1fa chore: upgrade pnpm to 11.10, turbo to latest, fix dependabot alert (makeplane#9734) - b2dd757 [WEB-9166] fix(project): scope project-join membership lookup to the invited project (makeplane#9866) - a5595ea [WEB-8289] fix: scope draft-to-issue conversion to the draft owner (makeplane#9443) - cd98fab fix(api): avoid re-crawling issue link on update when url is unchanged (makeplane#9763) - c9b56cf [GIT-221] fix(cycle): guard against no end_date when archiving cycle (makeplane#9200) - e3324b6 fix(api): validate assignees/labels in IssueSerializer instead of silently dropping invalid ids (makeplane#9526) - 5c4d9b1 [WEB-8352] fix(security): scope SubIssuesEndpoint to the URL project (makeplane#9466) - 1e1248a [WEB-8283] fix: bind Spaces board object IDs to the anchor's project (makeplane#9442) - 2146cfd [WEB-8110] fix: sanitize page list order_by against an allowlist (makeplane#9387) - 79b6075 [WEB-8103] fix: stop leaking webhook HMAC secret_key on reads (makeplane#9382) - b99f74d [WEB-7946] fix: add rate limiting to email/password sign-in and sign-up endpoints (makeplane#9335) - 1c8a60f [WEB-8632] fix(web): auto-reload on stale chunk load failure during navigation (makeplane#9579) - 31853ab chore: resolve dependabot security alerts (pnpm + pip) (makeplane#9549) - fa02716 fix(web): guard unguarded data derefs causing work-item and layout crashes (makeplane#9546) - 25c6843 fix: enforce FILE_SIZE_LIMIT on published Space asset upload (makeplane#9242) - c5951e7 [WEB-8510] fix(web): fix clipped/overlapping LayoutDropDown button in Create View modal (makeplane#9542) - a18177c feat(api): enhance workspace module query to include member IDs (makeplane#9541) - 1942665 fix(web): add trailing slash to notification list API call (makeplane#9521) - 65f4a99 docs: add Zenith Hosting deploy option (makeplane#9529) - 1ed664e [WEB-8512] feat: add workspace member reactivation command (makeplane#9520)
Bring Hangar onto upstream v1.4.3 as one signed commit: preview requires signed commits and 24 of the upstream commits are unsigned, so the tag cannot be merged directly. Upstream package versions stay at Hangar's own. Where upstream and Hangar fixed the same endpoint, the stricter variant is kept: Hangar's all-or-nothing sub-issue reparenting with row locks and cycle checks, validated asset metadata, deduplicating assignee/label validation and the password-auth throttle. Public comment updates and deletes now combine Hangar's field allowlist with upstream's workspace and EXTERNAL-access binding. SECUR-247 (project membership required to publish) is taken from upstream with its tests, alongside Hangar's own deploy-board tests. Upstream's MinIO image moves are left out; object storage moves to SeaweedFS separately. Upstream commits: - bc0b1bb [GIT-384] Fix voting on published work items with no votes (makeplane#10103) - dc93e16 [SECUR-247] fix(security): require project membership to publish (makeplane#10033) (makeplane#10034) - 90717e5 fix: address v1.4.3 release review comments (makeplane#9925) - b348e44 [INFRA-1039] fix(deployments): find the latest release when the GitHub API returns compact JSON (makeplane#9916) - 5864647 [INFRA-804] fix(airgapped and minio): harden community restore-airgapped.sh script and minio image fix (makeplane#9727) - 5fcc65f fix(security): bump the fast-uri pin to 3.1.8 (makeplane#9919) - ec1e5de fix(deps): resolve dependabot security alerts (makeplane#9839) - 1258f53 fix(security): clear the 2026-09-10 nightly Trivy findings (makeplane#9806) - 00ecb12 [INFRA-843] fix(security): clear nightly Trivy findings (makeplane#9773) - a97680d chore(deps): bump sanitize-html (makeplane#9736) - c6be1fa chore: upgrade pnpm to 11.10, turbo to latest, fix dependabot alert (makeplane#9734) - b2dd757 [WEB-9166] fix(project): scope project-join membership lookup to the invited project (makeplane#9866) - a5595ea [WEB-8289] fix: scope draft-to-issue conversion to the draft owner (makeplane#9443) - cd98fab fix(api): avoid re-crawling issue link on update when url is unchanged (makeplane#9763) - c9b56cf [GIT-221] fix(cycle): guard against no end_date when archiving cycle (makeplane#9200) - e3324b6 fix(api): validate assignees/labels in IssueSerializer instead of silently dropping invalid ids (makeplane#9526) - 5c4d9b1 [WEB-8352] fix(security): scope SubIssuesEndpoint to the URL project (makeplane#9466) - 1e1248a [WEB-8283] fix: bind Spaces board object IDs to the anchor's project (makeplane#9442) - 2146cfd [WEB-8110] fix: sanitize page list order_by against an allowlist (makeplane#9387) - 79b6075 [WEB-8103] fix: stop leaking webhook HMAC secret_key on reads (makeplane#9382) - b99f74d [WEB-7946] fix: add rate limiting to email/password sign-in and sign-up endpoints (makeplane#9335) - 1c8a60f [WEB-8632] fix(web): auto-reload on stale chunk load failure during navigation (makeplane#9579) - 31853ab chore: resolve dependabot security alerts (pnpm + pip) (makeplane#9549) - fa02716 fix(web): guard unguarded data derefs causing work-item and layout crashes (makeplane#9546) - 25c6843 fix: enforce FILE_SIZE_LIMIT on published Space asset upload (makeplane#9242) - c5951e7 [WEB-8510] fix(web): fix clipped/overlapping LayoutDropDown button in Create View modal (makeplane#9542) - a18177c feat(api): enhance workspace module query to include member IDs (makeplane#9541) - 1942665 fix(web): add trailing slash to notification list API call (makeplane#9521) - 65f4a99 docs: add Zenith Hosting deploy option (makeplane#9529) - 1ed664e [WEB-8512] feat: add workspace member reactivation command (makeplane#9520)
Description
Archiving a cycle with no end date caused a
TypeErrorbecauseend_datewas compared directly totimezone.now()without a null check. Added an explicitNoneguard so cycles without an end date are treated as incomplete and return a400instead of crashing with a500.cycle.end_date >= timezone.now()raisesTypeError: '>=' not supported between instances of 'NoneType' and 'datetime.datetime'whenend_dateis not set.Added
cycle.end_date is Nonecheck before the comparison in both archive endpoints:plane/api/views/cycle.pyType of Change
Screenshots and Media (if applicable)
Before:

After:

Test Scenarios
Create a cycle without start and end dates and make API call to archive the cycle, expected response status code is 400 and message is
References
Fixes #9169
Summary by CodeRabbit