https://docs.djangoproject.com/en/3.2/ref/utils/#django.utils.timezone.make_aware
> repoapi/test/test_model_queries.py::JBIQueriesTestCase::test_purge_release
> /usr/local/lib/python3.9/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField JenkinsBuildInfo.date received a naive datetime (2022-01-25 13:41:29.434857) while time zone support is active.
> warnings.warn("DateTimeField %s received a naive datetime (%s)"
> repoapi/test/test_tasks.py::TasksTestCase::test_purge
> /usr/local/lib/python3.9/dist-packages/django/db/models/fields/__init__.py:1416: RuntimeWarning: DateTimeField JenkinsBuildInfo.date received a naive datetime (2022-01-25 13:41:29.653135) while time zone support is active.
> warnings.warn("DateTimeField %s received a naive datetime (%s)"
Change-Id: Ieceea8127a2ec2ec14b41abef45baf526ae26776
https: //www.django-rest-framework.org/topics/documenting-your-api/#drf-yasg-yet-another-swagger-generator
* We were getting error on /docs/
> 'AutoSchema' object has no attribute 'get_link'
* provide /docs/ with swagger UI
/redoc/ with ReDoc https://github.com/Redocly/redoc
Change-Id: I455e0c392285760d2450f7d3ec3d51209d20bf2a
* mock is now part of the Python standard library,
available as unittest.mock in Python 3.3 onwards.
https://pypi.org/project/mock/
Change-Id: Id5a5d4a5020821def08a3cbf2a6d528d43c4d48c
- Features deprecated in 2.1:
* {% load staticfiles %} and {% load admin_static %} are deprecated in
favor of {% load static %}, which works the same.
- Features deprecated in 1.10:
* Session verification will be enabled regardless of whether or not
'django.contrib.auth.middleware.SessionAuthenticationMiddleware' is
in MIDDLEWARE_CLASSES.
- django-filters:
* https://django-filter.readthedocs.io/en/stable/guide/rest_framework.html
- django-rest-framework:
https://www.django-rest-framework.org/api-guide/pagination/
"Note that you need to set both the pagination class, and the page size that
should be used. Both DEFAULT_PAGINATION_CLASS and PAGE_SIZE are None by default."
- t/Dockerfile: migrate to bullseye
Change-Id: Ia225eba15ca46446700fa2699e89d7e4601bf1a2
tap-tests docker is generated now per release so we need to add the repo
to docker projects to be able to trigger docker rebuild from repoapi
interface.
Change-Id: I822aa87b26b6ba4cd8a1385828dcaad6755bc921
Add label in order to group different builds from
daily-build-matrix-runner or daily-build-matrix-base-runner jobs
* add support for CARRIER vmtype
Change-Id: I0159a191c40c329532d7040bacb55ecfbf9f6f14
* Makefile: add extra test summary
* migrate to structlog, this is an ongoing effort
* panel: remove any "trunk" build
Change-Id: I6f60541248f2970e0fe0784f2eb6eff5dec40721
* complex values need to be string or be produce
errors like:
> amqp.exceptions.FrameSyntaxError: Table type <class 'repoapi.models.jbi.JenkinsBuildInfo'> for key b'instance' not handled by amqp.
Change-Id: I74ce92b56660cfd9158eff1364c82c4dba2fc081
* repoapi will call jenkins 'remove-reprepro-project' job
when a review is merged and there are still other open
reviews with the same topic.
* repoapi will call jenkins 'remove-reprepro-codename' job
when all reviews with the same topic are merged, as
previously.
* repoapi: store projectname on gerrit info so
we can count reviews of the same project in the same
PPA
* migrate logging to structlog for modified files.
This is an ongoing effort
Change-Id: I5b99bbeabf770c95d7894dec834e32622d2df547
> stores the file names it handles by appending the MD5 hash of the
> file’s content to the filename.
> For example, the file css/styles.css would also be saved
> as css/styles.55e7cbb9ba48.css.
Change-Id: I74a7eba6ed12f85a6e9dc30530ef2a43014031c3
* structlog doesn't have task name
> celery[15524]: Received task: repoapi.tasks.get_jbi_files[9706dfaa-75ee-4553-8c3b-1de752c4b1bb]
Change-Id: I224a2a7b6ef5a2e8ae37f50ddb9f2b4424f81324
* https://django-structlog.readthedocs.io/en/latest/
django-structlog is a structured logging integration for Django project
using structlog
Logging will then produce additional cohesive metadata on each logs that
makes it easier to track events or incidents.
* https://www.structlog.org/en/stable/
structlog makes logging in Python less painful and more powerful by
adding structure to your log entries.
Change-Id: I087574a8d7e04ddb32d86077b0e5478a9f41e11b