@@ -127,7 +127,7 @@ class Groups(BaseListPrimitive):
127
127
INHIBITOR = 'inhibitor'
128
128
# This is used for framework error reports
129
129
# Reports indicating failure in actors should use the FAILURE group
130
- ERROR = 'error'
130
+ _ERROR = 'error'
131
131
FAILURE = 'failure'
132
132
ACCESSIBILITY = 'accessibility'
133
133
AUTHENTICATION = 'authentication'
@@ -189,7 +189,11 @@ def __init__(self, *args, **kwargs):
189
189
190
190
# To allow backwards-compatibility with previous report-schema
191
191
# Groups that match _DEPRECATION_FLAGS will be shown as flags, the rest as tags
192
- _DEPRECATION_FLAGS = [Groups .INHIBITOR , Groups .FAILURE , Groups .ERROR ]
192
+ _DEPRECATION_FLAGS = [Groups .INHIBITOR , Groups .FAILURE ]
193
+
194
+ # NOTE(mmatuska): this a temporary solution until Groups._ERROR in the json report-schema
195
+ # is altered to account for this addition of Groups_ERROR
196
+ _UPCOMING_DEPRECATION_FLAGS = [Groups ._ERROR ]
193
197
194
198
195
199
class Key (BasePrimitive ):
@@ -383,9 +387,9 @@ def _create_report_object(entries):
383
387
entry .apply (report )
384
388
385
389
if Groups .INHIBITOR in report .get ('groups' , []):
386
- if Groups .ERROR in report .get ('groups' , []):
390
+ if Groups ._ERROR in report .get ('groups' , []):
387
391
# *error != inhibitor*
388
- msg = ('Only one of Groups.ERROR and Groups.INHIBITOR can be set at once.'
392
+ msg = ('Only one of Groups._ERROR and Groups.INHIBITOR can be set at once.'
389
393
' Maybe you were looking for Groups.FAILURE?' )
390
394
raise ValueError (msg )
391
395
@@ -394,9 +398,9 @@ def _create_report_object(entries):
394
398
# Currently we know that 'flags' does not exist otherwise so it's
395
399
# safe to just set it
396
400
report ['flags' ] = [Groups .INHIBITOR ]
397
- if Groups .ERROR in report .get ('groups' , []):
401
+ if Groups ._ERROR in report .get ('groups' , []):
398
402
# see above for explanation
399
- report ['flags' ] = [Groups .ERROR ]
403
+ report ['flags' ] = [Groups ._ERROR ]
400
404
401
405
return Report (report = report )
402
406
@@ -449,7 +453,7 @@ def create_report_from_error(error_dict):
449
453
Summary (error .details or "" ),
450
454
Severity ('high' ),
451
455
Audience ('sysadmin' ),
452
- Groups ([Groups .ERROR ])
456
+ Groups ([Groups ._ERROR ])
453
457
]
454
458
report = _create_report_object (entries )
455
459
return json .loads (report .dump ()['report' ])
0 commit comments