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

Handle the renaming of programs, services and structs. #12

Closed
wants to merge 4 commits into from

Conversation

AlexisMontagne
Copy link
Member

The thrift * namespace and service name has became a crucial part of our infrastructure as it is used in the service discovery process. We lost the ability to reshuffle/rename our interface repo.

This PR aims at providing a way to handle gracefully the change of namespace or service name.

This adds two directives to the thrift grammar

1 - previously_known_as

The entire program as been renamed

namespace * foo.v1.bar

previously_known_as foo.bar

service Buz {}

It means that our SD system will be called for foo.v1.bar.Buz first and if no match is found, foo.bar.Buz will be inquired

2 - @previously_known_as

Only a service or a struct has been moved

namespace * foo.v1.bar

service Baz {}

@previously_known_as{namespace="foo.bar",name="Buzz"}
service Buz {}

It allows finer grained control over the rewrite.

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.

2 participants