-
Notifications
You must be signed in to change notification settings - Fork 0
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
Live Stream Lambda Output During Execution #406
Merged
Merged
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1949694
Progress update
f657dd9
Status update
145060b
Save progress
6771f8a
Added tailing output option to Monaco and made it so that it stops ta…
b93d03e
Added ability to debug prod Lambdas as well
d86aa20
Added loading spinner and disable the execute button while the Code B…
d260285
Removed .bind(this)
709fd84
Changes for readability
3ce408e
Refactored function for tailing monaco editor
0287bba
S T Y L E C H A N G E S
7eb191f
Making things more functional
108d75a
Moved function from run-lambda.ts
6606d46
Used unwrapJson
f431442
Factored out websocket stuff from main.ts
1cc92bb
Changed function name and changed function design
27879fa
Fixed extraneous root store accesses
12d6203
Fixed mistake with previous commit
8d749da
Added support for detecting a timeout while running the editor
ac7ba2b
Merge branch 'master' into websocket-live-debugging
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import VueNativeSock from 'vue-native-websocket'; | ||
import { RootState } from '@/store/store-types'; | ||
import { Vue, VueConstructor } from 'vue/types/vue'; | ||
import { Store } from 'vuex'; | ||
|
||
export function setupWebsocketVuePlugin(Vue: VueConstructor, store: Store<RootState>) { | ||
const websocketEndpoint = | ||
`${process.env.VUE_APP_API_HOST}`.replace('https://', 'wss://').replace('http://', 'ws://') + | ||
'/ws/v1/lambdas/livedebug'; | ||
|
||
const mutations = { | ||
SOCKET_ONOPEN: 'runLambda/SOCKET_ONOPEN', | ||
SOCKET_ONCLOSE: 'runLambda/SOCKET_ONCLOSE', | ||
SOCKET_ONERROR: 'runLambda/SOCKET_ONERROR', | ||
SOCKET_ONMESSAGE: 'runLambda/SOCKET_ONMESSAGE', | ||
SOCKET_RECONNECT: 'runLambda/SOCKET_RECONNECT', | ||
SOCKET_RECONNECT_ERROR: 'runLambda/SOCKET_RECONNECT_ERROR' | ||
}; | ||
|
||
Vue.use(VueNativeSock, websocketEndpoint, { | ||
store: store, | ||
reconnection: true, | ||
mutations: mutations | ||
}); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not actionable feedback on this code and solely an anecdote about this:
I'm not crazy stoked about keeping track of this state in this component, but at the same time I understand why this makes sense to do. Longer term, we'll have to think about how we want to hold state for the editors. Would be nice to have this in the store (especially for debugging). But that's not easy to solve. So I'm fine with this living here for now until we have a better story around how to keep track of Monaco state.
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.
Worth making an issue for maybe?