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

Bug 1923923 - Allow creation or update (annotation) of an internal issue #8532

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

vrigal
Copy link
Collaborator

@vrigal vrigal commented Feb 27, 2025

No description provided.

@vrigal vrigal marked this pull request as draft February 27, 2025 16:42
@vrigal
Copy link
Collaborator Author

vrigal commented Feb 27, 2025

This is still a Work In Progress, the below screenshot shows the design I had in mind.
I assumed that the button on the left allows to open an internal issue form (with only summary field) or eventually annotate in case some issue exist with the same summary (this is handled by the backend automatically).
If the number of occurrences > 3, the usual button to open an bug in bugzilla is enabled at the right of the internal issue suggestion.
@Archaeopteryx if you have any suggestion, or idea about this it would help me going on with the implementation.

Screenshot 2025-02-27 - internal issue

@Archaeopteryx
Copy link
Collaborator

In the current design, the user has to focus on two things:

  • match failure line against an appropriate bug: focus is near the start of the line to the left
  • check if a bug needs to be filed (occurrence count, new bug button): focus is to the right
    While the first action should be done first, there is a risk the pin button to the left is used without checking the occurrence count. Suggestion: Keep everything to the left with a line like this
<pin button>i<internal issue count> (<occurrence/classification count><pin icon, not a button, title to explain this as count of already existing classifications>) internal issue summary <button to force filing a bug>
  • An attempt to use an internal issue and create its third classification should open the bug filer.
  • The structured log needs to be linked in the bug filer UI because the dialog is modal and often more information is needed from the log. Else the users need to close the dialog, open the log, and attempt again to classify it (and retrigger the bugfiler prompt).

@vrigal vrigal force-pushed the create-internal-issue branch 3 times, most recently from adafa57 to ea5686b Compare March 7, 2025 16:33
@vrigal vrigal force-pushed the create-internal-issue branch from ea5686b to 249a4f0 Compare March 10, 2025 12:18
@vrigal
Copy link
Collaborator Author

vrigal commented Mar 10, 2025

I'm actually stuck by an obscure JS error (that seems related to webpack build & react) that happens while submitting the form (when user is logged on treeherder):

Objects are not valid as a React child (found: object with keys {}). If you meant to render a collection of children, use an array instead.

@Archaeopteryx does that mean anything to you?
I still need to patch JS tests failures, then we should be done. I suggest doing the internal/bugzilla issue merge in another PR.

@Archaeopteryx
Copy link
Collaborator

Objects are not valid as a React child (found: object with keys {}). If you meant to render a collection of children, use an array instead.

Could this be the callback which currently adds the bug number returned by the bug filer to the pinboard?

@vrigal vrigal force-pushed the create-internal-issue branch from 249a4f0 to aa737b2 Compare March 14, 2025 10:37
@vrigal
Copy link
Collaborator Author

vrigal commented Mar 14, 2025

I recorded a video using the UI to create and reference an internal issue: https://github.com/user-attachments/assets/ce94f6b0-b2a8-4fba-a5d9-fc24e27cdd13.
It was not easy to record (due to redis cache, login against after a flush, summary matching and existing bugzilla ID…) but shows quite accurately the workflow. Here are the steps:

  1. Log in to Treeherder
  2. Initial internal issue creation (i1940976)
  3. Flush redis cache and display the annotated internal issue
  4. Annotation on another job from the "Pin" button
  5. Annotation directly via the interna ID
  6. Reusing internal issue with a similar summary (on other job)
  7. Flush redis cache, there are 3 occurrences
  8. Opening the bug filer via the bug icon
  9. Opening the bug filer by referencing internal issue with occurrences >= 3

Next (and last for this feature) work is to link a bugzilla ID to the internal issue once it gets creates, then update its attributes when Bugscache is automatically filled.

@vrigal vrigal marked this pull request as ready for review March 14, 2025 16:38
@vrigal vrigal requested a review from a team as a code owner March 14, 2025 16:39
@Archaeopteryx
Copy link
Collaborator

Thank you for the video and the description.

Does a third classification with a bug automatically reopen the bug filer?
Step "6. Reusing internal issue with a similar summary (on other job)" shows the attempt to create a new internal issue which reuses the existing one. Correct?

@vrigal
Copy link
Collaborator Author

vrigal commented Mar 20, 2025

Thank you for the video and the description.

Does a third classification with a bug automatically reopen the bug filer? Step "6. Reusing internal issue with a similar summary (on other job)" shows the attempt to create a new internal issue which reuses the existing one. Correct?

Actually it's the fourth classification that opens the bug filer (which is shown at the end of the video).
This check is based on already fetched suggestions, so it actually only works if the UI know the number of occurrences. I'll patch it so it triggers on the third occurrence. A better approach would be that the backend returns the number of occurrences upon internal issue creation, but in this case the UI would eventually miss the suggestion entry to open the bug filer (or the serializer would also return a suggestion ?).

About step 6, indeed it reuses the existing internal issue, then the UI also create a classification with the selected job.

@vrigal vrigal force-pushed the create-internal-issue branch from 0c877ce to e0dfeb0 Compare March 21, 2025 17:34
@vrigal
Copy link
Collaborator Author

vrigal commented Mar 21, 2025

I rebased this branch, it is fine by me.

I think I reproduced the bug I mentioned on thursday. It only happens with some special summary (e.g. Traceback (most recent call last):), so there should be an explanation somewhere (the internal issue exists but is not listed as a suggestion by the backend).

@Archaeopteryx
Copy link
Collaborator

Getting back to this tomorrow.

@Archaeopteryx
Copy link
Collaborator

Thank you. The changes have been deployed to prototype.

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.

2 participants