GitHub error reporting #46
Draft
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.
Goal: add another option for error reporting in the workstation
In the workstation, we currently provide error reporting (automatic and user-driven) via email, in our case, to JIRA. This works in the cloud and the thick client. This may not be as useful for other installations outside Janelia. Even within Janelia, we are gradually shifting away from JIRA use.
GitHub is the de facto default issue tracker that everyone has easy access to. This set of changes implements error reporting to a GitHub issue tracker as an option for the workstation. The existing email reporting is not removed and is still the default option.
The feature is working in my hands on my machine, but I need help with getting configuration of the properties files working, especially in the cloud. The same branch name (
github-error-reporting) is used in this repo as well asjacs-cmandhortacloud-website. The branches are up to date with approx. v9.21.These pull requests in the other repos just contain a link back to this pull request:
Implementation
Basically I created a
GitHubRestClientwhich provides the same interface as the existingMailHelper, and I generalized all the sources of error reports to be able to feed either one.Access is controlled via a fine-grained personal access token to a GitHub repo created for this purpose (not the main code repo, for various reasons). This has to be created by an appropriate GitHub account, either a service account or a developer account.
Two features of GitHub create slight annoyances. First, issue text limits makes it impossible to include our system logs in-line. Second, the GitHub API inexplicably doesn't allow the creation of attachments on issues at all, even though that's an option for a human in the web UI. As a result, the system log is instead uploaded as a file on a branch in the repo, and a link is created in a comment on the issue.
Configuration
Error reporting is entirely client-side, controlled through values in
console.properties. Values can be fed in the same way they are for email reporting. The new values look like this (excerpt fromclient.propertiesinjacs-cm):I will provide a URL and token for testing in Slack.
See
ErrorReporting.mdinhortacloud-websiteon thegithub-error-reportingbranch for more details.Testing
If you put the above lines in
my.properties(with values) and build, it will report errors to the given repository.I'm not set up to test how the values are passed along for either the thick client build or cloud deployment. I've made a start of it in
jacs-cm, but this needs someone else to finish it up and test it.Deployment
After merging but before deployment, we'll need to create and configure a GitHub repository for errors. We'll need to decide which GitHub account to use and generate the token. I can do the work once those decisions are made.
Deployment probably needs its own tracking issue and checklist, once the code is ready.