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(client): the online evaluation is accessible behind the proxy sub-path #3083

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

jialeicui
Copy link
Contributor

@jialeicui jialeicui commented Dec 15, 2023

Description

demo: http://jialei.pre.intra.starwhale.ai/projects/1/jobs/8/servings

Bug reason: the front end can not access the assets and the APIs if the server is behind the proxy sub-path

I have implemented a simple string replacement on the client side to achieve the effects of injecting global variables and modifying asset paths.
I did not use templates like Jinja2 because once templates are used, the client/index.html file can no longer be used for debugging and packaging with Vite.

Modules

  • UI
  • Controller
  • Agent
  • Client
  • Python-SDK
  • Others

Checklist

  • run code format and lint check
  • add unit test
  • add necessary doc

@jialeicui jialeicui added bug 🐛 Something isn't working client 🌈 labels Dec 15, 2023
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0273514) 82.69% compared to head (4bc12eb) 91.58%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3083      +/-   ##
============================================
+ Coverage     82.69%   91.58%   +8.88%     
============================================
  Files           571      138     -433     
  Lines         31789    16141   -15648     
  Branches       1873       61    -1812     
============================================
- Hits          26287    14782   -11505     
+ Misses         4681     1357    -3324     
+ Partials        821        2     -819     
Flag Coverage Δ
console 72.09% <ø> (ø)
controller ?
standalone 91.84% <100.00%> (+0.01%) ⬆️
unittests 91.58% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@anda-ren anda-ren self-requested a review December 18, 2023 08:21
Copy link
Member

@anda-ren anda-ren left a comment

Choose a reason for hiding this comment

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

LGTM

@jialeicui jialeicui merged commit 9fadc21 into star-whale:main Dec 18, 2023
38 checks passed
@jialeicui jialeicui deleted the fix-root branch December 18, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working client 🌈
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants