Project

General

Profile

Actions

Bug #79654

closed
NM NM

crash module - prune_detail doesn't prun crashes correctly

Bug #79654: crash module - prune_detail doesn't prun crashes correctly

Added by Nitzan Mordechai 3 months ago. Updated 2 months ago.

Status:
Pending Backport
Priority:
Normal
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
umbrella, tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

in the prune_detail function we are doing:

 def prune_detail(ls: List[str]) -> int:
            num = len(ls)
            if num > 30:
                ls = ls[0:30]
                ls.append('and %d more' % (num - 30))
            return num

prune_detail rebinds its local ls to a truncated slice, but never returns it
only num (the count) comes back. Since Python list slicing creates a new object rather than mutating in place,
the caller's daemon_detail/module_detail never actually gets truncated. detail always ends up with the full, unbounded list.

NM Updated by Nitzan Mordechai 3 months ago Actions #1

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 71181

NM Updated by Nitzan Mordechai 3 months ago Actions #2

  • Assignee set to Nitzan Mordechai

YH Updated by Yaarit Hatuka 3 months ago Actions #3

  • Backport set to umbrella, tentaclell

UB Updated by Upkeep Bot 3 months ago Actions #4

Redmine Upkeep failure

The redmine-upkeep.py script failed to update this issue. I have added the flag "upkeep-failed" to avoid looking at this issue again.

Please manually fix the issue and remove "upkeep-failed" flag to allow future upkeep operations.

Transformation

The script was in the create_backports transformation.

Update Log

https://github.com/ceph/ceph/actions/runs/35290768497

Error

Redmine Update failed:

Traceback (most recent call last):
  File "/home/runner/work/ceph/ceph/ceph/src/script/redmine-upkeep.py", line 1162, in _transform_create_backports
    other = self.R.issue.create(**create_args)
  File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/redminelib/managers/base.py", line 187, in create
    response = self.redmine.engine.request(self.resource_class.http_method_create, url, data=request)
  File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/redminelib/engines/base.py", line 83, in request
    return self.process_response(self.session.request(method, url, **kwargs))
  File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/redminelib/engines/base.py", line 178, in process_response
    raise exceptions.ValidationError(', '.join(': '.join(e) if isinstance(e, list) else e for e in errors))
redminelib.exceptions.ValidationError: Ceph release is not included in the list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/ceph/ceph/ceph/src/script/redmine-upkeep.py", line 1168, in _transform_create_backports
    other = self.R.issue.create(**create_args)
  File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/redminelib/managers/base.py", line 187, in create
    response = self.redmine.engine.request(self.resource_class.http_method_create, url, data=request)
  File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/redminelib/engines/base.py", line 83, in request
    return self.process_response(self.session.request(method, url, **kwargs))
  File "/opt/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/site-packages/redminelib/engines/base.py", line 178, in process_response
    raise exceptions.ValidationError(', '.join(': '.join(e) if isinstance(e, list) else e for e in errors))
redminelib.exceptions.ValidationError: Ceph release is not included in the list

Update Payload

{
    "issue": {
        "custom_fields": [
            {
                "id": 33,
                "value": "30cdc47cdee8acd1a6698d02079b95e490ec5d15" 
            },
            {
                "id": 34,
                "value": "v21.3.0-3415-g30cdc47cde" 
            },
            {
                "id": 37,
                "value": "2026-09-18T00:22:15+00:00" 
            }
        ],
        "status_id": 14
    },
    "suppress_mail": "1" 
}

NM Updated by Nitzan Mordechai 2 months ago Actions #5

  • Backport changed from umbrella, tentaclell to umbrella, tentacle

NM Updated by Nitzan Mordechai 2 months ago Actions #6

  • Status changed from Fix Under Review to Pending Backport
Actions

Also available in: PDF Atom