Commit Graph
342 Commits
Author SHA1 Message Date
Simone OrsiandGitHub 764a77ff60 Update main.py 2019-08-02 08:30:49 +02:00
Simone OrsiandGitHub 9cf63f60a5 Merge pull request #72 from simahawk/12-imp
cloud_platform: support client name w/ multiple `-`
2019-07-30 15:52:43 +02:00
Simone Orsi 50cb368704 cloud_platform: support client name w/ multiple - 2019-07-30 14:20:12 +02:00
Simone OrsiandGitHub 379141112c Merge pull request #65 from guewen/filter-monitoring-status-log
[12.0] Filter /monitoring/status werkzeug logs
2019-07-12 11:58:09 +02:00
Guewen Baconnier ad3a962931 Filter /monitoring/status werkzeug logs
With healtchecks, they constitute 95% of our logs. Let's stop wasting
resources and shut them up.
2019-07-12 10:07:20 +02:00
Akim JuilleratandGitHub 665976930b Merge pull request #58 from guewen/12.0-swift-auth-session
[12.0] attachment_swift: share a session for all connections
2019-05-20 15:44:47 +02:00
Guewen Baconnier 580eff0062 Override dependencies with different name and pin versions
The name of the libs and python packages are different, Odoo expects
the inner python package in the manifest, but setuptools cannot find the
libs in pypi, overrides them with the libs names.
2019-05-09 10:10:58 +02:00
Guewen Baconnier d032e518ba Pin PyYAML version because 5.x does not work with Odoo
It would raise ConstructorError: could not determine a constructor for the tag '!record'
2019-05-09 10:10:58 +02:00
Guewen Baconnier c6456a58f7 attachment_swift: share a session for all connections
OVH's Swift applies a rate limit on the authentication.

attachment_swift authenticates again each time it has to read/write an
attachment. When running upgrades on upgrades of files or installing a
new DB, at some point, we get rejected with HTTP 429.

This commit introduces a shared storage for Swift Session. All
connections will reuses the same authentication token created the first
time a connection needs a Session.

