GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat: configuration for custom temporary file paths by StevenCurran · Pull Request #340 · grafana/pyroscope-java Conversation
|
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| private static final String PYROSCOPE_HTTP_HEADERS = "PYROSCOPE_HTTP_HEADERS"; | ||
| private static final String PYROSCOPE_TENANT_ID = "PYROSCOPE_TENANT_ID"; | ||
| private static final String PYROSCOPE_PROFILE_EXPORT_TIMEOUT = "PYROSCOPE_PROFILE_EXPORT_TIMEOUT"; | ||
| private static final String PYROSCOPE_JFR_DIR = "PYROSCOPE_JFR_DIR"; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Should this be called PYROSCOPE_TMP_DIR ? since it is used for both JFR and jar files
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
3e9d69d to
c7ea30a
Compare
There was an error while loading. Please reload this page.
d9319b7 to
4be8edd
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@korniltsev-grafanista let me know how this looks |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| private String basicAuthUser; | ||
| private String basicAuthPassword; | ||
| private String jfrProfilerSettings; | ||
| private String tmpDir; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
please annotate tmp dir fields and args as Nullable where appropriate. I know its not done for all the fields, but I think it improves readability
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| this.format = config.format; | ||
|
|
||
| if (format == Format.JFR && null == tempJFRFile) { | ||
| if (config.tmpDir != null && config.tmpDir.contains(",")) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
move this validation to config builder routines
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm with few nits
thanks
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Signed commits reportAll 1 commit between |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
cc7ecd6 to
4b71396
Compare
There was an error while loading. Please reload this page.
Sorry for delay, addressed and push. lmk if all good. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
please take a look at #340 (comment) report, it looks valid to me.
otherwise lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
4b71396 to
94bf6d6
Compare
Updated addressing this, with a test too. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| try { | ||
| resolved = Paths.get(tmpDir).toAbsolutePath().toString(); | ||
| } catch (java.nio.file.InvalidPathException e) { | ||
| resolved = tmpDir; // invalid path is caught later in TmpFileUtil |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I dont understand, why do we swallow it here and resurface somewhere else?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done, fixed when Path
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| public final String APExtraArguments; | ||
| public final String basicAuthUser; | ||
| public final String basicAuthPassword; | ||
| public final @Nullable String tmpDir; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
can we make it Path ?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| return createTempFile(config.tmpDir, "pyroscope", ".jfr"); | ||
| } | ||
|
|
||
| public static File createTempFile(String dir, String prefix, String suffix) throws IOException { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
94bf6d6 to
3591c20
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3591c20. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
3591c20 to
cad5b10
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Last request. All contributions are required to sign their commits with gpg/ssh
https://community.grafana.com/t/action-required-signed-commits-mandatory-for-all-grafana-repositories/163404
I can't merge without this
Sorry, something went wrong.
There was an error while loading. Please reload this page.
1a87637 to
d501ac8
Compare
…ncludes bootstream jar, and the .jfr files created by the agent delegates. Signed commit
d501ac8 to
f6dbc2c
Compare
I squashed the commits and sorted out the GPG key, commit is showing verified now! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.