Whitelist metadata field "ShutdownProgress"



4 years ago
4 years ago


(Reporter: Yoric, Assigned: peterbe)



Firefox Tracking Flags

(Not tracked)


Bug 1038342 will introduce a metadata field "ShutdownProgress". This should show up on the webapp and be searchable in the API.

ShutdownProgress contains a simple string, e.g.

Comment 1

4 years ago
Adrian, what needs to be done on the Super Search for this?
Flags: needinfo?(adrian)
Here is the process to add a new field to Super Search:

1. Go to the admin panel for Super Search fields
2. Click "Create a new field" in the top-right corner
3. Fill in the form. For example, for this ShutdownProgress field, values would be:
* Name = shutdown_progress
* Namespace = raw_crash
* Name in database = ShutdownProgress
* Description = some text to describe this field
* Query type = enum
* Data type = enum
* Permissions needed = none
* Form field choices = none
* Is exposed = yes
* Is returned = yes
* Has full version = no
* Storage mapping = {"type": "string"}
4. Click "Create" to add this field to the database

Important: it is necessary to first create or edit a field on stage, because that allows you to test the field creation and the values without impacting production, and also because that ensures every time someone does change a field, the change happens the same on stage and prod. To verify the new field was created and works as expected, load Super Search and use that field (as a filter, but also as a displayed column and as a facet). 

There is documentation for the master list of field here: http://socorro.readthedocs.org/en/latest/elasticsearch.html#master-list-of-fields

Peter, do you want to give it a go? I'd be happy to know that someone else knows how to use that UI.
Flags: needinfo?(adrian) → needinfo?(peterbe)

Comment 3

4 years ago
We long ago/for a long time talked about moving the list of whitelisted keywords to a database instead of being hardcoded in the python code. With SuperSearch you've already achieved this. Should we perhaps try to leverage that in the models.py? I'm interested in helping/making this happen but I now fear I've lost understanding how this actually works in supersearch. 

For now I'm going to take care of it by following your steps and doing the necessary pull request.
Assignee: nobody → peterbe
Flags: needinfo?(peterbe)

Comment 4

4 years ago
* Done on stage SuperSearch admin
* PR https://github.com/mozilla/socorro/pull/2315

To do:
* Merge PR
* Do on prod SuperSearch admin

Comment 5

4 years ago
Commits pushed to master at https://github.com/mozilla/socorro

bug 1057319 - Whitelist metadata field "ShutdownProgress"

Merge pull request #2315 from peterbe/bug-1057319-whitelist-metadata-field-shutdownprogress

bug 1057319 - Whitelist metadata field "ShutdownProgress"

Comment 6

4 years ago
I'm going leave this open until we actually have this value in a raw crash on stage and it confirmed that it works on the report index page *and* in the SuperSearch.


4 years ago
Target Milestone: --- → 100
Does this mean that we do not have a single raw crash with ShutdownProgress?
Flags: needinfo?(peterbe)

Comment 8

4 years ago
(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #7)
> Does this mean that we do not have a single raw crash with ShutdownProgress?

Do you know a raw crash where you expect it to appear? Then we can check that the whitelisting is working.
Flags: needinfo?(peterbe)

Comment 9

4 years ago
I notice now that I haven't added it on prod's Super Search fields yet.

Comment 10

4 years ago
The field is now available in the Super Search in prod. 

Let's do this; there's nothing else for me or you to do so let's resolve it as fixed. Once we see it in action, on prod, we'll change it to verified.
Last Resolved: 4 years ago
Resolution: --- → FIXED
I can cause a crash with this field, if you need it for testing.

Comment 12

4 years ago
(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #11)
> I can cause a crash with this field, if you need it for testing.

Yes please. That would be useful.
You need to log in before you can comment on or make changes to this bug.