Skip to content
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

Improve issue template #485

Merged
merged 7 commits into from
Aug 26, 2024
Merged

Improve issue template #485

merged 7 commits into from
Aug 26, 2024

Conversation

adombeck
Copy link
Contributor

@adombeck adombeck commented Aug 21, 2024

Adds a comment to show all relevant system information and makes various minor improvements. See commit messages for details.

UDENG-4099

@adombeck
Copy link
Contributor Author

adombeck commented Aug 21, 2024

reviewer: You can try the new template by creating an issue in my authd fork: https://github.com/adombeck/authd/issues/new/choose

@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.79%. Comparing base (17530d2) to head (a64a3db).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #485      +/-   ##
==========================================
- Coverage   84.94%   84.79%   -0.15%     
==========================================
  Files          79       79              
  Lines        6927     6927              
  Branches       75       75              
==========================================
- Hits         5884     5874      -10     
- Misses        728      733       +5     
- Partials      315      320       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adombeck adombeck marked this pull request as ready for review August 22, 2024 12:33
@adombeck adombeck requested a review from a team as a code owner August 22, 2024 12:33
Copy link
Collaborator

@jibel jibel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I tried in a terminal in a desktop session. It works.
However over SSH without a graphical session, the script fails with the following error

/usr/bin/xdg-open: 882: www-browser: not found
/usr/bin/xdg-open: 882: links2: not found
/usr/bin/xdg-open: 882: elinks: not found
/usr/bin/xdg-open: 882: links: not found
/usr/bin/xdg-open: 882: lynx: not found
/usr/bin/xdg-open: 882: w3m: not found

but for the moment, lets merge this and improve later with a script.

@adombeck
Copy link
Contributor Author

However over SSH without a graphical session, the script fails with the following error

Ah, good catch! I'm not sure what's the best way to handle that. Maybe check if $DISPLAY is set and if it's not, use $EDITOR to open the file?

@jibel
Copy link
Collaborator

jibel commented Aug 22, 2024

However over SSH without a graphical session, the script fails with the following error

Ah, good catch! I'm not sure what's the best way to handle that. Maybe check if $DISPLAY is set and if it's not, use $EDITOR to open the file?

You could replace if command -v xdg-open > /dev/null; then xdg-open "$TMPFILE"; else $EDITOR "$TMPFILE"; fi by editor

It'll open nano by default but it shouldn't be a problem since the command has to be executed from a terminal.

@adombeck
Copy link
Contributor Author

You could replace if command -v xdg-open > /dev/null; then xdg-open "$TMPFILE"; else $EDITOR "$TMPFILE"; fi by editor

I think that using a graphical editor when in a graphical session is better UX. We could replace $EDITOR with editor though.

@adombeck
Copy link
Contributor Author

With the change I just pushed, it now uses xdg-open only if $DESKTOP is set, else it uses $EDITOR if set, else it uses editor.

@jibel
Copy link
Collaborator

jibel commented Aug 22, 2024

With the change I just pushed, it now uses xdg-open only if $DESKTOP is set, else it uses $EDITOR if set, else it uses editor.

Thanks for this update, it works well. More hint that we need a script to collect these data :)

@adombeck
Copy link
Contributor Author

I noticed that xdg-open && rm caused a race, because xdg-open returns immediately after spawning the process, so sometimes the file was removed before it was being opened by the editor. I pushed a fixup commit which omits the rm, so that the tmpfile is now kept in /tmp. IMO that's not too bad, but another reason to replace the command with a script soon.

It currently doesn't provide a useful and well-formatted report. We want
to provide a command in the GitHub template instead to gather relevant
system information.

refs: #470
We want to simplify the issue template to make it easier to fill out.
I expect these checkboxes to not provide useful information in addition
to the issue description, so lets try removing them.
The main purpose of looking at the troubleshooting page is to help the
user to solve their issue themselves. If they are able to do that, they
don't need to fill out the rest of the form, so lets point to the
troubleshooting doc at the top.

The troubleshooting doc also explains how to enable debug logging. We
could also ask our users to do that and try to reproduce the issue with
debug logging, but that might be asking a bit much for non-technical
users, and is often not necessary to solve the issue, so lets instead
ask for that in a comment when we ascertain that we do need debug logs.
To make it easier for the user to provide all the information we want.

This includes some rudimentary redaction of UUIDs like the issuer URL
and client ID.
We are trying to make the issue template easier to fill out. While steps
to reproduce are often very useful, there are issues which they don't
really apply to, or are not necessary. Lets try to make them not
required and see how it turns out.
@adombeck adombeck merged commit a90c893 into main Aug 26, 2024
5 checks passed
@adombeck adombeck deleted the 470-improve-issue-template branch August 26, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants