76 Commits

Author SHA1 Message Date
Alan Rominger
f5785976be
Update to comply with new black rules 2023-02-01 14:59:38 -05:00
Shane McDonald
6d11003975 Remove need for settings.py during image build 2022-08-22 13:46:42 -04:00
Shane McDonald
cbea36745e Transition from setup.py to setup.cfg 2022-06-27 13:30:01 -04:00
Alan Rominger
aaad634483
Only use in-memory cache for database settings, set ttl=5 (#12166)
* Only use in-memory cache for database settings

Make necessary adjustments to monkeypatch
  as it is very vunerable to recursion
  Remove migration exception that is now redundant

Clear cache if a setting is changed

* Use dedicated middleware for setting cache stuff
  Clear cache for each request

* Add tests for in-memory cache
2022-05-10 21:58:22 -04:00
Jeff Bradberry
05142a779d Replace all usage of customized json fields with the Django builtin
The event_data field on event models, however, is getting an
overridden version that retains the underlying text data type for the
column, to avoid a heavy data migration on those tables.

Also, certain of the larger tables are getting these fields with the
NOT NULL constraint turned off, to avoid a long migration.

Remove the django.utils.six monkey patch we did at the beginning of
the upgrade.
2022-03-07 18:11:36 -05:00
Jeff Bradberry
df61d1a59c Upgrade to Django 3.0
- upgrades
  - Django 3.0.14
  - django-jsonfield 1.4.1 (from 1.2.0)
  - django-oauth-toolkit 1.4.1 (from 1.1.3)
    - Stopping here because later versions have changes to the
      underlying model to support OpenID Connect.  Presumably this can
      be dealt with via a migration in our project.
  - django-guid 2.2.1 (from 2.2.0)
  - django-debug-toolbar 3.2.4 (from 1.11.1)
  - python3-saml 1.13.0 (from 1.9.0)
  - xmlsec 1.3.12 (from 1.3.3)

- Remove our project's use of django.utils.six in favor of directly
  using six, in awx.sso.fields.

- Temporarily monkey patch six back in as django.utils.six, since
  django-jsonfield makes use of that import, and is no longer being
  updated.  Hopefully we can do away with this dependency with the new
  generalized JSONField brought in with Django 3.1.

- Force a json decoder to be used with all instances of JSONField
  brought in by django-jsonfield.  This deals with the 'cast to text'
  problem noted previously in our UPGRADE_BLOCKERS.

- Remove the validate_uris validator from the OAuth2Application in
  migration 0025, per the UPGRADE_BLOCKERS, and remove that note.

- Update the TEMPLATES setting to satisfy Django Debug Toolbar.  It
  requires at least one entry that has APP_DIRS=True, and as near as I
  can tell our custom OPTIONS.loaders setting was effectively doing
  the same thing as Django's own machinery if this setting is set.
2022-03-07 18:11:36 -05:00
Shane McDonald
f6e63d0917
Fix official image builds
I broke everything in https://github.com/ansible/awx/pull/11242.

These changes were necessary in order to run `awx-manage collectstatic` without a running database.
2021-11-13 06:07:37 +00:00
Sarabraj Singh
7a130a0616
flipped MODE switch for postgres check 2021-06-14 13:55:11 -04:00
Sarabraj Singh
f73de11acc
introduced a pre-flight check for postgres 12 2021-06-11 23:18:38 -04:00
Bill Nottingham
c8cf28f266 Assorted renaming and string changes 2021-04-30 14:32:05 -04:00
Ryan Petrello
c2ef0a6500 move code linting to a stricter pep8-esque auto-formatting tool, black 2021-03-23 09:39:58 -04:00
Ryan Petrello
814f033d46
monkey-patch another Django names_digest for FIPS support 2020-05-08 14:12:50 -04:00
Seth Foster
7873d08311
Update pip and setuptools in requirements txt
Versions selected to be pre-19 pip
due to unresolved issues with the build systems

Upgrade everything, party on

document new process

rotate license files

fix Swagger schema generation target

Remove --ignore-installed flag
2020-01-07 17:14:32 -06:00
Ryan Petrello
a0d20a5d50
fix an nuanced bug which can cause OAuth2 migrations to fail 2019-12-04 08:38:22 -05:00
Seth Foster
8e26e4edd5
Allow oauth2 settings to be set in the ui and api
Oauth2 settings were initialized early in the awx import stage, and
those settings were not modifiable. This change allows oauth2 to check
for settings in django.conf settings, which are dynamically updated
through api calls at runtime. As a result, oauth2 settings will match
the values in django.conf settings at any point in time.
2019-10-14 11:38:20 -04:00
Jeff Bradberry
2926d0198d Bump the version of Django to 2.2.4
This is a security release.
2019-08-01 10:41:36 -04:00
Jeff Bradberry
43c552c7c6 Some flake8 changes 2019-07-12 15:11:21 -04:00
Jeff Bradberry
25c14382db Update the monkey patch of Django's column name digest to work with 2.0+
BaseDatabaseSchemaEditor no longer has a `_digest` classmethod,
instead there is a call out to a new `names_digest` utility function.
2019-07-12 15:11:21 -04:00
AlanCoding
941009bf6d
Apply critical dependency upgrades
fix PyYAML warnings in unit tests
update paramiko source file for license
2019-04-16 16:00:09 -04:00
AlanCoding
5dbc269de1
Revert "Merge pull request #3697 from AlanCoding/conservative_upgrades"
This reverts commit 890de400e2c55692eda074175c7776fcc150d79e, reversing
changes made to e8de7bc8457d0ae41cac12f78d57f8dcf9499e49.
2019-04-15 10:39:56 -04:00
AlanCoding
235011f5e9
Apply critical dependency upgrades 2019-04-12 15:26:48 -04:00
Ryan Petrello
daeeaf413a
clean up unnecessary usage of the six library (awx only supports py3) 2019-01-25 00:19:48 -05:00
Ryan Petrello
32e7ddd43a
only override django for FIPS in environments where Django is installed
isolated awx installs don't have this tooling, and so they don't need
this specific monkey-patch
2018-11-26 09:17:48 -05:00
Ryan Petrello
a3f9c0b012
warn about FIPS mode if the Django version changes 2018-11-13 15:04:36 -05:00
Ryan Petrello
cceac8d907
support PKCS8-formatted keys to enable FIPS compliance
see: https://access.redhat.com/solutions/1519083
2018-11-12 16:21:57 -05:00
adamscmRH
8d012de3e2
monkey-patch _digest for fips 2018-11-12 15:32:23 -05:00
Ryan Petrello
ff1e8cc356
replace celery task decorators with a kombu-based publisher
this commit implements the bulk of `awx-manage run_dispatcher`, a new
command that binds to RabbitMQ via kombu and balances messages across
a pool of workers that are similar to celeryd workers in spirit.
Specifically, this includes:

- a new decorator, `awx.main.dispatch.task`, which can be used to
  decorate functions or classes so that they can be designated as
  "Tasks"
- support for fanout/broadcast tasks (at this point in time, only
  `conf.Setting` memcached flushes use this functionality)
- support for job reaping
- support for success/failure hooks for job runs (i.e.,
  `handle_work_success` and `handle_work_error`)
- support for auto scaling worker pool that scale processes up and down
  on demand
- minimal support for RPC, such as status checks and pool recycle/reload
2018-10-11 10:53:30 -04:00
chris meyers
987063e7fd iso nodes do not have celery. that is ok 2018-06-11 15:38:41 -04:00
Wayne Witzel III
91c6d406c5 Rollback celery 2018-02-22 09:37:14 -05:00
Wayne Witzel III
14c5123fda
Update celery environ and tasks 2017-11-09 17:21:19 -05:00
Matthew Jones
c7a85d9738 Mass rename from ansible_(awx|tower) -> (awx|tower) 2017-07-26 13:33:26 -04:00
Matthew Jones
3892e4e389 Tower -> AWX Tooling Migration
* Switching version number scheme and mechanism
* Refactor development tooling towards 'awx' paths and names
* Purging packaging details from Makefile
2017-07-21 17:06:45 -04:00
Matthew Jones
703f4925cb Bumping versions to 3.2.0 2016-12-04 21:21:22 -05:00
Aaron Tan
9e4655419e Fix flake8 E302 errors. 2016-11-15 20:59:39 -05:00
Matthew Jones
bbc84568a7 Update version to 3.1 2016-05-20 16:46:41 -04:00
Matthew Jones
ae9222f716 Fix flake8 after packaging changes merge 2016-04-06 11:03:34 -04:00
Matthew Jones
46bbc83d0d Changes for Tower virtualenv support
* Break requirements down into ansible and tower reqs
* Generate separate Ansible and Tower virtual environments
* Install appropriate requirements files into each one
* Modify development tools to use these venvs instead of our old
  site-packages
* Modify settings to indicate venv enablement and location of venvs
* Modify tasks to use the proper virtual environment for its purpose
2016-03-21 12:11:19 -04:00
Chris Church
60224cdbe4 Update Django to 1.8 and DRF to 3.3, add new Django migrations, update serializers/pagination/metadata, update browsable API styling. 2016-02-02 17:48:04 -05:00
Matthew Jones
c55741f6c6 Bump version number for devel to 3.0 2015-10-06 10:38:08 -04:00
Matthew Jones
519b0e8eef Merge branch 'release_2.3' into devel
* release_2.3: (54 commits)
  Upgrade changelog for 2.3
  Purge superlance
  Purge an old supervisor config
  Require chris-lea libzmq3
  Use the htpasswd command, not the module
  Fix a playbook syntax error for postgres
  Ensure postgres is started earlier in setup role
  Allow customizing npm path
  Include RPM-GPG-KEY-ansible-release for all releases
  Simplify GPG keys
  Correct broken RPM-GPG-KEY
  Use gpg --passphrase for signing CHECKSUM
  Handle rpm --addsign pasphrase prompts
  Adding docker-compose development workflow
  Fix license in spec file.
  Updates to selinux policy for some munin plugins
  ansible 1.8.4 requires sudo:true when using sudo_user
  Fix expect script timeout
  Disable timeout and correct sign.exp error
  Fix expect script hang
  ...
2015-09-11 16:03:52 -04:00
Chris Meyers
b3e20b843d more carefully add to python path
* ensure our path is the first in the sys.path list instead of
blindly poping and pushing onto the path
2015-09-04 13:43:24 -04:00
Matthew Jones
5727d722b6 Merge remote-tracking branch 'upstream/release_2.3' into devel
* upstream/release_2.3: (91 commits)
  Include python-{paramiko,ecdsa} dependencies
  Remove extra epel testing stanzas
  Unit test for ec2 credentialless inventory
  Fix issue with ec2 iam sync with no credential.
  Use the htpasswd command instead the ansible module
  Pip is no longer needed
  check local user root or not in ./configure
  Remove unneeded when check for super user addition
  Improve distro detection in setup.sh
  Fix superuser check on upgrade
  Minor improvements to setup.sh
  Remove ansible prerequisite check from configure
  Attempt to install ansible within setup.sh
  Allow munin processes to access postgres
  Move up base package dependency install
  fixes jenkins failures
  Proper flake8 fix
  fixes executing processes with correct PYTHONPATH will pickup .pth files
  Show the repo for bundled package file dump
  Proper flake8 fix
  ...
2015-09-03 15:46:10 -04:00
Matthew Jones
5f6f16b5ff Rev version to 2.4.0 2015-09-03 09:44:20 -04:00
James Laska
51e2120886 Properly handle namespace packages (oslo, dogpile)
Using `site.addsitedir()` handles namespace packages, where the traditional
`sys.path.insert` does not.  Kudos to Chris Meyers for this discovery.
2015-08-26 21:33:57 -04:00
Matthew Jones
4ce2300d27 Bump version number for 2.3.0 release 2015-08-21 11:55:19 -04:00
Matthew Jones
f66ed43788 Bump version to 2.2.3 2015-08-19 13:26:55 -04:00
James Laska
717f646430 Bump version to 2.2.2 2015-08-14 08:16:57 -04:00
Matthew Jones
7484267186 Bump 2.2 branch to version 2.2.1 2015-08-07 11:19:09 -04:00
Matthew Jones
e38e2106ef Rev master to 2.3.0 2015-07-15 14:42:56 -04:00
Matthew Jones
ac0984b2d8 Rev branch to 2.2.1 2015-07-15 14:41:36 -04:00