Skip to content

Commit b7d8eb4

Browse files
chore(cloudsql): remove defaulting db_user (#9650)
This path of code will only be hit if `DB_USER` is set, therefore there is no use in defaulting the database user to empty string anymore.
1 parent f7f2b73 commit b7d8eb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloud-sql/mysql/sqlalchemy/connect_connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def connect_with_connector() -> sqlalchemy.engine.base.Engine:
3333
# keep secrets safe.
3434

3535
instance_connection_name = os.environ["INSTANCE_CONNECTION_NAME"] # e.g. 'project:region:instance'
36-
db_user = os.environ.get("DB_USER", "") # e.g. 'my-db-user'
36+
db_user = os.environ["DB_USER"] # e.g. 'my-db-user'
3737
db_pass = os.environ["DB_PASS"] # e.g. 'my-db-password'
3838
db_name = os.environ["DB_NAME"] # e.g. 'my-database'
3939

0 commit comments

Comments
 (0)