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: introduce our own cors proxy for git import to fix 403 errors on isometric git cors proxy #924

Merged
merged 3 commits into from
Jan 5, 2025

Conversation

wonderwhy-er
Copy link
Collaborator

@wonderwhy-er wonderwhy-er commented Dec 28, 2024

Reason for change:

Exploring adding error messages and import progress to git import after this issue was reported
#903

Noticed that we get 403 errors from isometric git cors proxy

Also was bothered by lack of errors or progress dialog when loading.

2025-01-01.20-38-28.mp4

Changes:

  • Git Proxy: Implemented a custom /api/git-proxy proxy to deal with cors proxy errors for git import operations and replace isometric git one we used before, should solve 403 issues we are getting
  • Added better error handling and loading overlay progress dialog to indicate import being in progress

@wonderwhy-er wonderwhy-er changed the title Exploration of improving git import fix: introduce our own cors proxy for git import to fix 403 errors on isometric git cors proxy Jan 1, 2025
@wonderwhy-er
Copy link
Collaborator Author

Ok. Seems that cors proxy works now, we could probably use it for other needs as well later so may be I should rename it just to cors proxy.

Tested that git import does work with it.
Need to make more trough out testing.

I also added bunch of code to try and make some progress and error visuals
Needs more work but I will probably remove it for now as it should stabilize git import and fix those 403 errors.

And thoughts @thecodacus and @emcconnell before I do cleanups?

@emcconnell emcconnell marked this pull request as ready for review January 2, 2025 16:37
@emcconnell emcconnell marked this pull request as draft January 2, 2025 16:38
@emcconnell
Copy link
Collaborator

Looks good. I already approved lol. I could go either way on @thecodacus comment. Not sure without looking how many places we call already. Could be good if we add more options in the future.

@wonderwhy-er
Copy link
Collaborator Author

I will need to cleanup and simplify counting part.
Proxy, popup and error handling us here.
I did want to show progress but it came out bit complex. Will cleanup soon.

Just wanted you guys to test git import using our own proxy.
I only tested with github

@emcconnell
Copy link
Collaborator

I will need to cleanup and simplify counting part. Proxy, popup and error handling us here. I did want to show progress but it came out bit complex. Will cleanup soon.

Just wanted you guys to test git import using our own proxy. I only tested with github

I can test tonight

@wonderwhy-er wonderwhy-er marked this pull request as ready for review January 3, 2025 17:42
@wonderwhy-er
Copy link
Collaborator Author

wonderwhy-er commented Jan 3, 2025

Pushed cleanup to remove counters for now
Read for review and merge

@wonderwhy-er
Copy link
Collaborator Author

Hmm, need to investigate but may be private repos import does not work anymore
Its actually kinda scary that we are sending github passwords trough isomorhic git corsp roxy :D

@emcconnell
Copy link
Collaborator

@wonderwhy-er looks like you may still be working on this, so I will wait to test.

@thecodacus
Copy link
Collaborator

will test today

@wonderwhy-er
Copy link
Collaborator Author

Hmm, made locally version that falls back to original proxy if import failed and it still fails to import private repo with username/password 🤷

@thecodacus
Copy link
Collaborator

Hmm, made locally version that falls back to original proxy if import failed and it still fails to import private repo with username/password 🤷

yes github does not allow username/password on git server if 2fa is enabled which they have made mandatory now.
so PAT is the only way to import private repo

@thecodacus thecodacus merged commit b1f9380 into stackblitz-labs:main Jan 5, 2025
4 checks passed
przbadu added a commit to przbadu/bolt.diy that referenced this pull request Jan 6, 2025
* Fixed console error for SettingsWIndow & Removed ts-nocheck where not needed

* fix: added wait till terminal prompt for bolt shell execution

* removed logs

* add/toc-for-readme

added a TOC for the README file, renamed some headings to better suite the TOC

* Update README.md

* feat: added terminal error capturing and automated fix prompt

