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

Fix issue with secret being not populated for default EnvironmentProp… #2393

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ public Map<String, String> createEnvironment() throws RuntimeException
HashMap<String, String> connectionEnvironment = new HashMap<>();
if (StringUtils.isNotBlank(glueConnectionName)) {
Connection connection = getGlueConnection(glueConnectionName);
Map<String, String> connectionProperties = new HashMap<>(connection.connectionPropertiesAsStrings());
connectionProperties.putAll(authenticationConfigurationToMap(connection.authenticationConfiguration()));
Map<String, String> connectionPropertiesWithSecret = new HashMap<>(connection.connectionPropertiesAsStrings());
connectionPropertiesWithSecret.putAll(authenticationConfigurationToMap(connection.authenticationConfiguration()));

connectionEnvironment.putAll(connectionPropertiesToEnvironment(connectionProperties));
connectionEnvironment.putAll(connectionPropertiesToEnvironment(connectionPropertiesWithSecret));
connectionEnvironment.putAll(athenaPropertiesToEnvironment(connection.athenaProperties()));
}

Expand Down Expand Up @@ -120,13 +120,14 @@ public Map<String, String> athenaPropertiesToEnvironment(Map<String, String> ath
}

/**
* Maps glue connection properties to environment properties like 'default' and 'secret_manager_gcp_creds_name'
* Default behavior is to not populate environment with these properties
* Maps glue connection properties and authentication configuration
* to Athena federation environment properties like 'default' and 'secret_manager_gcp_creds_name'
* Default behavior is to not map to Athena federation environment variables
*
* @param connectionProperties contains secret_name and connection properties
*/
public Map<String, String> connectionPropertiesToEnvironment(Map<String, String> connectionProperties)
{
return new HashMap<>();
return connectionProperties;
}
}