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

Reinstate tags-as-metadata adding option to merge tags. Fixes #699 #700

Closed

Conversation

lucasoares
Copy link

@lucasoares lucasoares commented Jan 20, 2021

Hello.

See #699 and linked issues for more information.

This is my first PR into spring-cloud-consul. To be honest I didn't explore the project due to lack of time so I wanted to make the few changes as possible. Please let me know if there is anything to change.

I also didn't had time to configure checkstyle so I will wait for for CI results.

Just saw I authored commits using another user account. My bad.

Thanks.

@lucasoares lucasoares force-pushed the reinstate-metadata-699 branch from f8d3e46 to 8e10f73 Compare January 20, 2021 04:10
@lucasoares lucasoares changed the title Reinstate tags-as-metadata adding option to merge metadata. Fixes #699 Reinstate tags-as-metadata adding option to merge tags. Fixes #699 Jan 20, 2021
Copy link
Member

@spencergibb spencergibb left a comment

Choose a reason for hiding this comment

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

If you look at 2a667f48e0dcb665886b85796597ff947f181bba055c1216d573b68cb3764a8c, f672845 and 6485240 there is some more to do to get back to parity (though merged rather than replaced).

* Enable merge consul tag data with metadata to create service instance (defaults
* to false).
*/
private boolean enableTagMerge = false;
Copy link
Member

Choose a reason for hiding this comment

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

rename to mergeTagsEnabled

Copy link
Author

@lucasoares lucasoares Feb 2, 2021

Choose a reason for hiding this comment

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

ok


import static org.springframework.cloud.consul.discovery.ConsulServerUtils.findHost;

public class ConsulServiceInstance extends DefaultServiceInstance {

private HealthService healthService;

public ConsulServiceInstance(HealthService healthService, String serviceId) {
Copy link
Member

Choose a reason for hiding this comment

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

This is a public API so existing constructor signatures will need to remain with a default value.

Copy link
Author

Choose a reason for hiding this comment

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

There is already a constructor with default merge value as false.

I just moved the default constructor to be the first in the file.

@lucasoares lucasoares marked this pull request as draft February 2, 2021 23:10
@lucasoares
Copy link
Author

If you look at 2a667f48e0dcb665886b85796597ff947f181bba055c1216d573b68cb3764a8c, f672845 and 6485240 there is some more to do to get back to parity (though merged rather than replaced).

Looking into it.

I will remove draft status when ready.

@spencergibb on f672845 we should set both tags and metadata if the merge is enabled? Because before we had a property for tags or metadata. Now we have a property for tags and metadata. What I should do?

@spencergibb
Copy link
Member

Yes, I think it should be a merge.

@spencergibb spencergibb linked an issue Mar 12, 2021 that may be closed by this pull request
@spencergibb
Copy link
Member

@lucasoares any chance to update this?

@lucasoares
Copy link
Author

@lucasoares any chance to update this?

Hello @spencergibb.

Unfortunately, I had no time to check it. I will try to get back to it this weekend.

@lucasoares
Copy link
Author

Closing in favor of #775

@lucasoares lucasoares closed this Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider reinstating tags-as-metadata option
3 participants