-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
feat(event schema) Basic infrastructure to load tpyecheck processor code out of the jsonschema definition. #1192
Changes from all commits
b852ebd
26dd251
3ae5ba4
0d216d8
1354941
0bfb660
f5823b2
9fc5fee
ce6d4e2
d11e6dc
6ada6bf
016323e
fd3d2aa
69c83b1
c9fda8e
5aa582a
d415dc0
117b37d
74afa60
69368b9
e1d7703
c19c91e
bfc8f2f
60e8e50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,15 @@ red="$(tput setaf 1)" | |
bold="$(tput bold)" | ||
reset="$(tput sgr0)" | ||
|
||
# Ensures up to data event schemas are downloaded | ||
mkdir -p schemas | ||
curl https://raw.githubusercontent.com/getsentry/sentry-data-schemas/main/relay/event.schema.json -o schemas/event.schema.json | ||
mypy snuba > /dev/null | ||
if [ $? -gt 1 ]; then | ||
echo [${red}${bold}!!!${reset}] Could not dowload schemas. | ||
fi | ||
Comment on lines
+7
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this just the same as the make step? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pretty much the same (the syntax is different because that one is in a Makefile). I added it in both because this happens automatically and you cannot really easily trigger it by yourself (technically you can execute the hook being it a shell script). The Makefile one is something you can always trigger manually. |
||
|
||
# Ensures migrations are executed | ||
files_changed_upstream="$(mktemp)" | ||
trap "rm -f ${files_changed_upstream}" EXIT | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
[mypy] | ||
plugins = jsonschema_typed.plugin | ||
python_version = 3.8 | ||
ignore_missing_imports = False | ||
|
||
[mypy-_strptime] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
SCHEMAS_REPO='https://github.com/getsentry/sentry-data-schemas.git' | ||
LATEST_VERSION=$(git ls-remote $SCHEMAS_REPO HEAD | awk '{ print $1}') | ||
|
||
REGEX='^git\+https\:\/\/github\.com\/getsentry\/sentry\-data\-schemas\.git\@([a-f0-9]+)\#subdirectory=py' | ||
TEMP='git+https://github.com/getsentry/sentry-data-schemas.git@c123123#subdirectory=py' | ||
|
||
echo $TEMP | sed "s/c([1-f0-9]+)/\$LATEST_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.
What cases is this trying to check?Never mind, figured this one out — a short comment here that explains the significance of the exit code would be useful.