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

Implement Azure-compliant governance interface #5660

Merged
merged 79 commits into from
Sep 27, 2023

Conversation

eddyashton
Copy link
Member

@eddyashton eddyashton commented Sep 18, 2023

Resolves #5211.

Initial open comment:
This contains some TODOs highlighting behaviour changes that may need discussing, or tracking in issues.

This implements a new API for governance, matching a TypeSpec source located here. Behaviourally this is very similar to member_frontend.h, but extracted for clarity and with manual construction of responses to try and make API-compliance explicit. Unlike other frontends, the endpoints here are registered by several independent static functions rather than directly in the Registry constructor. This is to confirm that such a code division is viable, and an attempt to mirror the source TypeSpec layout to aid conformance validation.

The current testing is incomplete. A few end-to-end tests of the governance API have new _az_api variants, which use the new APIs when calling anything in member.py. There are many other tests that call endpoints directly, so I'll look at wrapping those separately. There's likely some improvement in naming/access of this variant test too. For now we want to test both APIs, but we will shortly deprecate the old API and then be able to convert most testing to this replacement API.

A remaining axis for testing is how closely this aligns to the TypeSpec/OpenAPI - I think the correct way to do that is with a generated autorest client, but current testing suggests that's surprisingly lax on response schema validation. I'll explore this separately.

eddyashton added 30 commits May 18, 2023 12:58
@eddyashton eddyashton marked this pull request as ready for review September 27, 2023 10:11
@eddyashton eddyashton requested a review from a team September 27, 2023 10:11
src/node/gov/README.md Outdated Show resolved Hide resolved
@achamayou achamayou merged commit 88cb1ea into microsoft:main Sep 27, 2023
@eddyashton eddyashton added auto-backport Automatically backport this PR to LTS branch 4.x-todo PRs which should be backported to 4.x labels Oct 4, 2023
@ghost
Copy link

ghost commented Oct 4, 2023

💔 All backports failed

Status Branch Result
release/4.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

backport --pr 5660

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

achamayou pushed a commit to achamayou/CCF that referenced this pull request Oct 17, 2023
(cherry picked from commit 88cb1ea)

# Conflicts:
#	CMakeLists.txt
#	src/node/rpc/member_frontend.h
#	src/node/share_manager.h
#	src/service/genesis_gen.h
#	tests/infra/clients.py
#	tests/requirements.txt
@achamayou achamayou added backported This PR was successfully backported to LTS branch auto-backport Automatically backport this PR to LTS branch 4.x-todo PRs which should be backported to 4.x and removed backported This PR was successfully backported to LTS branch auto-backport Automatically backport this PR to LTS branch 4.x-todo PRs which should be backported to 4.x labels Oct 17, 2023
@ghost
Copy link

ghost commented Oct 17, 2023

💔 All backports failed

Status Branch Result
release/4.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

backport --pr 5660

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

achamayou pushed a commit to achamayou/CCF that referenced this pull request Oct 18, 2023
(cherry picked from commit 88cb1ea)

# Conflicts:
#	CMakeLists.txt
#	tests/infra/clients.py
#	tests/requirements.txt
@achamayou achamayou added the backported This PR was successfully backported to LTS branch label Oct 18, 2023
achamayou added a commit that referenced this pull request Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x-todo PRs which should be backported to 4.x auto-backport Automatically backport this PR to LTS branch backported This PR was successfully backported to LTS branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New governance service endpoints
2 participants