Skip to content

Add diff_version field#3126

Merged
vkrasnovyd merged 21 commits intoOpenSlides:mainfrom
bastianjoel:c-5355-diff-version
Apr 1, 2026
Merged

Add diff_version field#3126
vkrasnovyd merged 21 commits intoOpenSlides:mainfrom
bastianjoel:c-5355-diff-version

Conversation

@bastianjoel
Copy link
Copy Markdown
Member

@bastianjoel bastianjoel commented Sep 3, 2025

@vkrasnovyd vkrasnovyd added migration Introduces a new migration enhancement General enhancement which is neither bug nor feature labels Oct 6, 2025
@vkrasnovyd vkrasnovyd marked this pull request as ready for review October 7, 2025 09:51
Copy link
Copy Markdown
Member

@luisa-beerboom luisa-beerboom left a comment

Choose a reason for hiding this comment

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

Generally looks good, i have some questions though.

Comment on lines +93 to +100
if instance.get("lead_motion_id") or datastore_instance.get("lead_motion_id"):
return [
{
"type": (MotionErrorType.DIFF_VERSION),
"message": "You can define a diff_version only for the lead motion",
}
]
return []
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't there also be a requirement that normal motions need a diff version, or should it maybe be filled automatically?

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.

Valid point. @bastianjoel what is the desired backend behaviour in case no diff_version is provided for the normal motion?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It can be left empty in that case. So no requirement to set that field needed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you leave the possibility open to leave the field empty, what happens to lead motions that don't have the field set when the diff service is next updated?
Is there going to be a migration like in this PR every single time that happens?
Or are we just going to risk letting diffs for old motions break?

Copy link
Copy Markdown
Member Author

@bastianjoel bastianjoel Oct 9, 2025

Choose a reason for hiding this comment

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

If you leave the possibility open to leave the field empty, what happens to lead motions that don't have the field set when the diff service is next updated?

The compatibility layer will not be applied on these. I want to keep this option open for now.

Is there going to be a migration like in this PR every single time that happens?

No, if we decide that it needs to be required we can just set a default version in the client and apply the requirement check later.

Comment thread tests/system/action/motion/test_update.py Outdated
@luisa-beerboom luisa-beerboom removed their assignment Oct 9, 2025
@bastianjoel bastianjoel force-pushed the c-5355-diff-version branch from be23578 to f15042e Compare March 25, 2026 13:04
@vkrasnovyd vkrasnovyd removed the migration Introduces a new migration label Mar 25, 2026
@vkrasnovyd vkrasnovyd force-pushed the c-5355-diff-version branch from b9ed665 to 7bb5575 Compare March 25, 2026 16:01
vkrasnovyd and others added 3 commits March 26, 2026 11:17
Reverts changes from merging main into this branch that have lead to
some separate tests being merged together.
@bastianjoel
Copy link
Copy Markdown
Member Author

Client is now updated. You can merge after resolving the conflict

@vkrasnovyd vkrasnovyd merged commit b90632c into OpenSlides:main Apr 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement General enhancement which is neither bug nor feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants