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 platform_id in /errata/all/ endpoint #853

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

bklvsky
Copy link
Contributor

@bklvsky bklvsky commented Jun 5, 2024

@bklvsky bklvsky changed the title Add platform_id in /errata/all/ endpoint (AlmaLinux/build-system#207) Add platform_id in /errata/all/ endpoint Jun 5, 2024
Copy link

github-actions bot commented Jun 5, 2024

73 passed, 11 skipped

Code Coverage Summary

Package Line Rate
alws 76%
alws.auth 77%
alws.auth.oauth 100%
alws.crud 41%
alws.dramatiq 60%
alws.middlewares 93%
alws.perms 86%
alws.routers 57%
alws.schemas 80%
alws.utils 41%
Summary 57% (5671 / 10004)

Linter reports

Pylint report
************* Module alws.crud.errata
alws/crud/errata.py:1:0: C0302: Too many lines in module (1716/1000) (too-many-lines)
alws/crud/errata.py:70:5: W0511: FIXME: ovallib dependency should stay optional (fixme)
alws/crud/errata.py:225:29: W0511: TODO: Add test mapping here (fixme)
alws/crud/errata.py:1335:1: W0511: TODO: Check db_record (fixme)
alws/crud/errata.py:651:29: W1401: Anomalous backslash in string: '\d'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:651:31: W1401: Anomalous backslash in string: '\w'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:651:33: W1401: Anomalous backslash in string: '\-'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:651:35: W1401: Anomalous backslash in string: '\_'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:651:41: W1401: Anomalous backslash in string: '\d'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:651:43: W1401: Anomalous backslash in string: '\.'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:651:45: W1401: Anomalous backslash in string: '\w'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
alws/crud/errata.py:96:0: R0903: Too few public methods (1/2) (too-few-public-methods)
alws/crud/errata.py:159:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:159:0: R0914: Too many local variables (34/15) (too-many-locals)
alws/crud/errata.py:177:4: R1702: Too many nested blocks (7/5) (too-many-nested-blocks)
alws/crud/errata.py:159:0: R0912: Too many branches (46/12) (too-many-branches)
alws/crud/errata.py:159:0: R0915: Too many statements (118/50) (too-many-statements)
alws/crud/errata.py:423:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:423:0: R0912: Too many branches (13/12) (too-many-branches)
alws/crud/errata.py:508:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:508:0: R0914: Too many local variables (25/15) (too-many-locals)
alws/crud/errata.py:631:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:631:0: R0914: Too many local variables (27/15) (too-many-locals)
alws/crud/errata.py:797:11: W0718: Catching too general exception Exception (broad-exception-caught)
alws/crud/errata.py:631:0: R0915: Too many statements (51/50) (too-many-statements)
alws/crud/errata.py:831:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:863:23: E1102: func.count is not callable (not-callable)
alws/crud/errata.py:940:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:940:0: R0914: Too many local variables (25/15) (too-many-locals)
alws/crud/errata.py:1073:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1139:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1203:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1203:0: R0914: Too many local variables (19/15) (too-many-locals)
alws/crud/errata.py:1256:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1386:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1418:15: W0718: Catching too general exception Exception (broad-exception-caught)
alws/crud/errata.py:1446:19: W0718: Catching too general exception Exception (broad-exception-caught)
alws/crud/errata.py:1454:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1503:19: W0718: Catching too general exception Exception (broad-exception-caught)
alws/crud/errata.py:1529:23: W0718: Catching too general exception Exception (broad-exception-caught)
alws/crud/errata.py:1547:0: C0116: Missing function or method docstring (missing-function-docstring)
alws/crud/errata.py:1547:0: R0914: Too many local variables (19/15) (too-many-locals)
alws/crud/errata.py:1586:16: E1205: Too many arguments for logging format string (logging-too-many-args)
alws/crud/errata.py:1589:24: E0602: Undefined variable 'exc' (undefined-variable)
alws/crud/errata.py:1661:34: E1101: Module 'createrepo_c' has no 'SHA256' member (no-member)
alws/crud/errata.py:1547:0: R0912: Too many branches (18/12) (too-many-branches)
************* Module alws.routers.errata
alws/routers/errata.py:127:1: W0511: TODO: Update this endpoint to include platform_id. (fixme)
alws/routers/errata.py:75:4: C0103: Argument name "pageNumber" doesn't conform to snake_case naming style (invalid-name)
alws/routers/errata.py:79:4: C0103: Argument name "platformId" doesn't conform to snake_case naming style (invalid-name)
alws/routers/errata.py:80:4: C0103: Argument name "cveId" doesn't conform to snake_case naming style (invalid-name)
alws/routers/errata.py:76:4: W0622: Redefining built-in 'id' (redefined-builtin)
alws/routers/errata.py:81:4: W0621: Redefining name 'status' from outer scope (line 3) (redefined-outer-name)
alws/routers/errata.py:161:38: E1101: Instance of 'ValueError' has no 'message' member (no-member)
************* Module alws.schemas.errata_schema
alws/schemas/errata_schema.py:17:4: R0903: Too few public methods (0/2) (too-few-public-methods)
alws/schemas/errata_schema.py:29:4: E0213: Method 'validator_ref_type' should have "self" as first argument (no-self-argument)
alws/schemas/errata_schema.py:36:4: R0903: Too few public methods (0/2) (too-few-public-methods)
alws/schemas/errata_schema.py:48:4: R0903: Too few public methods (0/2) (too-few-public-methods)
alws/schemas/errata_schema.py:61:4: E0213: Method 'status_validator' should have "self" as first argument (no-self-argument)
alws/schemas/errata_schema.py:64:4: R0903: Too few public methods (0/2) (too-few-public-methods)
alws/schemas/errata_schema.py:73:4: R0903: Too few public methods (0/2) (too-few-public-methods)
alws/schemas/errata_schema.py:114:4: R0903: Too few public methods (0/2) (too-few-public-methods)

-----------------------------------
Your code has been rated at 8.97/10


Bandit report
Run started:2024-06-06 09:30:20.093796

Test results:
	No issues identified.

Code scanned:
	Total lines of code: 1892
	Total lines skipped (#nosec): 0
	Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
	Total issues (by severity):
		Undefined: 0
		Low: 0
		Medium: 0
		High: 0
	Total issues (by confidence):
		Undefined: 0
		Low: 0
		Medium: 0
		High: 0
Files skipped (0):

View full reports on the Job Summary page.

- Added platfrom_id in endpoint response
- Enabled optional platform_id parameter for filtering errata records
- Added tests for /errata/all/ endpoint
@bklvsky bklvsky force-pushed the platform_id_in_errata_all branch from e35603b to 57741c4 Compare June 6, 2024 09:29
@Korulag Korulag merged commit 0c4bf52 into AlmaLinux:master Jun 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add platform_id in result when calling the /errata/all endpoint
4 participants