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

Add logfile size upload limit to the reportportal plugin #3199

Merged
merged 5 commits into from
Nov 21, 2024
Merged

Conversation

kkaarreell
Copy link
Collaborator

@kkaarreell kkaarreell commented Sep 9, 2024

Pull Request Checklist

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

@happz
Copy link
Collaborator

happz commented Sep 9, 2024

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.

@kkaarreell kkaarreell force-pushed the ks_rp_limit branch 3 times, most recently from 556a7d5 to 6445517 Compare September 9, 2024 15:11
@kkaarreell kkaarreell marked this pull request as ready for review September 9, 2024 15:25
@kkaarreell kkaarreell force-pushed the ks_rp_limit branch 2 times, most recently from ec94f05 to 6ec0722 Compare September 12, 2024 07:06
@happz happz added the plugin | reportportal The reportportal report plugin label Sep 24, 2024
@happz happz added this to the 1.37 milestone Sep 24, 2024
@happz happz added the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Sep 24, 2024
@psss psss changed the title reportportal: add logfile size upload limit Add logfile size upload limit to the reportportal plugin Sep 24, 2024
Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this! Looks good, only we should also update the schema to add the newly supported option. Also, it might be worth at least a short release note?

tmt/steps/report/reportportal.py Outdated Show resolved Hide resolved
@psss psss removed the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Sep 24, 2024
@kkaarreell kkaarreell force-pushed the ks_rp_limit branch 5 times, most recently from 4b3b9d8 to 5f1ba96 Compare October 16, 2024 07:22
@kkaarreell
Copy link
Collaborator Author

@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 kkaarreell requested a review from psss October 16, 2024 07:22
@happz happz added the ci | full test Pull request is ready for the full test execution label Oct 22, 2024
@thrix thrix modified the milestones: 1.38, 1.39 Oct 25, 2024
@happz
Copy link
Collaborator

happz commented Nov 14, 2024

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.

@kkaarreell
Copy link
Collaborator Author

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.

@martinhoyer martinhoyer self-requested a review November 19, 2024 10:19
@seberm seberm self-requested a review November 19, 2024 11:51
@psss psss merged commit 58a548b into main Nov 21, 2024
22 checks passed
@psss psss deleted the ks_rp_limit branch November 21, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci | full test Pull request is ready for the full test execution plugin | reportportal The reportportal report plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants