Skip to content

Conversation

@psasidhar
Copy link
Contributor

Description

Contribution Checklist:

  • The pull request does not introduce any breaking changes
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Attach Screenshots (Optional)

@psasidhar psasidhar force-pushed the gcp_config_provider branch 2 times, most recently from fff22d6 to 232c24f Compare August 12, 2025 14:35
<groupId>com.yahoo.athenz</groupId>
<artifactId>athenz-server-common</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is this compile only?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed it


<properties>
<code.coverage.min>1.00</code.coverage.min>
<code.coverage.min>0.97</code.coverage.min>
Copy link
Collaborator

Choose a reason for hiding this comment

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

any reason we couldn't get 100%?

Copy link
Contributor Author

@psasidhar psasidhar Aug 13, 2025

Choose a reason for hiding this comment

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

I think this is because "Const" class and the ParameterManagerClientHelper class that has only static methods.

consts ParameterManagerClientHelper

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated it to get back to 100

return null;
}
String location = System.getProperty(ATHENZ_PROP_GCP_LOCATION, GLOBAL_LOCATION);
String projectId = System.getProperty(ATHENZ_PROP_GCP_PROJECT_ID, ATHENZ_GCP_PROJECT_ID_DEFAULT);
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we have a default project id? that just sounds wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to avoid GCP library throwing INVALID_ARGUMENT exception when the project id is empty, but handling this explicitly would make more sense.

Added code to throw IllegalArgumentException, and so this will surface up during server startup. only when ConfigProviderParameterManager is configured and the sourceDescription matches and yet the project_id is not set.

}

public static ParameterVersion getLatestParameterVersion(ParameterManagerClient client, ParameterName parameterName) {
LOG.info("getLatestParameterVersion: {}", parameterName);
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we have this info call - doesn't this going to be logged every minute for all the parameters all the time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed it

}

public static ParameterVersion getLatestParameterVersion(ParameterManagerClient client, String projectId, String location, String parameter) {
LOG.info("getLatestParameterVersion: {}", parameter);
Copy link
Collaborator

Choose a reason for hiding this comment

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

same comment as above. this seems like it will just flood the server log with unnecessary details.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed it

@psasidhar psasidhar force-pushed the gcp_config_provider branch from 232c24f to 57d098d Compare August 13, 2025 01:52
@psasidhar psasidhar force-pushed the gcp_config_provider branch from 57d098d to 88c037e Compare August 13, 2025 13:34
@havetisyan havetisyan merged commit c308650 into AthenZ:master Aug 13, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants