-
Notifications
You must be signed in to change notification settings - Fork 191
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
Increase target name to 128 and target controller id to 256 #849
Increase target name to 128 and target controller id to 256 #849
Conversation
Signed-off-by: Florian Ruschbaschan <[email protected]>
Thanks for taking the time to contribute to hawkBit! We really appreciate this. Make yourself comfortable while I'm looking for a committer to help you with your contribution. |
Can one of the admins verify this patch? |
Signed-off-by: Florian Ruschbaschan <[email protected]>
Signed-off-by: Florian Ruschbaschan <[email protected]>
Signed-off-by: Florian Ruschbaschan <[email protected]>
|
||
# This profile adds basic configurations for a DB2 DB usage. | ||
# Keep in mind that you need the DB2 driver in your classpath on compile. | ||
# see https://www.eclipse.org/hawkbit/documentation/guide/runhawkbit.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url is no longer valid, would you please change it to https://www.eclipse.org/hawkbit/guides/runhawkbit/
also in the other places where it might be used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I have also changed the URL for application-mysql.properties and application-mssql.properties
ALTER TABLE sp_target_tag ALTER COLUMN name VARCHAR(128); | ||
|
||
|
||
ALTER TABLE sp_target ALTER COLUMN controller_id VARCHAR(256); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line at the end of this file, for github
ALTER TABLE sp_target_tag ALTER COLUMN name SET DATA TYPE VARCHAR(128); | ||
|
||
|
||
ALTER TABLE sp_target ALTER COLUMN controller_id SET DATA TYPE VARCHAR(256); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line at the end of this file, for github
ALTER TABLE sp_target_tag MODIFY name VARCHAR(128); | ||
|
||
|
||
ALTER TABLE sp_target MODIFY controller_id VARCHAR(256); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line at the end of this file, for github
ALTER TABLE sp_target_tag ALTER COLUMN name VARCHAR(128); | ||
|
||
|
||
ALTER TABLE sp_target ALTER COLUMN controller_id VARCHAR(256); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line at the end of this file, for github
@@ -251,7 +252,7 @@ private void createAndUpdateDistributionSetWithInvalidVersion(final Distribution | |||
|
|||
assertThatExceptionOfType(ConstraintViolationException.class) | |||
.isThrownBy(() -> distributionSetManagement.create(entityFactory.distributionSet().create().name("a") | |||
.version(RandomStringUtils.randomAlphanumeric(65)))) | |||
.version(RandomStringUtils.randomAlphanumeric(NamedEntity.NAME_MAX_SIZE + 1)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong field is being tested here, should be .name()
instead of .version()
, would you mind adding another block that tests the name
and leaving the one that tests the version
as is?
@@ -260,7 +261,7 @@ private void createAndUpdateDistributionSetWithInvalidVersion(final Distribution | |||
|
|||
assertThatExceptionOfType(ConstraintViolationException.class) | |||
.isThrownBy(() -> distributionSetManagement.update(entityFactory.distributionSet().update(set.getId()) | |||
.version(RandomStringUtils.randomAlphanumeric(65)))) | |||
.version(RandomStringUtils.randomAlphanumeric(NamedEntity.NAME_MAX_SIZE + 1)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong field is being tested here, should be .name()
instead of .version()
, would you mind adding another block that tests the name
and leaving the one that tests the version
as is?
@@ -165,7 +166,7 @@ private void createAndUpdateDistributionSetWithInvalidVersion(final Distribution | |||
|
|||
assertThatExceptionOfType(ConstraintViolationException.class) | |||
.isThrownBy(() -> distributionSetManagement.create(entityFactory.distributionSet().create().name("a") | |||
.version(RandomStringUtils.randomAlphanumeric(65)))) | |||
.version(RandomStringUtils.randomAlphanumeric(NamedEntity.NAME_MAX_SIZE + 1)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong field is being tested here, should be .name()
instead of .version()
, would you mind adding another block that tests the name
and leaving the one that tests the version
as is?
@@ -184,7 +185,7 @@ private void createAndUpdateDistributionSetWithInvalidVersion(final Distribution | |||
|
|||
assertThatExceptionOfType(ConstraintViolationException.class) | |||
.isThrownBy(() -> distributionSetManagement.update(entityFactory.distributionSet().update(set.getId()) | |||
.version(RandomStringUtils.randomAlphanumeric(65)))) | |||
.version(RandomStringUtils.randomAlphanumeric(NamedEntity.NAME_MAX_SIZE + 1)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong field is being tested here, should be .name()
instead of .version()
, would you mind adding another block that tests the name
and leaving the one that tests the version
as is?
@@ -281,7 +282,7 @@ private void createAndUpdateTargetWithInvalidSecurityToken(final Target target) | |||
|
|||
assertThatExceptionOfType(ConstraintViolationException.class) | |||
.isThrownBy(() -> targetManagement.create(entityFactory.target().create().controllerId("a") | |||
.securityToken(RandomStringUtils.randomAlphanumeric(129)))) | |||
.securityToken(RandomStringUtils.randomAlphanumeric(NamedEntity.NAME_MAX_SIZE + 1)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong field is being tested here, should be .controllerId()
instead of .securityToken()
, would you mind adding another block that tests the controllerId
and leaving the one that tests the securityToken
as is?
@@ -291,7 +292,7 @@ private void createAndUpdateTargetWithInvalidSecurityToken(final Target target) | |||
|
|||
assertThatExceptionOfType(ConstraintViolationException.class) | |||
.isThrownBy(() -> targetManagement.update(entityFactory.target().update(target.getControllerId()) | |||
.securityToken(RandomStringUtils.randomAlphanumeric(129)))) | |||
.securityToken(RandomStringUtils.randomAlphanumeric(NamedEntity.NAME_MAX_SIZE + 1)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong field is being tested here, should be .controllerId()
instead of .securityToken()
, would you mind adding another block that tests the controllerId
and leaving the one that tests the securityToken
as is?
- Use correct constant field for junit tests - Change Hawkbit documentation url of application-<db>.properties - Add new line at the end of db migration scripts Signed-off-by: Florian Ruschbaschan <[email protected]>
@@ -252,7 +253,7 @@ private void createAndUpdateDistributionSetWithInvalidVersion(final Distribution | |||
|
|||
assertThatExceptionOfType(ConstraintViolationException.class) | |||
.isThrownBy(() -> distributionSetManagement.create(entityFactory.distributionSet().create().name("a") | |||
.version(RandomStringUtils.randomAlphanumeric(NamedEntity.NAME_MAX_SIZE + 1)))) | |||
.version(RandomStringUtils.randomAlphanumeric(NamedVersionedEntity.VERSION_MAX_SIZE + 1)))) | |||
.as("entity with too long name should not be created"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please fix the assertion error message, entity with too long version should not be created
instead of entity with too long name should not be created
. It's in multiple places in this file
Signed-off-by: Florian Ruschbaschan <[email protected]>
looks good! 👍 |
@@ -1,5 +1,5 @@ | |||
# | |||
# Copyright (c) 2015 Bosch Software Innovations GmbH and others. | |||
# Copyright (c) 2019 Bosch Software Innovations GmbH and others. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert back to 2015, since there has been the original inception
@@ -1,5 +1,5 @@ | |||
# | |||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others. | |||
# Copyright (c) 2019 Bosch Software Innovations GmbH and others. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see below
@hawkbit-bot please verify |
Signed-off-by: Florian Ruschbaschan <[email protected]>
Signed-off-by: Florian Ruschbaschan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you!
…hawkbit#849) * Increase target name to 128 and target controller id to 256 * Fix test failures by using constant NamedEntity.NAME_MAX_SIZE + 1 * Use constant NamedEntity.NAME_MAX_SIZE + 1 for mgmt-resource tests * Add db migration scripts to increase the controllerId and name limit * Fix review issues * Use correct constant field for junit tests * Change Hawkbit documentation url of application-<db>.properties * Add new line at the end of db migration scripts * Update assertion description * Revert copyright years to its creator year * Add DDI-, AMQP- and controller management-tests Signed-off-by: Florian Ruschbaschan <[email protected]>
Signed-off-by: Florian Ruschbaschan [email protected]