~pieq/oem-qa-autosummary:fix-lp1935771-new-bugs-mutable-default-args

Last commit made on 2021-07-12
Get this branch:
git clone -b fix-lp1935771-new-bugs-mutable-default-args https://git.launchpad.net/~pieq/oem-qa-autosummary
Only Pierre Equoy can upload to this branch. If you are Pierre Equoy please log in for upload directions.

Branch merges

Branch information

Name:
fix-lp1935771-new-bugs-mutable-default-args
Repository:
lp:~pieq/oem-qa-autosummary

Recent commits

748f6dd... by Pierre Equoy

Ensure `created_before` data is evaluated every time a summary is created

Python's default arguments are evaluated once when the function is
defined, not each time the function is called:

https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments

Because of this, the argument `created_before` in the `get_new_bugs()`
method was always set to the date when it was called for the first time.
After a while, users would not get the exepcted results, since most new
bugs would have been created after this date, and would be ignored by
autosummary.

LP: #1935771

a3d68bd... by Pierre Equoy

Merge #404498 from ~stanley31/oem-qa-autosummary:add_logging

add logging into the front-end and back-end script.

728d0b2... by StanleyHuang

Add logging for flask and backend function

- Uses default logger to adding logs
- Defined a unify logger formater, logging function would works under
flask or gunicorn

60c47da... by Pierre Equoy

Merge #403106 from oem-qa-autosummary:fix-1928768-reports-lists

d997144... by Pierre Equoy

fix: make sure to send lists to Jinja template for reports and hardware

hardware, full_test_reports and stress_test_reports are obtained using
the get() method on an HTML form, so by default they return an empty
string.

When generating the summary report, send lists instead of potentially
empty strings in order to prevent concatenating str and list in the
Jinja templates.

Perform additional stripping to make sure we ignore lines with spaces
only and to remove un-necessary spaces on non-empty lines.

LP: #1928768

e2affba... by Pierre Equoy

fix: format using black

989ad27... by Pierre Equoy

autosummary: Send status result to the Auto Test Status Tracker webapp

Once the summary is generated, there is now a button at the bottom of
the summary page to send the data over to the Auto Test Status Tracker
webapp. If everything goes fine, the page is refreshed with a link to go
check the status record.

c2324d9... by Nara Huang

Exclude checkbox-related bugs from autosummary report

33f3b5d... by Nara Huang

Modify pip to pip3 in README of autosummary

8536785... by Pierre Equoy

autosummary: New page to manually input image name if release e-mail not found

Auto-Summary looks for a mail.content file in the project milestone's
oem-share directory. If found, it uses it to extract image name and
sha256 sum.

Thanks to this commit, if mail.content is not found, a new page is shown
to the user to let him/her manually input an image name. Auto-summary
then goes to check if there is an appropriate sha256sum file for it, and
generates the report if all is good.

Note: mail.content should *always* be there, but we encountered cases
where it was not, ergo this commit.