Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max tag length is set to 50, in Kolibri it is 30 #3296

Closed
rtibbles opened this issue Nov 8, 2021 · 4 comments · Fixed by #3310
Closed

Max tag length is set to 50, in Kolibri it is 30 #3296

rtibbles opened this issue Nov 8, 2021 · 4 comments · Fixed by #3310
Assignees
Labels
P0 - critical Priority: Release blocker or regression

Comments

@rtibbles
Copy link
Member

rtibbles commented Nov 8, 2021

Observed behavior

The max length for tags in Studio is 50, but it is 30 in Kolibri.

Expected behavior

We should not publish channels that will break Kolibri when importing.

At the very least, we should exclude or truncate longer tags at import.

We should also update the frontend and API validation to max at 30 to prevent any new tags.

We will then need to come up with a migration plan for existing tags that are too long.

User-facing consequences

Impossible to import channels into strict database engines (i.e. postgresql).

@bjester bjester added the P0 - critical Priority: Release blocker or regression label Nov 11, 2021
@vkWeb
Copy link
Member

vkWeb commented Nov 18, 2021

I think I can look into this...?

@rtibbles
Copy link
Member Author

That would be great, @vkWeb - the publishing code is in here: https://github.com/learningequality/studio/blob/unstable/contentcuration/contentcuration/utils/publish.py so the most important thing is to just not include tags greater than 30 characters when we publish as a first step.

We can then do further things to help rectify this issue!

@vkWeb
Copy link
Member

vkWeb commented Nov 20, 2021

tag_name = models.CharField(max_length=30, blank=True)

@rtibbles max_length is restricted to 30 on the ContentTag model 🤔...?

@rtibbles
Copy link
Member Author

That is the export model - but it's also SQLite, so it doesn't get enforced at the database level, so can still be written.

The tag class for Studio specifies a max length of 50:
https://github.com/learningequality/studio/blob/unstable/contentcuration/contentcuration/models.py#L1019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 - critical Priority: Release blocker or regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants