-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/postgesql fix #2
Conversation
New AWS sub-generator which uses Amazon ECS to run JHipster monolithic applications. Closes jhipster#6773
Moved constants from index.js into a separate aws-containers generator specific file
# Conflicts: # generators/aws-containers/index.js # generators/aws-containers/prompts.js # generators/aws-containers/templates/_application.template.yml # generators/aws-containers/templates/_base.template.yml # generators/docker-base.js # generators/docker-utils.js # generators/generator-base.js
generators/aws-containers/prompts.js
Outdated
const prodDatabaseType = config.prodDatabaseType; | ||
|
||
if(prodDatabaseType === databaseTypes.postgresql) { | ||
this.log.ok(` ⚠️ Postgresql databases are currently only supported by Aurora on high-performance database instances`); |
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.
This is not ok, The hot tub is too hot.
change the log and use chalk to either use orange or red
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.
Dead to me
generators/aws-containers/prompts.js
Outdated
}; | ||
}); | ||
|
||
if (perf.database.supportedEngines.includes(prodDatabaseType)) { |
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.
what is the else
return value?
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.
Also, could you put the check perf.database.supportedEngines.includes(prodDatabaseType)
in a variable?
I'm thinking isEngineSupported
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.
🌮
choices: performanceLevels, | ||
default: awsConfig.performance, | ||
validate: (input) => { |
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.
Why did you return the validation?
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.
Because it doesn't work. 🌮 🌷
@@ -1,3 +1,4 @@ | |||
|
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.
Delete line
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.
🌮
generators/aws-containers/prompts.js
Outdated
|
||
return 'Stack\'s name cannot be empty!'; | ||
} | ||
validate: input => ((_.isEmpty(input) || !input.match(CLOUDFORMATION_STACK_NAME)) ? 'Stack name must contain letters, digits, or hyphens ' : true) |
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.
You can ditch the parenthesis. Also I don't know how I feel about the ternary operator for this
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
generators/aws-containers/prompts.js
Outdated
|
||
const AURORA_DB_PASSORD_REGEX = /^[^@"\/]{8,42}$/; // eslint-disable-line | ||
const CLOUDFORMATION_STACK_NAME = /[a-zA-Z][-a-zA-Z0-9]*/; // eslint-disable-line | ||
|
||
const SCALING_TO_CONFIG = { |
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.
I think you should merge back the two objects and then move the map
done in both scaling and performance prompts here as constants.
Example: performanceLevels
from promptPerformance
becomes PERFORMANCE_PROMPT_CHOICES
.
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.
Just realised that we did those mapping in the function when there is no need to do so as we don't need anything from the running context
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.
I'd prefer to leave this because I've separated the concepts.
let dependency = `${group}:${name}`; | ||
if (version) { | ||
dependency += `:${version}`; | ||
} | ||
try { | ||
jhipsterUtils.rewriteFile({ | ||
file: fullPath, | ||
path: directory, | ||
file: 'build.gradle', |
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.
That's very good
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.
🌮
* new aws-containers sub-generator New AWS sub-generator which uses Amazon ECS to run JHipster monolithic applications. Closes jhipster#6773 * external constants to localised file Moved constants from index.js into a separate aws-containers generator specific file * testing and linting errors * add back missing constants from aws-containers * address issue where the base.template is not being read correctly * Pull Requests review fixs * wording * Wording * Use the Spring Cloud Context version from jhipster-dependencies * Use the version from jhipster-dependencies * Wording * Corrected issues with Postgresql database not deploying correctly * Switched out NLB for ALB * Split scaling out from performance question * Added nesting supporting into repo name * Added stack name checking * Corrected issues with the path lookup * Code review feedback * Fixed linting errors * Swapped out bootRepackage for bootWar
* new aws-containers sub-generator New AWS sub-generator which uses Amazon ECS to run JHipster monolithic applications. Closes jhipster#6773 * external constants to localised file Moved constants from index.js into a separate aws-containers generator specific file * testing and linting errors * add back missing constants from aws-containers * address issue where the base.template is not being read correctly * Pull Requests review fixs * wording * Wording * Use the Spring Cloud Context version from jhipster-dependencies * Use the version from jhipster-dependencies * Wording * Corrected issues with Postgresql database not deploying correctly * Switched out NLB for ALB * Split scaling out from performance question * Added nesting supporting into repo name * Added stack name checking * Corrected issues with the path lookup * Code review feedback * Fixed linting errors * Swapped out bootRepackage for bootWar
Split scaling out from performance and correction for Postgres provisioning