django-admin command to export all jbi objects related to a BuildRelease
This helps developers to import the file afterwards via admin site
Change-Id: Id10ef618f18df10d6fdf066a29de40271d685cb3
* don't add '^' twice for api urls
* don't add format_suffix for gerrit/refresh
* add missing format parameter for API views
Change-Id: I2c8cef000c0aec3524302cc5c5a7a201f9cf90d1
When refreshing list of projects, remove every info related to
any old project
We had this scenario when releasing mr10.5, ngcp-cve-scanner was
wrongly added as a project and we couldn't resume the build until
I removed the related info
Change-Id: I58ee97f3256bb63a0a07a6ed606ede0c233cfb84
* trunk-weekly as a normal release, with its own
config file. The idea is to convert eventually
trunk-* too
* match for relase-trunk-* doesn't work anymore
Change-Id: I4967ccc3b5ac47dbebdf6da16d404710fc72da49
* don't allow to trigger more than one build for instance of
release-trunk-* or mrX.Y
* autoupdate pre-commit config
Change-Id: I7183b8645155ca017e9796664d2570e88a29c44e
* calling build from API was always unauthorized
* drfapikey only supports Django until 1.10 version
* https://florimondmanca.github.io/djangorestframework-api-key/
supports modern Python and Django versions
- remove useless BUILD_KEY_AUTH preference, it's True always
Change-Id: I5521b07532dba12abea52982d376eb83293f6a38
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