Victor Seva
28a0d343ef
TT#15305 build: add missing readonly fields to admin panel
...
Change-Id: I1043d16660d3c9e8daab66082884da49ef4b87c3
3 years ago
Victor Seva
2a335babf1
TT#15305 build: improve refresh_projects
...
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
3 years ago
Victor Seva
460f775436
TT#15305 build: don't trigger already triggered external job
...
* build_resume can be triggered several times due to pool size
* keep triggered_jobs info in db
Change-Id: Iedfca9d386af5cfd9f52b6fd8b513c181f2d4983
3 years ago
Sergii Kipot
41f538ff3d
TT#172051 Add ngcp-cve-scanner repo to repoapi dashboard
...
Change-Id: If33b3e80575ef48afd74033c611eed7a370c4bd7
3 years ago
Victor Seva
907f0cdb2e
TT#15305 build: add links to gitweb for projects at build_release.html
...
Change-Id: I8625495f36c46e8667ff744dd0716de8533100e3
3 years ago
Victor Seva
66d3cbb933
TT#15305 build: trigger weekly-build-matrix-trunk-weekly
...
when build release is done... lets trigger the job to build Vms
Change-Id: I5fdf80ae0c8fdd5de6e5e19cc85bbf9c98dc354c
3 years ago
Victor Seva
753e79f548
TT#15305 build: fix get_common_release for trunk-weekly
...
Change-Id: Id19002bf24a4416e835d4765e87f9d4b3637b746
3 years ago
Guillem Jover
37fef5f651
TT#124273 Use execute_after_ instead of override_ for dh command
...
This avoids duplicating the call we want to hook into.
Change-Id: I91837467466ed5cbbaad0d75b72604f220846730
3 years ago
Guillem Jover
2b85ace62d
TT#124273 Update packaging for bullseye
...
- Switch to debhelper compat level 13.
- Switch to Standards-Version 4.5.1.
- Update copyright years.
Change-Id: I3f3f6040df09dfd353d06a63143f3b98bac1e5df
3 years ago
Victor Seva
9159fbae1d
TT#15305 build: support trunk-weekly release
...
* 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
3 years ago
Victor Seva
da38972015
TT#15305 build: don't allow trigger builds that have unfinished previous builds
...
* don't allow to trigger more than one build for instance of
release-trunk-* or mrX.Y
* autoupdate pre-commit config
Change-Id: I7183b8645155ca017e9796664d2570e88a29c44e
3 years ago
Victor Seva
c488bc8591
TT#15305 build: fix detection of build permissions
...
* 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
3 years ago
Victor Seva
5a193617ba
TT#121955 dev: pin working version of Werkzeug
...
See for details https://github.com/django-extensions/django-extensions/pull/1716
Change-Id: Ic253ba8ef845fce03723ff4ed76e827edc9709fa
3 years ago
Victor Seva
eb4f76f554
TT#121955 build: detect release_uuid empty value
...
> [info ] request_started [django_structlog.middlewares.request] ip=192.168.208.21 request=POST /jenkinsbuildinfo/ request_id=e435d38f-f690-4ba6-8b58-01ef76d0d988 user_agent=python-requests/2.21.0 user_id=None
> {'request_id': 'e435d38f-f690-4ba6-8b58-01ef76d0d988', 'user_id': None, 'ip': '192.168.208.21', 'release_uuid': '$release_uuid', 'release': 'release-mr7.5-update', 'event': 'BuildRelease not found', 'logger': 'build.signals', 'level': 'error'}
Change-Id: I0aa2eb7690d52becbe4ae556e561f87017b50d16
3 years ago
Victor Seva
29f7f9682f
TT#121955 update django to latest 3.2 release
...
Change-Id: I78e094ed7d88bf93772f34a6045c56e3839e79be
3 years ago
Michael Prokop
1e51a3ec78
TT#154401 New release v0.4.5
...
Change-Id: Iac013a82763b919fc830b8ca6e6e0550a0d3240f
3 years ago
Victor Seva
6f043a0b9f
TT#121955 migrate missing files to structlog
...
Just to keep consistency on project
Change-Id: I8e2cec10baa92d00915229bb118be585492ac598
3 years ago
Victor Seva
504110f9e5
TT#121955 test: override DEBUG value
...
Change-Id: Icfcbfc847feb1a694bb7c9537b628fe449cdb9c4
3 years ago
Victor Seva
987c13bbd3
TT#121955 decouple tasks and signals from models, take two
...
Change-Id: Iccad4885c3f9e510a9fd297606d83668e584999e
3 years ago
Victor Seva
e4aa31a7e3
TT#121955 repoapi: don't use send_task directly
...
Change-Id: Iffcd0c084281158106d8c582930331f841af9757
3 years ago
Victor Seva
d832e3233c
TT#121955 migrate to pathlib
...
Change-Id: Ie3dbd8503d6c61dda3d187de65a5694cbc4f957f
3 years ago
Victor Seva
df32d4377d
TT#121955 py-test: add coverage for django templates
...
https://github.com/nedbat/django_coverage_plugin
Change-Id: I74a5638fea8b2460fc7bd04abe47be210c3f46bb
3 years ago
Victor Seva
67f093202c
TT#121955 py-test: define cache_dir to avoid PytestCacheWarning
...
> /usr/lib/python3/dist-packages/_pytest/stepwise.py:122
> /usr/lib/python3/dist-packages/_pytest/stepwise.py:122: PytestCacheWarning: could not create cache path /code/.pytest_cache/v/cache/stepwise
> self.config.cache.set("cache/stepwise", [])
>
> /usr/lib/python3/dist-packages/_pytest/cacheprovider.py:396
> /usr/lib/python3/dist-packages/_pytest/cacheprovider.py:396: PytestCacheWarning: could not create cache path /code/.pytest_cache/v/cache/nodeids
> config.cache.set("cache/nodeids", sorted(self.cached_nodeids))
>
> /usr/lib/python3/dist-packages/pytest_pep8.py:44
> /usr/lib/python3/dist-packages/pytest_pep8.py:44: PytestCacheWarning: could not create cache path /code/.pytest_cache/v/pep8/mtimes
> config.cache.set(HISTKEY, config._pep8mtimes)
Change-Id: Ia5d6ebd823d1a51967a0b6d0a64f534a1fc1f577
3 years ago
Victor Seva
abff367347
TT#121955 repoapi: fix RuntimeWarning on tests
...
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
3 years ago
Victor Seva
69c44c41c1
TT#121955 add validate_templates test
...
https://django-extensions.readthedocs.io/en/latest/validate_templates.html
* add missing optional requirement
> django_filters/templates/django_filters/rest_framework/crispy_form.html: TemplateSyntaxError 'crispy_forms_tags' is not a registered tag library. Must be one of:
> admin_list
> admin_modify
> admin_urls
> assets
> cache
> debugger_tags
> highlighting
> i18n
> import_export_tags
> indent_text
> jsonify
> l10n
> log
> rest_framework
> static
> syntax_color
> tz
> widont
> CommandError: 1 errors found
Change-Id: I6e425cd9dfde112c64143dae3350dce5839311b7
3 years ago
Victor Seva
a8a3bccf54
TT#121955 update debian changelog
...
Change-Id: I5bb5c6aff79ab9f4ba5ccd76f3b1af539a471bff
3 years ago
Victor Seva
a245cc8a8c
TT#121955 decouple tasks and signals from models
...
* migrate to structlog on all of them
Change-Id: I6f89a5880c5d517b2c5525503d88b5b6d815797a
3 years ago
Victor Seva
c8abcd38e6
TT#121955 update Django to 3.2
...
* set DEFAULT_AUTO_FIELD
https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys
* use app_name on INSTALLED_APPS
https://docs.djangoproject.com/en/3.2/releases/3.2/#automatic-appconfig-discovery
Change-Id: If43954d54e4094feab88370f375b46d5905a0be3
3 years ago
Victor Seva
ec5c90554c
TT#121955 force explicit relative import everywhere
...
Change-Id: Ie47dda3c812ccb99d164a67cbfbf9fed321f3c71
3 years ago
Victor Seva
b4a4e72cc6
TT#121955 build: remove module models
...
Change-Id: I4bc608f5c84359c155895935a3b77c24ba0f44c0
3 years ago
Victor Seva
8da6c9cb48
TT#121955 define resources for django-import-export
...
https://django-import-export.readthedocs.io/en/latest/getting_started.html#creating-import-export-resource
* admin integration
https://django-import-export.readthedocs.io/en/latest/getting_started.html#admin-integration
Change-Id: I67da67943eea7b39fe63d7d8a910e2b889f92f6e
3 years ago
Victor Seva
beb1909fe7
TT#121955 django-rest-swagger is deprecated
...
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
3 years ago
Victor Seva
5ca6d5ddb9
TT#121955 import conf from AppConfig.ready()
...
AppConf classes depend on being imported during startup of the Django process.
Change-Id: I16f6860a47467fd3ed138df46df81497ddf00f77
3 years ago
Victor Seva
c06ee00456
TT#121955 use recent pytest-django instead of the one from Debian
...
v4.5.0 has support for Django 4.0
Change-Id: Id694454fcfa77eee101ea371d5150ef77dc43665
3 years ago
Victor Seva
1652418a6d
TT#121955 django.conf.urls.url() removed
...
https://docs.djangoproject.com/en/3.2/internals/deprecation/#deprecation-removed-in-4-0
Change-Id: I6515688706f50422eb7751d305a8ed87ca0394e8
3 years ago
Victor Seva
27b46f9745
TT#121955 use mock from unittest
...
* 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
3 years ago
Victor Seva
29e328b069
TT#121955 update Django 3.1
...
* models.JSONField
https://docs.djangoproject.com/en/3.1/releases/3.1/#jsonfield-for-all-supported-database-backends
Now returns a str() instead of a dict()
* no need to pin psycop2
https://docs.djangoproject.com/en/3.1/releases/3.1/#database-backend-api
"connection.timezone property is now 'UTC' by default, or the
TIME_ZONE when USE_TZ is True on databases that support time zones.
Previously, it was None on databases that support time zones."
* rework signal receivers
Change-Id: I4e1c6f780c416c7e2f2e1c7ba6154f25e4bd8c5a
3 years ago
Victor Seva
8a89cdfc56
TT#121955 fix issue with postgresql and django 3.0
...
https: //code.djangoproject.com/ticket/32856#ticket
https: //github.com/psycopg/psycopg2/issues/1293
Change-Id: I18db97dc7f65368906f82cb8a3f9eaaab09e2d4d
3 years ago
Victor Seva
8dfc0719ef
TT#121955 replace django-export with django-import-export
...
* it doesn't support Django 4.0
Change-Id: I696c3ac603a40d68f4d2fb439bb8957d442d877d
3 years ago
Victor Seva
c0d0206cf2
TT#121955 update django to 3.0
...
- 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
3 years ago
Victor Seva
ca54503eaf
TT#121955 pre-commit: update plugins
...
Change-Id: Ic5f171f1a4efa1ca647d7e27c1ae9928a106e97f
3 years ago
Victor Seva
9249977c01
TT#154401 New release v0.4.3
...
Change-Id: I56a1526dbc111a33c0aceef1e027eaf54f927eb3
3 years ago
Victor Seva
bf24569663
TT#154401 build needs a $HOME dir
...
> virtualenv --python=python3
> /build/repoapi-0.4.3+0~20211207150142.636+bullseye~1.gbpc1b960/venv_prod
> source /build/repoapi-0.4.3+0~20211207150142.636+bullseye~1.gbpc1b960/venv_prod/bin/activate && \
> pip3 install -r ./requirements/prod.txt | tee install.log
> [snip]
> Building wheels for collected packages: python-crontab, python-ldap,
> django-jsonify, django-object-tools, openapi-codec, drfapikey, psycopg2, coreschema
> WARNING: Building wheel for python-crontab failed: [Errno 13]
> Permission denied: '/nonexistent'
> WARNING: Building wheel for python-ldap failed: [Errno 13] Permission
> denied: '/nonexistent'
> WARNING: Building wheel for django-jsonify failed: [Errno 13]
> Permission denied: '/nonexistent'
> WARNING: Building wheel for django-object-tools failed: [Errno 13]
> Permission denied: '/nonexistent'
> WARNING: Building wheel for openapi-codec failed: [Errno 13]
> Permission denied: '/nonexistent'
> WARNING: Building wheel for drfapikey failed: [Errno 13] Permission
> denied: '/nonexistent'
> WARNING: Building wheel for psycopg2 failed: [Errno 13] Permission
> denied: '/nonexistent'
> WARNING: Building wheel for coreschema failed: [Errno 13] Permission
> denied: '/nonexistent'
> Failed to build python-crontab python-ldap django-jsonify
> django-object-tools openapi-codec drfapikey psycopg2 coreschema
> ERROR: Could not build wheels for python-ldap which use PEP 517 and
> cannot be installed directly
Change-Id: I8e51d32b0d18d87a9d2f722797da13d085e420e0
3 years ago
Guillem Jover
00b07e2225
TT#124273 Use $(CURDIR) instead of $(shell pwd)
...
Change-Id: I91955c96416790b85dbea51515d3ca03b8f9096c
4 years ago
Sergii Kipot
00d9aaa3ed
TT#138658 Add system-tests to docker projects
...
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
4 years ago
Sergii Kipot
cd5a0537b1
TT#117154 Add ngcp-js-api-client to repoapi dashboard
...
Change-Id: I63e6337b488a94a0a78c141a8a415491a7ef5748
4 years ago
Victor Seva
cf992ba677
TT#134250 release_changed: add label field
...
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
4 years ago
Victor Seva
93bf49fdf3
TT#134250 remove yuicompressor since is no longer provide by pip
...
* remove dh-systemd, no longer necessary
* add libsasl2-dev as dependency fixing pip build of python-ldap
> Modules/LDAPObject.c:16:10: fatal error: sasl/sasl.h: No such file or directory
> 16 | #include <sasl/sasl.h>
> | ^~~~~~~~~~~~~
> compilation terminated.
> error: command '/usr/lib/ccache/x86_64-linux-gnu-gcc' failed with exit code 1
> ----------------------------------------
Change-Id: I0c6265bfb607e77f74a85f094dd03b3017532d73
4 years ago
Victor Seva
1d783fa29c
TT#65903 Bumping changelog to speedup -source job
...
Change-Id: Ifd3f9364e431aae9cc422f22fe68fcf7804cc9cc
4 years ago
Victor Seva
ffe2d6c8b9
TT#100201 build: support trunk with more than one distribution
...
* Makefile: add extra test summary
* migrate to structlog, this is an ongoing effort
* panel: remove any "trunk" build
Change-Id: I6f60541248f2970e0fe0784f2eb6eff5dec40721
5 years ago