You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "LayonRibeiro (via GitHub)" <gi...@apache.org> on 2024/09/13 20:24:40 UTC
[PR] refactor schema-41910to42000.sql [cloudstack]
LayonRibeiro opened a new pull request, #9680:
URL: https://github.com/apache/cloudstack/pull/9680
### Description
This PR changes two column renames in `schema-41910to42000.sql`. Using MariaDB version `10.3.38-MariaDB`, some lines are not applying the expected changes to the column names in the tables. This issue results in errors during the version transition process.
The modifications made to the schema-41910to42000.sql ensure that changes to the tables are applied correctly. With these fixes, the transition between versions should proceed successfully, without errors.
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] build/CI
- [ ] test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [x] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [x] Minor
- [ ] Trivial
### How Has This Been Tested?
I made the mentioned changes, and the transition between versions went as expected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#discussion_r1762556337
##########
engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql:
##########
@@ -193,8 +193,8 @@ CREATE TABLE `cloud`.`ip4_guest_subnet_network_map` (
CONSTRAINT `uc_ip4_guest_subnet_network_map__uuid` UNIQUE (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-ALTER TABLE `cloud`.`network_offerings` RENAME COLUMN `nsx_mode` TO `network_mode`;
-ALTER TABLE `cloud`.`vpc_offerings` RENAME COLUMN `nsx_mode` TO `network_mode`;
+CALL `cloud`.`IDEMPOTENT_CHANGE_COLUMN`('network_offerings', 'nsx_mode', 'network_mode', 'varchar(32) COMMENT "mode in which the network would route traffic"');
+CALL `cloud`.`IDEMPOTENT_CHANGE_COLUMN`('vpc_offerings', 'nsx_mode', 'network_mode', 'varchar(32) COMMENT "mode in which the network would route traffic"');
ALTER TABLE `cloud`.`event` MODIFY COLUMN `type` varchar(50) NOT NULL;
Review Comment:
`MODIFY COLUMN` should be ok, it is being used in some other SQLs
it looks like the only problem is `RENAME COLUMN`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2355197040
Do we need explicit testing if Github Actions smoketests have passed? (that I reckon runs against MySQL 8.x)? @JoaoJandre @DaanHoogland
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor schema-41910to42000.sql [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2350570965
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor schema-41910to42000.sql [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2352393044
code lgtm
@JoaoJandre @DaanHoogland
If the issue exists with mariadb 10 and is fixed by this PR, we should merge this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2355629773
> > > Do we need explicit testing if Github Actions smoketests have passed? (that I reckon runs against MySQL 8.x)? @JoaoJandre @DaanHoogland
> >
> > I think we can merge. cc @weizhouapache
>
> @DaanHoogland shouldn't we wait for the CI results?
It will not give us more information than the GitHub actions in this case, as @rohityadavcloud implies.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2355166899
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor schema-41910to42000.sql [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2352750285
@JoaoJandre , for people using mariadb 10 this is actually a blocker. I don't know if mariadb10 is well supported otherwise, but I think we should include this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2355383185
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11130
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre merged PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2355475738
> Do we need explicit testing if Github Actions smoketests have passed? (that I reckon runs against MySQL 8.x)? @JoaoJandre @DaanHoogland
I think we can merge. cc @weizhouapache
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor schema-41910to42000.sql [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2352819932
> @JoaoJandre , for people using mariadb 10 this is actually a blocker. I don't know if mariadb10 is well supported otherwise, but I think we should include this.
Yes we are including this for sure. I'm just waiting for the CI results and we can merge this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor schema-41910to42000.sql [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2352250718
@blueorangutan LLtest
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor schema-41910to42000.sql [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2350598491
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/9680?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 4.48%. Comparing base [(`1d4700a`)](https://app.codecov.io/gh/apache/cloudstack/commit/1d4700a0bdd8404a78fad74a25d92ba2304f5595?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`0054119`)](https://app.codecov.io/gh/apache/cloudstack/commit/0054119ce552910d0a8ba435054924bcee336b61?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> :exclamation: There is a different number of reports uploaded between BASE (1d4700a) and HEAD (0054119). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (1d4700a) | HEAD (0054119) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #9680 +/- ##
============================================
- Coverage 15.81% 4.48% -11.34%
============================================
Files 5629 392 -5237
Lines 492029 32148 -459881
Branches 62293 5669 -56624
============================================
- Hits 77811 1441 -76370
+ Misses 405894 30701 -375193
+ Partials 8324 6 -8318
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9680/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/9680/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.48% <ø> (ø)` | |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/9680/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/9680?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor schema-41910to42000.sql [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2350574945
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#discussion_r1762544559
##########
engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql:
##########
@@ -193,8 +193,8 @@ CREATE TABLE `cloud`.`ip4_guest_subnet_network_map` (
CONSTRAINT `uc_ip4_guest_subnet_network_map__uuid` UNIQUE (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-ALTER TABLE `cloud`.`network_offerings` RENAME COLUMN `nsx_mode` TO `network_mode`;
-ALTER TABLE `cloud`.`vpc_offerings` RENAME COLUMN `nsx_mode` TO `network_mode`;
+CALL `cloud`.`IDEMPOTENT_CHANGE_COLUMN`('network_offerings', 'nsx_mode', 'network_mode', 'varchar(32) COMMENT "mode in which the network would route traffic"');
+CALL `cloud`.`IDEMPOTENT_CHANGE_COLUMN`('vpc_offerings', 'nsx_mode', 'network_mode', 'varchar(32) COMMENT "mode in which the network would route traffic"');
ALTER TABLE `cloud`.`event` MODIFY COLUMN `type` varchar(50) NOT NULL;
Review Comment:
@LayonRibeiro should this be done as well?
```suggestion
CALL `cloud`.`IDEMPOTENT_CHANGE_COLUMN`('event', 'type', 'varchar(50) NOT NULL');
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2355561127
> > Do we need explicit testing if Github Actions smoketests have passed? (that I reckon runs against MySQL 8.x)? @JoaoJandre @DaanHoogland
>
> I think we can merge. cc @weizhouapache
@DaanHoogland shouldn't we wait for the CI results?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2355172868
@rohityadavcloud a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor schema-41910to42000.sql [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2350709970
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11111
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#discussion_r1762544559
##########
engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql:
##########
@@ -193,8 +193,8 @@ CREATE TABLE `cloud`.`ip4_guest_subnet_network_map` (
CONSTRAINT `uc_ip4_guest_subnet_network_map__uuid` UNIQUE (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-ALTER TABLE `cloud`.`network_offerings` RENAME COLUMN `nsx_mode` TO `network_mode`;
-ALTER TABLE `cloud`.`vpc_offerings` RENAME COLUMN `nsx_mode` TO `network_mode`;
+CALL `cloud`.`IDEMPOTENT_CHANGE_COLUMN`('network_offerings', 'nsx_mode', 'network_mode', 'varchar(32) COMMENT "mode in which the network would route traffic"');
+CALL `cloud`.`IDEMPOTENT_CHANGE_COLUMN`('vpc_offerings', 'nsx_mode', 'network_mode', 'varchar(32) COMMENT "mode in which the network would route traffic"');
ALTER TABLE `cloud`.`event` MODIFY COLUMN `type` varchar(50) NOT NULL;
Review Comment:
@LayonRibeiro should this be done as well?
```suggestion
CALL `cloud`.`IDEMPOTENT_CHANGE_COLUMN`('event', 'type', 'varchar(50) NOT NULL');
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update of the schema 41910to42000.sql for compatibility with MariaDB version 10.3.38. [cloudstack]
Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2355758114
> > > > Do we need explicit testing if Github Actions smoketests have passed? (that I reckon runs against MySQL 8.x)? @JoaoJandre @DaanHoogland
> > >
> > >
> > > I think we can merge. cc @weizhouapache
> >
> >
> > @DaanHoogland shouldn't we wait for the CI results?
>
> It will not give us more information than the GitHub actions in this case, as @rohityadavcloud implies.
Sorry, I missed that message :sweat_smile:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor schema-41910to42000.sql [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2352252130
@DaanHoogland a [LL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor schema-41910to42000.sql [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #9680:
URL: https://github.com/apache/cloudstack/pull/9680#issuecomment-2352394069
@LayonRibeiro
can you update the title with a short summary of the issue ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org