Note: needs python-swiftclient>=3.7.0 to have
https://github.com/openstack/python-swiftclient/commit/1971ef880ff225379d4a91f00f89f323a1605eeb
2019-05-09 10:10:58 +02:00
Guewen Baconnier 339876236e Add missing variable in documentation example 2019-05-07 15:51:36 +02:00
Yannick VaucherandGitHub 486f15095f Merge pull request #53 from p-tombez/12.0-fix_s3_name_check
Fix S3 bucket name check to allow numbers
2019-05-01 16:24:28 +02:00
Patrick Tombez dc0029cfda Fix S3 bucket name check to allow numbers 2019-04-24 12:08:42 +02:00
Simone OrsiandGitHub affe86d5aa Merge pull request #51 from yvaucher/fix-aws-host-empty
Fix use of aws where hostname is not required
2019-04-17 15:24:37 +02:00
Yannick Vaucher 8ccddefd06 Fix use of aws where hostname is not required
This fixes an error with endpoint computed as https://None while
we want to let boto compute the AWS endpoint
2019-04-17 14:51:46 +02:00
Yannick VaucherandGitHub c3310cbd9f Merge pull request #45 from Numigi/12.0-monitoring_log_requests_dispatch_classmethod
12.0: monitorin_log_request: _dispatch is a classmethod
2019-04-16 15:10:11 +02:00
Jordi Riera 060975fdfb monitorin_log_request: _dispatch is a classmethod 2019-04-15 17:55:03 -04:00
Yannick VaucherandGitHub b05413f020 Merge pull request #49 from grindtildeath/12.0_add_base_fileurl_field
[12.0] Add base_fileurl_field
2019-04-08 17:04:53 +02:00
Akim JuilleratandGitHub 9df4251b3c Merge pull request #50 from grindtildeath/12.0_hostname_scheme
[12.0] Add https scheme if not present in AWS_HOST env var
2019-04-03 15:53:44 +02:00
Akim Juillerat 58d526d8cf Add https scheme if not present in AWS_HOST env var
With boto (odoo < 12.0) we use an hostname as AWS_HOST.
However with boto3, the connection must be initialized using an
URL containing a scheme (e.g https://)
This commit ensures we can use a simple hostname for odoo >= v12.0
without the need of specifying the scheme in the env var.
2019-04-03 14:48:53 +02:00
Akim Juillerat 959702b2d3 fixup! fixup! [12.0] Add base_fileurl_field 2019-04-02 14:07:30 +02:00
Akim Juillerat dd776de71b Make pylint happy 2019-03-14 15:16:54 +01:00
Akim Juillerat fa522a29e7 Update .travis.yml 2019-03-13 20:07:21 +01:00
Akim Juillerat 979e76c353 fixup! [12.0] Add base_fileurl_field 2019-03-13 20:04:41 +01:00
Yannick VaucherandAkim Juillerat 2d8d1f808b Update base_fileurl_field/fields.py
Co-Authored-By: grindtildeath <akim.juillerat@camptocamp.com>
2019-03-13 19:18:07 +01:00
Akim Juillerat d83aca68e6 [12.0] Add base_fileurl_field 2019-03-13 19:18:07 +01:00
Yannick VaucherandGitHub a7207cc3e7 Merge pull request #48 from grindtildeath/12.0_improvements
12.0 attachment_s3 improvements
2019-03-12 09:09:04 +01:00
Akim Juillerat 626c157964 [IMP]: Allow to use context Key as storage key 2019-03-11 15:39:53 +01:00
Akim Juillerat 498aae2f53 [IMP]: Allow to pass storage as a context key 2019-03-11 15:39:53 +01:00
Akim Juillerat c61cf6c4e5 attachment_s3: Migrate to boto3 2019-03-11 15:39:53 +01:00
Guewen BaconnierandGitHub 8b9e7b1ffe Merge pull request #41 from jcoux/fix_check_stack_name
Fix the check stack name for project with digit at first character
2018-12-03 10:56:46 +01:00
Guewen Baconnier a9c2f64fca Add setuptools files 2018-12-03 10:09:33 +01:00
Guewen Baconnier 67bf8b8286 Edit readme 2018-12-03 10:09:23 +01:00
jcoux 44fd22c3d4 Fix the check stack name for project with digit at first character 2018-11-23 16:08:25 +01:00
jcouxandGitHub c9323733ae Merge pull request #38 from jcoux/142_migrate_to_12.0
Migration to 12.0
2018-11-23 15:15:48 +01:00
jcoux 5c43e3547e fixup! Migration to 12.0 2018-11-23 09:31:46 +01:00
jcoux 7eac1013eb Migration to 12.0 2018-10-24 12:44:45 +02:00
jcoux 73293a1390 Set all modules to uninstallable 2018-10-24 11:53:27 +02:00
Guewen Baconnier 96f4e75311 base_attachment_object_storage: bump 1.1.0 2018-06-13 17:25:21 +02:00
Guewen BaconnierandGitHub 19dcbff646 Merge pull request #35 from guewen/11.0-force-storage-at-upgrade
11.0 Fix attachments stored in FS instead of object storage
2018-06-13 17:24:50 +02:00
Guewen Baconnier 371e5439e6 Document a weird domain which is there for a reason
The reason being:
https://github.com/odoo/odoo/blob/9032617120138848c63b3cfa5d1913c5e5ad76db/odoo/addons/base/ir/ir_attachment.py#L344-L347

I nearly deleted this domain but it was too weird to be there for no
reason. A comment explaining the issue was really missing.
2018-06-13 16:05:34 +02:00
Guewen Baconnier 6ab3038a90 Fix attachments stored in FS instead of object storage
Assume the following situation:

* We have installed addons base, sale and attachment_s3 (hence
base_attachment_object_storage as dependency)
* All attachments are in S3 already
* We run an upgrade of the 'base' addon, 'sale' is upgraded before
attachment_s3 in the order of loading.
* Sale updates the icon of the Sale menu
* As attachment_s3 is not loaded yet, the attachment is created in the
filestore

Now if we don't persist the filestore or use different servers, we'll
lose the images of the menus (or any attachment loaded by the
install/upgrade of an addon).

The implemented solution is to move the attachments from the filestore
to the object storage at the loading of the module. However, this
operation can take time and it shouldn't be run by 2 processes at the
same time, so we want to detect if the module is loaded during a normal odoo
startup or when some addons have been upgraded. There is nothing anymore
at this point which allow us to know that modules just have been
upgraded except... in the caller frame (load_modules). We have to rely
on the inpect module and get the caller frame, which is not recommended,
but seems the only way, besides, it's not called often and if
_register_hook was called from another place, it would have no effect
(unless the other place has a variable 'update_module' too).
2018-06-13 16:05:26 +02:00
Guewen Baconnier fb3d3134d6 Ensure that migration of files is commited before deleting files
When moving attachments from the filestore to an object storage,  the
filesystem files will be deleted only after the commit, so if the
transaction is rollbacked, we still have the local files for another
try.
2018-06-13 16:04:55 +02:00
Guewen BaconnierandGitHub 2ec125cccd Merge pull request #31 from guewen/11.0-swift-pass-region-name
Propagage region_name to swift connection
2018-03-29 16:44:39 +02:00
Guewen Baconnier 529c4066fa Propagage region_name to swift connection
Otherwise, the bucket will be in the incorrect region
2018-03-16 09:10:58 +01:00
Guewen BaconnierandGitHub c35483d948 Merge pull request #29 from guewen/11.0-fix-redis-stored-log
Fix order of args in logs
2018-03-15 12:27:47 +01:00
Guewen Baconnier 543a9eb22d Fix order of args in logs 2018-03-13 15:00:26 +01:00
Guewen BaconnierandGitHub 68c161e345 Merge pull request #28 from camptocamp/yvaucher-patch-1
Remove useless call to lower()
2018-02-08 15:32:14 +01:00
Yannick VaucherandGitHub 78d99ff330 Remove useless call to lower()
'0'.lower() == '0'
2018-02-08 14:49:15 +01:00
jcouxandGitHub 5706146f18 Merge pull request #27 from jcoux/1093_v11_monitoring-short-living-sessions
Expire sessions generated by health checks quickly
2018-01-11 11:19:16 +01:00
Guewen Baconnierandjcoux 39e71ff334 Expire sessions generated by health checks quickly
The default expiration of sessions is 7 days. With healthchecks run
every few seconds, we quickly have millions of anonymous sessions in
Redis. Allow to define a custom expiration for some sessions and set a
very short one for the monitoring requests.
2018-01-11 10:46:55 +01:00