Skip to content

Fix cluster_id length check in startup.py#700

Draft
MKoesters wants to merge 2 commits intoBiBiServ:masterfrom
MKoesters:patch-3
Draft

Fix cluster_id length check in startup.py#700
MKoesters wants to merge 2 commits intoBiBiServ:masterfrom
MKoesters:patch-3

Conversation

@MKoesters
Copy link
Contributor

MAX_ID_LENGTH suggests a maximum length, not a static length. I adapted the condition accordingly

MAX_ID_LENGTH suggests a maximum length, not a static length.
I adapted the condition accordingly
@XaverStiensmeier
Copy link
Contributor

XaverStiensmeier commented Jan 27, 2026

Good catch. At the beginning I planned to set it only as a maximum. Later I thought that it might be wise to not allow shorter cluster ids to make it less likely to have two clusters with the same id. However, this is not a fix. A fix is to perform a bibigrid.core.utility.id_generation.is_unique_cluster_id check on the given cluster id to guarantee that the id is not in use before creation, which is much safer.

changing != to > also has to be done for rest_startup.

@MKoesters
Copy link
Contributor Author

Good catch. At the beginning I planned to set it only as a maximum. Later I thought that it might be wise to not allow shorter cluster ids to make it less likely to have two clusters with the same id. However, this is not a fix. A fix is to perform a bibigrid.core.utility.id_generation.is_unique_cluster_id check on the given cluster id to guarantee that the id is not in use before creation, which is much safer.

changing != to > also has to be done for rest_startup.

I'll have a look at this

@MKoesters MKoesters marked this pull request as draft January 30, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants