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

[BUGFIX] Redirect slash when defining ARGILLA_BASE_URL #5796

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

frascuchon
Copy link
Member

Description

Closes #5792

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • I confirm My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@@ -171,7 +171,7 @@ def create_server_app() -> FastAPI:
# This if-else clause is needed to simplify the test dependency setup. Otherwise, we cannot override dependencies
# easily. We can review this once we have separate fastapi application for the api and the webapp.
if settings.base_url and settings.base_url != "/":
_app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None, redirect_slashes=False)
_app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None, redirect_slashes=True)

Choose a reason for hiding this comment

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

Great! I think this has been the culprit for some of the HF Space errors.

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.94%. Comparing base (308b852) to head (f765144).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5796      +/-   ##
===========================================
- Coverage    91.97%   91.94%   -0.04%     
===========================================
  Files          161      161              
  Lines         6928     6927       -1     
===========================================
- Hits          6372     6369       -3     
- Misses         556      558       +2     
Flag Coverage Δ
argilla-server 91.94% <100.00%> (-0.04%) ⬇️

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.

@burtenshaw
Copy link
Contributor

Nice! This should help out @aleksvercau

Copy link
Contributor

@burtenshaw burtenshaw left a comment

Choose a reason for hiding this comment

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

LGTM

@frascuchon frascuchon merged commit 105888a into develop Jan 28, 2025
6 checks passed
@frascuchon frascuchon deleted the bugfixes/redirect-slashes branch January 28, 2025 11:41
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.

[BUG-python/deployment] deploying on DNS with prefix
3 participants