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

use derived constants in kubernetes base #14767

Merged
merged 9 commits into from
Jul 3, 2021
Merged

Conversation

Tcharl
Copy link
Contributor

@Tcharl Tcharl commented Apr 25, 2021

contributes to #14235


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@Tcharl Tcharl changed the title use derived constants in kubenrenetes base use derived constants in kubernetes base Apr 25, 2021
@Tcharl Tcharl marked this pull request as draft April 25, 2021 12:33
@Tcharl Tcharl marked this pull request as ready for review April 27, 2021 14:45
@Tcharl
Copy link
Contributor Author

Tcharl commented Apr 27, 2021

I'm really not sure about this one, but hope the approach is right

@Tcharl Tcharl requested a review from mshima April 27, 2021 16:51
@Tcharl
Copy link
Contributor Author

Tcharl commented Apr 28, 2021

I really suck at restructuring, and I don't really understand how to achieve that flattening of internal methods from another class. Any js blackbelt to help?

@mshima
Copy link
Member

mshima commented Apr 28, 2021

@Tcharl last commit you changed end from a function (1 task) to a getter (multiples tasks).
_end() should return an object.

@mshima
Copy link
Member

mshima commented Apr 28, 2021

I am thinking about adding snapshots test for deployment generators.
Current tests are not good enough.

@Tcharl
Copy link
Contributor Author

Tcharl commented Apr 28, 2021

Thank you vers much for your time @mshima , I'll one day become a js blackbelt because of your support! Fixing the issue now, what about the remaining change?

@Tcharl
Copy link
Contributor Author

Tcharl commented Apr 30, 2021

Triple checked: is it ok to go?

@Tcharl
Copy link
Contributor Author

Tcharl commented Jun 5, 2021

Hi everyone,

Back to that constants stuff ;-). Thank you very much one more time for the snapshot testing @mshima , it's awesome for troubleshooting!

I think the new snapshots are only fixing existing bugs, can someone take a look please?

@deepu105 , I think that you're the one able to tell if the new version generated for the 'kubernetes helm: gateway, mysql, psql, mongodb, mariadb microservices' test is better than the old one.

@deepu105
Copy link
Member

deepu105 commented Jun 5, 2021

I'll try it out when i hv time

@mshima
Copy link
Member

mshima commented Jun 5, 2021

Glad it worked.
You forgot to update the snapshots.

@Tcharl
Copy link
Contributor Author

Tcharl commented Jun 5, 2021

Yes, it is totally voluntary: I wanted to wait for the review so that buddies will know what changed, then I'll update the snapshot if everything is validated

@Tcharl
Copy link
Contributor Author

Tcharl commented Jul 2, 2021

Much more confident with this round :-)

Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

It looks good, just a few suggestions.

@@ -484,16 +486,19 @@ which is free for the first 30 days`);
return this._default();
}

_loadPlatformConfig(config = _.defaults({}, this.jhipsterConfig, defaultConfig), dest = this) {
super.loadPlatformConfig(config, dest);
_computeDerivedConfig(config = _.defaults({}, this.jhipsterConfig, defaultConfig), dest = this) {
Copy link
Member

@mshima mshima Jul 3, 2021

Choose a reason for hiding this comment

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

Move to after priorities, it's not a priority.
Or drop the method and put in the task.

_loadPlatformConfig(config = _.defaults({}, this.jhipsterConfig, defaultConfig), dest = this) {
super.loadPlatformConfig(config, dest);
dest.cicdIntegrationsSnyk = config.cicdIntegrations || [];
_loadCiCdConfig(config = _.defaults({}, this.jhipsterConfig, defaultConfig), dest = this) {
Copy link
Member

Choose a reason for hiding this comment

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

Better move to after priorities to don't mix priority and api.

Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

LGTM.
Merge at will.

@Tcharl
Copy link
Contributor Author

Tcharl commented Jul 3, 2021

Pending for too long: merging it, and pursuing the adventure after looking at the 'two phase generation' PR

@Tcharl Tcharl merged commit 8d5bae0 into jhipster:main Jul 3, 2021
@pascalgrimaud pascalgrimaud added this to the 7.2.0 milestone Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants