Skip to content

api: tools/docs to support v2 freeze, v4alpha cut.#10636

Merged
htuch merged 9 commits intoenvoyproxy:masterfrom
htuch:v4alpha-upgrade-tools
Apr 7, 2020
Merged

api: tools/docs to support v2 freeze, v4alpha cut.#10636
htuch merged 9 commits intoenvoyproxy:masterfrom
htuch:v4alpha-upgrade-tools

Conversation

@htuch
Copy link
Copy Markdown
Member

@htuch htuch commented Apr 3, 2020

This patch introduces the tools/docs for a new flow for protoxform: freeze.
This performs a major version freeze and bump by modifying
package_version_status. Tooling now needs to deal with 3 possible versions (v2,
v3, v4alpha). The following contributions are made in the patch:

  • Tooling added to support v2 APIs freeze, transitioning v3 to active
    and generating v4alpha.
  • A new tool, merge_active_shadow.py, is introduced to combine hand-edited
    active v3 API protos with the v2 implied shadows for deprecated fields.
  • The type database now spans v2 and v3 (and implied v4alpha files).
  • api_proto_plugins can now take extra args on the Bazel CLI; this is
    used to plumb in the freeze arg to protoxform.
  • Docs are updated to reflect the v3 flow that developers should now
    follow.

Part of #10355

This is the tools/docs component of #10601. See #10601 for the resulting
API protos generated by a freeze/fix cycle.

Risk level: Low (tooling only, no API changes yet)
Testing: new golden protos tests for protoxform, unit tests for merge_active_shadow.

Signed-off-by: Harvey Tuch htuch@google.com

This patch introduces the tools/docs for a new flow for protoxform: freeze.
This performs a major version freeze and bump by modifying
package_version_status. Tooling now needs to deal with 3 possible versions (v2,
v3, v4alpha). The following contributions are made in the patch:

* Tooling added to support v2 APIs freeze, transitioning v3 to active
  and generating v4alpha.
* A new tool, merge_active_shadow.py, is introduced to combine hand-edited
  active v3 API protos with the v2 implied shadows for deprecated fields.
* The type database now spans v2 and v3 (and implied v4alpha files).
* api_proto_plugins can now take extra args on the Bazel CLI; this is
  used to plumb in the freeze arg to protoxform.
* Docs are updated to reflect the v3 flow that developers should now
  follow.

Part of envoyproxy#10355

This is the tools/docs component of envoyproxy#10601. See envoyproxy#10601 for the resulting
API protos generated by a freeze/fix cycle.

Risk level: Low (tooling only, no API changes yet)
Testing: new golden protos tests for protoxform, unit tests for merge_active_shadow.

Signed-off-by: Harvey Tuch <htuch@google.com>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #10636 was opened by htuch.

see: more, trace.

mattklein123
mattklein123 previously approved these changes Apr 3, 2020
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

I skimmed, but I understand at a high level and this LGTM. Amazing work!

@repokitteh-read-only repokitteh-read-only bot removed the api label Apr 3, 2020
Copy link
Copy Markdown
Member

@lizan lizan left a comment

Choose a reason for hiding this comment

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

Thanks, this is great! Just minor comments.

htuch added 3 commits April 5, 2020 20:44
Signed-off-by: Harvey Tuch <htuch@google.com>
…ools

Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
mattklein123
mattklein123 previously approved these changes Apr 6, 2020
Signed-off-by: Harvey Tuch <htuch@google.com>
@htuch
Copy link
Copy Markdown
Member Author

htuch commented Apr 6, 2020

@cpakulski thanks for #10667, this is now added to the updated instructions in this PR.

Signed-off-by: Harvey Tuch <htuch@google.com>
@repokitteh-read-only repokitteh-read-only bot removed the api label Apr 6, 2020
@mattklein123
Copy link
Copy Markdown
Member

Merge master to fix CI?

/wait

@htuch htuch merged commit de222c3 into envoyproxy:master Apr 7, 2020
@htuch htuch deleted the v4alpha-upgrade-tools branch April 7, 2020 00:32
htuch added a commit to htuch/envoy that referenced this pull request Apr 7, 2020
This patch performs a major version freeze and bump by modifying
package_version_status, using the tooling developed in envoyproxy#10636.
Specifically:

* v2 APIs are frozen (except for where they are the latest in their
  package history and still active)
* v3 APIs are transitioned to be active
* Candidate v4alpha APIs are generated (not used by Envoy yet)

Fixes envoyproxy#10355

Risk level: medium (entire API's files are modified, visually verified
to ensure things look sane, all tests pass)
Testing: CI

Signed-off-by: Harvey Tuch <htuch@google.com>
htuch added a commit that referenced this pull request Apr 7, 2020
This patch performs a major version freeze and bump by modifying
package_version_status, using the tooling developed in #10636.
Specifically:

v2 APIs are frozen (except for where they are the latest in their
package history and still active)
v3 APIs are transitioned to be active
Candidate v4alpha APIs are generated (not used by Envoy yet)
Fixes #10355

Risk level: medium (entire API's files are modified, visually verified
to ensure things look sane, all tests pass)
Testing: CI

Signed-off-by: Harvey Tuch <htuch@google.com>
srcs = [
"active_non_terminal.proto",
"active_terminal.proto",
"frozen.proto",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

None of the previous 3 proto source files exist. This breaks compilation of //tools/...

@repokitteh-read-only repokitteh-read-only bot added v2-freeze deps Approval required for changes to Envoy's external dependencies labels Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deps Approval required for changes to Envoy's external dependencies v2-freeze

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants