-
-
Notifications
You must be signed in to change notification settings - Fork 195
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: add studio-version
param to studio URL to address cache issues
#1182
fix: add studio-version
param to studio URL to address cache issues
#1182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
/au |
src/models/Studio.ts
Outdated
wsServer.on('close', (socket: any) => { | ||
sockets.splice(sockets.findIndex(s => s === socket)); | ||
}); | ||
|
||
server.listen(port, () => { | ||
const url = `http://localhost:${port}?liveServer=${port}`; | ||
const url = `http://localhost:${port}?liveServer=${port}&_sv=${studioVersion}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure this is a solution? In linked issue nobody specified that 1.4.0
of CLI was used, and older version did not have latest studio
also where is this _sv
param coming from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's not the most exciting solution, but we should find a way to completely disable the browser cache in the local HTTP server we are using to start Studio.
The issue happens for new CLI versions, even though we have the latest studio version.
_sv
-> studio version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh crap 🤔
ok, so _sv
has no meaning for studio really, it is just a hack to force "refresh".
I think it is good, also useful as it informs what studio version you are using.
This is why, what about using full name for the query param? so it is immediately clear what that is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@derberg done, you take a look?
81b11cd
to
03a0ce8
Compare
Quality Gate passedIssues Measures |
studio-version
param to studio URL to address cache issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea 👏🏼
/rtm |
🎉 This PR is included in version 1.5.15 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes #1098
Note: The browser might cache old studio version that doesn't support 3.0.0