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

Update yeti analyzer #2930

Merged
merged 11 commits into from
Oct 10, 2023
Merged

Update yeti analyzer #2930

merged 11 commits into from
Oct 10, 2023

Conversation

tomchop
Copy link
Collaborator

@tomchop tomchop commented Oct 9, 2023

Update the Yeti analyzer to use the v2 API that will be released soon.

Checks

  • All tests succeed.
  • Unit tests added.
  • e2e tests added.
  • Documentation updated.

@tomchop tomchop marked this pull request as ready for review October 9, 2023 16:32
@tomchop tomchop requested review from berggren and jkppr October 9, 2023 16:32
Copy link
Contributor

@berggren berggren left a comment

Choose a reason for hiding this comment

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

Overall looks good. Just a couple of quick questions

Comment on lines +38 to +39
self.yeti_api_root = root
self.yeti_web_root = root.replace("/api/v2", "")
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this is to support old configurations?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah this is to ensure that it's easier to maintain future versions of the Yeti API.

self.yeti_web_root = current_app.config.get("YETI_API_ROOT")
self.yeti_web_root.replace("/api", "")
root = current_app.config.get("YETI_API_ROOT")
if root.endswith("/"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this handled at the Yeti web layer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but it's to avoid sending queries like /api/v2//blah. It also depends on how people have their webserver setup, I suppose.

Copy link
Collaborator

@jkppr jkppr left a comment

Choose a reason for hiding this comment

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

looking good

@jkppr jkppr merged commit c1a4e9f into google:master Oct 10, 2023
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants