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

Repair OLIAPI #1512

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open

Conversation

adam-a-a
Copy link
Contributor

@adam-a-a adam-a-a commented Oct 30, 2024

Fixes/Resolves:

OLI API stopped working.

Summary/Motivation:

Users were no longer able to get back OLI calculations. We were able to log in, generate a DBS file, and that was about it. The issue came down to an additional forward slash used in one of the URLs, which previously worked.

EDIT: Subsequently, CI checks were failing as well, while local tests were passing. This PR also addresses those issues.

Changes proposed in this PR:

  • revise url
  • one other catch for handling results
  • revise test code to prevent CI check failure, including use of refresh token after oli login, and running checks sequentially in ci repo (thanks @lbianchi-lbl for editing the workflow)

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@lbianchi-lbl
Copy link
Contributor

The OLI API CI failures are not entirely reproducible. @adam-a-a will reach out to OLI to investigate this.

@lbianchi-lbl lbianchi-lbl added Priority:Normal Normal Priority Issue or PR Priority:High High Priority Issue or PR and removed Priority:Normal Normal Priority Issue or PR labels Oct 31, 2024
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 10 lines in your changes missing coverage. Please review.

Project coverage is 94.26%. Comparing base (53bd64e) to head (faf0d10).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
watertap/tools/oli_api/client.py 52.94% 8 Missing ⚠️
watertap/tools/oli_api/credentials.py 75.00% 1 Missing ⚠️
watertap/tools/oli_api/flash.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1512      +/-   ##
==========================================
+ Coverage   93.56%   94.26%   +0.70%     
==========================================
  Files         281      283       +2     
  Lines       30111    30920     +809     
==========================================
+ Hits        28173    29148     +975     
+ Misses       1938     1772     -166     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ElmiraShamlou ElmiraShamlou 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
Contributor

@MarcusHolly MarcusHolly left a comment

Choose a reason for hiding this comment

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

LGTM, but CodeCov is failing mostly as a result of the new logger and error messages being untested

@@ -102,6 +103,7 @@ def __init__(
:param access_keys: list of access keys generated by user
:param test: bool switch for automation during tests
:param interactive_mode: bool to switch level of logging display from info to debug only
:param refresh: bool to use refresh token in login method
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this refresh actually do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:High High Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants