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

fix(backend): Update backend common code and integration tests with updated API Service Params #10640

Merged
merged 5 commits into from
Apr 3, 2024

Conversation

gmfrasca
Copy link
Member

Description of your changes:
Fixes #10629 , Supercedes #10631

The 2.1.0 release updated the API Generator, which in turn updated the signature/names of most of the *Params APIs. This PR refactors all instances to use the newly generated naming schema

Checklist:

… Params

Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
Copy link

Hi @gmfrasca. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@Tomcli Tomcli left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@Tomcli
Copy link
Member

Tomcli commented Mar 28, 2024

Thanks @gmfrasca, seems like the integration test is passed but the upgrade test is failing. Feel free to let us know if you are blocked by anything in the ci/cd.

@Tomcli
Copy link
Member

Tomcli commented Mar 28, 2024

/cc @chensun

@gmfrasca
Copy link
Member Author

gmfrasca commented Mar 29, 2024

Update:

So both tests are failing due to an issue with unexpected responses (see example error printout[1]). I tried tracing the error flow and while doing so noticed that the available schemes were reduced from http AND https to simply http (see example change in DefaultSchemes for various *_client.go, such as backend/api/v1beta1/go_http_client/experiment_client/experiment_client.go). These were generated via protobuf so I'm not entirely sure where that is specified but my suspicion is that this may be the root cause of the integration test failures (since they are using live connections/traffic while backend unit tests are not)

[1] errortext:

Failed to list experiments. Raw error from the service: Issue calling the service. Use the '--debug' flag to see the HTTP request/response. Raw error from the client: invalid character 'C' looking for beginning of value

- **NOTE**: this was manually updated, tested, and verified locally
            uploading for CI check
- It appears when regenerating the backend API, something in the
  generation libraries changed and now default the scheme to just
  http, not http+https, which appears to break tests.
- Need to figure out what options to provide api generators to revert
  DefaultScheme to include https again automatically

Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
@gmfrasca
Copy link
Member Author

gmfrasca commented Apr 2, 2024

/hold

Tested manually updating the DefaultScheme and Scheme values as I suspected in previous message. Local testing is promising, so pushing a WIP commit to see how CI fares.

If it passes we need to figure out how to make sure API Generation includes the option

Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
@gmfrasca
Copy link
Member Author

gmfrasca commented Apr 3, 2024

alright, looks like all CI is passing as hoped, with just a very minor expected syntax update made. :)

Given that, I did some more digging and found a change in grpc-gateway[1] that makes the schemes spec default to emptyset ([]) rather than ["http", "https"], so perhaps that's the root cause be it grpc-gateway or go-swagger making accommodations because of that change (although with the versions pinned I'm not sure how the behavior managed to change here). So with that said, updating the base .protos to include schemes: ["http", "https"] and running the generator appears to correctly generate the rest of the files.

The following commit will have these changes made, but my testing infra has hibernated for the night so this is a shot in the dark that CI remains passing. Assuming it does, I believe this PR is ready for final review and can be unblocked.

[1] grpc-ecosystem/grpc-gateway@7dddcb1

Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
@rimolive
Copy link
Member

rimolive commented Apr 3, 2024

@Tomcli @chensun Can you please review?

Copy link
Member

@Tomcli Tomcli left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Member

@chensun chensun left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thank you, @gmfrasca!

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chensun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@chensun
Copy link
Member

chensun commented Apr 3, 2024

/unhold

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.

[bug] Integration test failed after the 2.1.0 release commit
4 participants