forked from tilt-dev/tilt-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a tilt_inspector extension that lets you navigate internal tilt s…
…tate (tilt-dev#166)
- Loading branch information
Showing
11 changed files
with
3,243 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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,24 @@ | ||
# Tilt Inspsector | ||
|
||
Author: [Nick Santos](https://github.com/nicks) | ||
|
||
A small debugging server for viewing internal Tilt state. | ||
|
||
## Functions | ||
|
||
### tilt_inspector(port: int = 11350) | ||
|
||
Exposes a tilt inspector server at the given port. | ||
|
||
## Example Usage | ||
|
||
``` | ||
load('ext://tilt_inspector', 'tilt_inspector') | ||
tilt_inspector() | ||
``` | ||
|
||
## Other notes | ||
|
||
Requires yarn/nodejs. | ||
|
||
One tilt inspector server can inspect arbitrarily many tilt instances. |
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,18 @@ | ||
# -*- mode: Python -*- | ||
|
||
_dir = os.getcwd() | ||
|
||
def tilt_inspector(port=11351): | ||
# The tilt:inspector resource is currently a local server installed + run | ||
# with Yarn. | ||
# | ||
# Ideally, it would be a docker container, but that would require some | ||
# networking tricks to get the process in the container talking to Tilt. | ||
local_resource( | ||
name="tilt:inspector", | ||
deps=[], | ||
cmd='cd %s && yarn install' % _dir, | ||
serve_env={'TILT_INSPECTOR_PORT': '%d' % port}, | ||
serve_cmd='cd %s && yarn run tilt-inspector' % _dir, | ||
readiness_probe=probe(http_get=http_get_action(port=port)), | ||
links=['http://localhost:%d/' % port]) |
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,6 @@ | ||
{ | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"@tilt.dev/tilt-inspector": "0.1.5" | ||
} | ||
} |
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,3 @@ | ||
load('../Tiltfile', 'tilt_inspector') | ||
|
||
tilt_inspector() |
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,7 @@ | ||
#!/bin/bash | ||
|
||
cd $(dirname $0) | ||
|
||
set -ex | ||
tilt ci | ||
tilt down --delete-namespaces |
Oops, something went wrong.