tmt icon indicating copy to clipboard operation
tmt copied to clipboard

Add logfile size upload limit to the `reportportal` plugin

Open kkaarreell opened this issue 1 year ago • 2 comments

Pull Request Checklist

  • [ ] implement the feature
  • [ ] modify the json schema
  • [ ] include a release note

kkaarreell avatar Sep 09 '24 08:09 kkaarreell

Would it be useful to submit at least an abridged version of the log, with the "too long, had to cut" header? With the proposed code, user gets a note and nothing more, while even a shortened log might bring at least some value.

happz avatar Sep 09 '24 09:09 happz

Missing schema update, release note, open question, moving to 1.38.

psss avatar Oct 01 '24 18:10 psss

@psss @happz @martinhoyer Hi, I did some updates in the script so please review it whether it makes sense. I have decided to introduce separate limit for traceback log as this is the input for RP AutoAnalysis and I believe that it doesn't make sense to match 1MB logs.

kkaarreell avatar Oct 16 '24 07:10 kkaarreell

Rebased & moved release note where it belongs.

In f617cb31, I tried to switch from int to tmt.hardware.Size which should be the language to use when speaking about amounts of data. Out of the box, it should allow users to use whatever input they wish, as long as it specifies an amount of data (--log-size-limit 1GB, log-size-limit: 7 MiB, log-size-limit: 1024 bytes, ...) & plugin does not need to worry about conversions and printing, Pint takes care of everything as long as we 1. convert to same base when needed (.to('bytes')) and 2. use .magnitude when needed.

@kkaarreell I tried to test it a bit, let me know what do you think.

Edit: still testing, it wasn't ready.

happz avatar Nov 14 '24 16:11 happz

Rebased & moved release note where it belongs.

In f617cb3, I tried to switch from int to tmt.hardware.Size which should be the language to use when speaking about amounts of data. Out of the box, it should allow users to use whatever input they wish, as long as it specifies an amount of data (--log-size-limit 1GB, log-size-limit: 7 MiB, log-size-limit: 1024 bytes, ...) & plugin does not need to worry about conversions and printing, Pint takes care of everything as long as we 1. convert to same base when needed (.to('bytes')) and 2. use .magnitude when needed.

@kkaarreell I tried to test it a bit, let me know what do you think.

Edit: still testing, it wasn't ready.

Sounds great. I will try to test it as well later this week.

kkaarreell avatar Nov 19 '24 09:11 kkaarreell