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 reqwest caching images on the playground tests #1228

Merged
merged 1 commit into from
Dec 10, 2024
Merged

Conversation

aaronvg
Copy link
Contributor

@aaronvg aaronvg commented Dec 10, 2024

reqwest caches image requests since the base_url is always empty. Adding the path of the original url into the proxy url fixes it.

Copy link

vercel bot commented Dec 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baml ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 9:40pm

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 8da1d3f in 51 seconds

More details
  • Looked at 142 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. engine/baml-runtime/src/lib.rs:231
  • Draft comment:
    Consider changing the log level to debug or removing this log statement before merging to avoid cluttering production logs. This applies to other similar log statements added in this file.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The logging statements added in the BamlRuntime implementation are useful for debugging but should be removed or changed to a lower log level (e.g., debug) before merging to avoid cluttering the logs in production environments.
2. engine/baml-schema-wasm/src/runtime_wasm/mod.rs:64
  • Draft comment:
    If the wasm_logger initialization breaks logging, consider removing this line entirely to avoid confusion.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The commented-out line for initializing the wasm_logger is noted as potentially breaking logging. If this is the case, it should be removed entirely to avoid confusion.
3. engine/baml-schema-wasm/tests/test_file_manager.rs:227
  • Draft comment:
    Consider removing the commented-out line if it's not needed to keep the test code clean.
  • Reason this comment was not posted:
    Confidence changes required: 30%
    The test function test_run_tests in the wasm test file has a commented-out line for running a test. If this line is not needed, it should be removed to keep the test code clean.

Workflow ID: wflow_yw8TqJvA1lo3htst


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

let request = if let Some(proxy) = proxy_url {
client.get(proxy).header("baml-original-url", url)
client
.get(format!("{}/{}", proxy, url))
Copy link
Contributor

Choose a reason for hiding this comment

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

The URL construction with the proxy might be incorrect. Typically, a proxy URL is used to route requests, not concatenate with the original URL. This could lead to incorrect URL formation.

@aaronvg aaronvg enabled auto-merge December 10, 2024 21:40
@aaronvg aaronvg added this pull request to the merge queue Dec 10, 2024
Merged via the queue into canary with commit 7384ba8 Dec 10, 2024
32 checks passed
@aaronvg aaronvg deleted the proxy-fix branch December 10, 2024 21:43
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.

1 participant