-
Notifications
You must be signed in to change notification settings - Fork 211
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
New feature: Update spring boot properties file for postgresql #4707
base: main
Are you sure you want to change the base?
New feature: Update spring boot properties file for postgresql #4707
Conversation
Hi, @saragluna , @weikanglim |
@@ -217,7 +217,7 @@ var {{bicepName .Name}}Env = map(filter({{bicepName .Name}}AppSettingsArray, i = | |||
module {{bicepName .Name}} 'br/public:avm/res/app/container-app:0.8.0' = { | |||
name: '{{bicepName .Name}}' | |||
params: { | |||
name: '{{.Name}}' | |||
name: '{{containerAppName .Name}}' |
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.
Curious about the change here -- we did intentionally move away from containerAppName .Name
to .Name
in #4434
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.
we did intentionally move away from containerAppName .Name to .Name in #4434
-
Do you mean change from
.Name
tocontainerAppName .Name
in easy-init: allow for longer container app names #4434 ? -
In think the mistake (missing
containerAppName
) is added in this PR: https://github.com/Azure/azure-dev/pull/4455/files
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 see. I think when #4455 was made, we also started adding upfront name validation in azd add
(UI layer, not at the schema layer).
Keeping it as .Name
instead of containerAppName .Name
(which does the truncation) transformation may help with #4653, so I think .Name
still looks better directionally. What do you think?
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.
How about doing like this:
- In current PR, keep using
containerAppName .Name
because it can solve the problem appeared in the sample project for current PR: https://github.com/azure-javaee/azure-spring-boot-samples/blob/788cc9a14f3fa2bfa826b0e875ba6dd729726dfa/postgresql/spring-cloud-azure-starter-jdbc-postgresql/spring-cloud-azure-postgresql-sample/pom.xml#L39 - For [Issue] Failed to deploy app when app name too long or different app name has same long prefix #4653, we can fix it in another PR. In that PR, the same name prefix should be considered,
Improve func: appendToCommaSeperatedValues
} | ||
type propertyMergeFunc func(string, string) string | ||
|
||
const azureProfileName = "azure" |
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 if in the user's application already have one azure
profile?
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.
const placeholderPostgresHost = "${POSTGRES_HOST}" | ||
const placeholderPostgresPort = "${POSTGRES_PORT}" | ||
const placeholderPostgresDatabase = "${POSTGRES_DATABASE}" | ||
const placeholderPostgresUsername = "${POSTGRES_USERNAME}" |
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.
These are the conventional env names that defined in azd.
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 mean these should be defined in a common place, instead of being defined in java
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.
Good point. Updated in this commit: cdc9acd
…um of 125 characters. (lll)
// G101 : Potential hardcoded credentials (gosec)
Hi, @saragluna , @weikanglim |
…o to app_init.go.
…ng-boot-properties-file-for-postgresql
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Hi, @saragluna , @weikanglim . |
1. Description
New feature: Update spring boot properties file for postgresql.
2. Try this feature
Link to sample project: https://github.com/azure-javaee/azure-spring-boot-samples/blob/788cc9a14f3fa2bfa826b0e875ba6dd729726dfa/postgresql/spring-cloud-azure-starter-jdbc-postgresql/spring-cloud-azure-postgresql-sample/pom.xml#L39
Screenshot before running
azd init
:azd init
:todo
s in current PR, my current plan is do them after current PR merged.