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

Consume cluster-level document-store configuration to consume MongoDB credentials #243

Merged
merged 8 commits into from
Oct 17, 2024

Conversation

Vaibhav090420
Copy link
Contributor

Description

Please include a summary of the change, motivation and context.

Testing

Please describe the tests that you ran to verify your changes. Please summarize what did you test and what needs to be tested e.g. deployed and tested helm chart locally.

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

Documentation

Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.

@Vaibhav090420 Vaibhav090420 requested a review from a team as a code owner October 16, 2024 17:17
@Vaibhav090420 Vaibhav090420 changed the title ENG-50204 [Hypertrace Config Service] Consume cluster-level document-store configuration to consume MongoDB credentials Consume cluster-level document-store configuration to consume MongoDB credentials Oct 16, 2024
Copy link

@suresh-prakash suresh-prakash left a comment

Choose a reason for hiding this comment

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

Changes to mount the credentials seem to be missing in deployment.yaml.

{{ $key }} = {{- toJson $value }}
{{- end }}
{{- end }}

{{ $dst }} {
{{- range $key, $value := (index .Values "configServiceConfig" (printf "%s" $dst)) }}

Choose a reason for hiding this comment

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

Lines 25 to 30 would also need to change. Please refer other sample PRs.

helm/values.yaml Outdated
@@ -13,6 +13,7 @@
###########
# Deployment and Service
###########
name: hypertrace-config-service

Choose a reason for hiding this comment

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

Nit:
We usually wrap it under service and reference it as

service: 
     name: ...


public class PartitionerConfigServiceFactory {

@Deprecated
public static BindableService build(Config config) {

Choose a reason for hiding this comment

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

Is this method still required? Planning to remove it in a later PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

currently traceable-config-service is using this method, will remove once I change it there


@Deprecated
public PartitionerConfigServiceModule(Config config) {

Choose a reason for hiding this comment

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

If this is unused, can we remove it instead of deprecating?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

currently used in traceable-config-service, will remove once changes are made there

Copy link

@suresh-prakash suresh-prakash left a comment

Choose a reason for hiding this comment

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

Wrapping aggregate() / search() calls under try-with-resources block seems to be missing. Apologies for missing this out in the previous iteration.

@@ -6,7 +6,7 @@ service.admin.port = 50102

generic.config.service {
document.store {
appName = hypertrace-config-service-local
appName = config-service-config-test

Choose a reason for hiding this comment

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

Suggested change
appName = config-service-config-test
appName = config-service-test

@@ -5,7 +5,7 @@ service.admin.port = 50102

generic.config.service {
document.store {
appName = hypertrace-config-service-local
appName = config-service-config-local

Choose a reason for hiding this comment

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

Suggested change
appName = config-service-config-local
appName = config-service-local

dataStoreType = {{ $dst }}
appName = {{ .Values.configServiceConfig.name }}

Choose a reason for hiding this comment

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

This should be the service name and not the config name. Could you please introduce a separate section called service under value.yaml and add the name there to reference it?

Copy link

github-actions bot commented Oct 17, 2024

Test Results

134 tests  ±0   134 ✅ ±0   1m 2s ⏱️ ±0s
 31 suites ±0     0 💤 ±0 
 31 files   ±0     0 ❌ ±0 

Results for commit 0d9a060. ± Comparison against base commit 470c0a2.

♻️ This comment has been updated with latest results.

@Vaibhav090420
Copy link
Contributor Author

regarding this https://github.com/hypertrace/config-service/pull/243#pullrequestreview-2374555340, all the
aggregate() / search() are in try-with-resource block already

Copy link

@suresh-prakash suresh-prakash left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@suresh-prakash
Copy link

Please verify as the wiki suggests once the changes are live.

@Vaibhav090420 Vaibhav090420 merged commit 8335b93 into main Oct 17, 2024
9 checks passed
@Vaibhav090420 Vaibhav090420 deleted the ENG-50204 branch October 17, 2024 12:00
@hypertrace hypertrace deleted a comment from mihirgt Oct 22, 2024
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.

3 participants