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

api: include v1alpha1 in proto_sync.py #9175

Merged
merged 4 commits into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion tools/proto_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ def SyncV3Alpha(cmd, src_labels):
continue
# Skip unversioned package namespaces. TODO(htuch): fix this to use the type
# DB and proper upgrade paths.
if 'v2' in dst:
if 'v1' in dst:
dst = re.sub('v1alpha\d?|v1', 'v3alpha', dst)
SyncProtoFile(cmd, src, dst)
elif 'v2' in dst:
dst = re.sub('v2alpha\d?|v2', 'v3alpha', dst)
SyncProtoFile(cmd, src, dst)
elif 'envoy/type/matcher' in dst:
Expand Down
2 changes: 2 additions & 0 deletions tools/type_whisperer/typedb_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# Regexes governing v3alpha upgrades. TODO(htuch): The regex approach will have
# to be rethought as we go beyond v3alpha, this is WiP.
TYPE_UPGRADE_REGEXES = [
(r'(envoy[\w\.]*\.)(v1alpha\d?|v1)', r'\1v3alpha'),
(r'(envoy[\w\.]*\.)(v2alpha\d?|v2)', r'\1v3alpha'),
# These are special cases, e.g. upgrading versionless packages.
('envoy\.type\.matcher', 'envoy.type.matcher.v3alpha'),
Expand All @@ -22,6 +23,7 @@

# As with TYPE_UPGRADE_REGEXES but for API .proto paths.
PATH_UPGRADE_REGEXES = [
(r'(envoy/[\w/]*/)(v1alpha\d?|v1)', r'\1v3alpha'),
(r'(envoy/[\w/]*/)(v2alpha\d?|v2)', r'\1v3alpha'),
# These are special cases, e.g. upgrading versionless packages.
('envoy/type/matcher', 'envoy/type/matcher/v3alpha'),
Expand Down