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

fix: update the actual max length for bundle names #186

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/models/bundle-descriptor-constraints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
export const ALLOWED_NAME_REGEXP = /^[\da-z]+(?:([.-])[\da-z]+)*$/
export const ALLOWED_VERSION_REGEXP = /^\w+[\w.-]*$/
export const MAX_VERSION_LENGTH = 128
export const MAX_NAME_LENGTH = 50
export const MAX_NAME_LENGTH = 31
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @TheLearneer ,
that variable is used to validate a lot of content types' length. The issue you are talking about seems to be limited to the Mfe name, can we ask you to add another const to use only to validate Mfe name length?
It should be the line
if (mfe.name.length > MAX_NAME_LENGTH) {
within src/services/microfrontend-service.ts
If you are busy we can easily proceed by ourselves, just let us know please

Copy link
Author

Choose a reason for hiding this comment

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

@firegloves I can proceed with the fix.
Just to be sure though, I believe this fix should be done for both microfrontend and microservice, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @TheLearneer, I don't think so because the limit to 40 chars takes place within the Entando core database. Microservice are handled by a different Entando component and the main storage is directly kubernetes, so I'm pretty sure they have different limits. Did you experienced something different?

export const MAX_WIDGET_CATEGORY_LENGTH = 80
export const INVALID_NAME_MESSAGE =
'The Name may contain lowercase letters, digits and separators. A separator is defined as a period, or a dash. The name may not start or end with a separator.'
Expand Down