-
Notifications
You must be signed in to change notification settings - Fork 19
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
Grafonnet: fix python run #644
Conversation
@@ -288,7 +288,7 @@ jobs: | |||
ELASTICSEARCH_USER: ${{ secrets.PERF_ELASTICSEARCH_USER }} | |||
ELASTICSEARCH_PASSWORD: ${{ secrets.PERF_ELASTICSEARCH_PASSWORD }} | |||
run: | | |||
python "$GITHUB_WORKSPACE"/benchmark_runner/grafana/update_versions_main_libsonnet.py | |||
PYTHONPATH=. python benchmark_runner/grafana/update_versions_main_libsonnet.py |
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 guaranteed to be chdir'd to $GITHUB_WORKSPACE at this point? If so, OK, otherwise I would add
cd "$GITHUB_WORKSPACE"
prior to this.
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.
Updated "$GITHUB_WORKSPACE"
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.
@RobertKrawitz, pls let me know that its ok
9b416fe
to
0f3175e
Compare
@@ -288,7 +288,7 @@ jobs: | |||
ELASTICSEARCH_USER: ${{ secrets.PERF_ELASTICSEARCH_USER }} | |||
ELASTICSEARCH_PASSWORD: ${{ secrets.PERF_ELASTICSEARCH_PASSWORD }} | |||
run: | | |||
python "$GITHUB_WORKSPACE"/benchmark_runner/grafana/update_versions_main_libsonnet.py | |||
PYTHONPATH=. python "$GITHUB_WORKSPACE"/benchmark_runner/grafana/update_versions_main_libsonnet.py |
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.
PYTHONPATH=. refers to the current directory. If you're cd'ed into /tmp, say, everything will be referenced relative to /tmp.
A better way to write it would be
cd "$GITHUB_WORKSPACE" && PYTHONPATH=. benchmark_runner/grafana/update_versions_main_libsonnet.py
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.
Agreed, fixed.
0f3175e
to
1c09703
Compare
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.
looks good
1c09703
to
e6aa348
Compare
Type of change
Note: Fill x in []
Description
Fix Python run issue by adding
PYTHONPATH=.
before running python scriptFor security reasons, all pull requests need to be approved first before running any automated CI