* add: xAI grok-2-1212 model

* feat: Data Tab

Removed Chat History Tab
Added Data Tab
Data tab can export and delete chat history, import API keys, import and export settings

* Update DataTab.tsx

* feat: improved providers list style

made the list 2 columns wide and separate out the experimental providers

* fixed API Key import

* updated styling wordings and animations icons

* updated title header

* docs: updated setup guide to have more detailed instructions

* updated some text

* chore: update commit hash to 95dbcf1

* chore: update commit hash to de64007

* chore: update commit hash to 381d490

* chore: update commit hash to a53b10f

* Update ProvidersTab.tsx

* Update ProvidersTab.tsx

* chore: update commit hash to 75ec49b

* docs: updated style in faq

updated style in FAQ docs to be an accordion like style
added a TOC to the index page in the docs

* chore: update commit hash to 636f87f

* docs: updated Contributing

updated Contributing in the docs
updated Contributing and FAQ in the GitHub part as well

* docs: added info on updating using docker

Added docker-compose --profile development up --build  to the update section

* docs: added info on the Releases Page

Added the option to download from the Releases Page instead of git clone in the README

* docs: added info on both ways to set api keys

* chore: update commit hash to ab5cde3

* refactor: updated vite config to inject add version metadata into the app on build (stackblitz-labs#841)

* refactor: removes commit.json and used vite.config to load these variables

* updated precommit hook

* updated the pre start script

* updated the workflows

* ci: updated the docs ci to only trigger if any files changed in the docs folder (stackblitz-labs#849)

* docs: updated download link (stackblitz-labs#850)

* fix: add Message Processing Throttling to Prevent Browser Crashes (stackblitz-labs#848)

* fix hotfix for version metadata issue (stackblitz-labs#853)

* refactor:  refactored LLM Providers: Adapting Modular Approach (stackblitz-labs#832)

* refactor: Refactoring Providers to have providers as modules

* updated package and lock file

* added grok model back

* updated registry system

* ignored alert on project reload

* updated read me

* fix: provider menu dropdown fix (ghost providers) (stackblitz-labs#862)

* better osc code cleanup

* fix: ollama provider module base url hotfix for docker (stackblitz-labs#863)

* fix: ollama base url hotfix

* cleanup logic

* docs: updated env.example of OLLAMA & LMSTUDIO base url (stackblitz-labs#877)

* correct OLLAMA_API_BASE_URL

* correct OLLAMA_API_BASE_URL

* correct OLLAMA_API_BASE_URL

* fix: check for updates does not look for commit.json now (stackblitz-labs#861)

* feat: add Starter template menu in homepage (stackblitz-labs#884)

* added icons and component

* updated unocss to add dynamic icons

* removed temp logs

* updated readme

* feat: catch errors from web container preview and show in actionable alert so user can send them to AI for fixing (stackblitz-labs#856)

* Catch errors from web container

* Show fix error popup on errors in preview

* Remove unneeded action type

* PR comments

* Cleanup urls in stacktrace

---------

Co-authored-by: Anirban Kar <thecodacus@gmail.com>

* ci: improved change-log generation script and cleaner release ci action (stackblitz-labs#896)

* build: improved-changelog

* added a better change log script

* improved changelog script

* improved change log script

* fix: detect and remove markdown block syntax that llms sometimes hallucinate for file actions (stackblitz-labs#886)

* Clean out markdown syntax

* Remove identation removal

* Improve for streaming

* feat: redact file contents from chat and put latest files into system prompt  (stackblitz-labs#904)

* feat: added Automatic Code Template Detection And Import (stackblitz-labs#867)

* initial setup

* updated template list

* added optional switch to control this feature

* removed some logs

* fix: import folder filtering

* fix: add defaults for LMStudio to work out of the box (stackblitz-labs#928)

* feat: added hyperbolic llm models (stackblitz-labs#943)

* Added Hyperbolic Models

* Fix: Fixed problem in connecting with hyperbolic models

* added dynamic models for hyperbolic

* removed logs

* fix: refresh model list after api key changes (stackblitz-labs#944)

* fix: better model loading ui feedback and model list update (stackblitz-labs#954)

* fix: better model loading feedback and model list update

* added load on providersettings  update

* fix: updated logger and model caching minor bugfix #release (stackblitz-labs#895)

* fix: updated logger and model caching

* usage token stream issue fix

* minor changes

* updated starter template change to fix the app title

* starter template bigfix

* fixed hydretion errors and raw logs

* removed raw log

* made auto select template false by default

* more cleaner logs and updated logic to call dynamicModels only if not found in static models

* updated starter template instructions

* browser console log improved for firefox

* provider icons fix icons

* chore: release version 0.0.4

* fix: hotfix auto select starter template works without github token #release (stackblitz-labs#959)

* fix: hotfix starter template fix, updated header link to use navigate

* template auth fix

* updated changelog script

* chore: release version 0.0.5

* fix: show warning on starter template failure and continue (stackblitz-labs#960)

* Update hyperbolic.ts

Changed updated Hyperbolic Settings link

* fix: introduce our own cors proxy for git import to fix 403 errors on isometric git cors proxy (stackblitz-labs#924)

* Exploration of improving git import

* Fix our own git proxy

* Clean out file counting for progress, does not seem to work well anyways

* fix: git private clone with custom proxy (stackblitz-labs#1010)

* cookie fix

* fix: git private clone with custom proxy

* list -fix

* docs: updating copyright in LICENSE (stackblitz-labs#796)

* fix: added XAI to docker config (stackblitz-labs#274)

* commit

* Create .env.example

* Update docker-compose.yaml

---------

Co-authored-by: Anirban Kar <thecodacus@gmail.com>

* ci: docker Image creation pipeline (stackblitz-labs#1011)

* Create docker.yaml

* Add build target

* Use build target var

* Use github token instead

---------

Co-authored-by: kris1803 <kristiansstraume17@gmail.com>
Co-authored-by: Anirban Kar <thecodacus@gmail.com>
Co-authored-by: Dustin Loring <dustinwloring1988@gmail.com>
Co-authored-by: GK <gokul@aospa.co>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cole Medin <cole@dynamous.ai>
Co-authored-by: Eduard Ruzga <wonderwhy.er@gmail.com>
Co-authored-by: Alex Parker <128879861+Soumyaranjan-17@users.noreply.github.com>
Co-authored-by: Juan Manuel Campos Olvera <juan4106@hotmail.com>
Co-authored-by: Arsalaan Ahmed <147995884+Ahmed-Rahil@users.noreply.github.com>
Co-authored-by: Gaurav-Wankhede <73575353+Gaurav-Wankhede@users.noreply.github.com>
Co-authored-by: Siddarth <pullakhandam.siddartha@gmail.com>
Co-authored-by: twsl <45483159+twsl@users.noreply.github.com>
JJ-Dynamite pushed a commit to val-x/valenClient that referenced this pull request Jan 9, 2025
… isometric git cors proxy (stackblitz-labs#924)

* Exploration of improving git import

* Fix our own git proxy

* Clean out file counting for progress, does not seem to work well anyways
@bearea
Copy link

bearea commented Jan 10, 2025

could refer this to fix own npm registry?

timoa pushed a commit to timoa/bolt.diy that referenced this pull request Jan 21, 2025
… isometric git cors proxy (stackblitz-labs#924)

* Exploration of improving git import

* Fix our own git proxy

* Clean out file counting for progress, does not seem to work well anyways
JJ-Dynamite pushed a commit to val-x/valenClient that referenced this pull request Jan 29, 2025
… isometric git cors proxy (stackblitz-labs#924)

* Exploration of improving git import

* Fix our own git proxy

* Clean out file counting for progress, does not seem to work well anyways
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.

4 participants