Commit Graph
142 Commits
Author SHA1 Message Date
Nils Hamerlinck 297c8072ef [12.0][IMP] attachment_azure: don't get blob content if we only need its size 2021-10-20 22:26:51 +07:00
Nils Hamerlinck d874ae7386 [MIG] attachment_azure: Backport from 13.0 to 12.0 2021-10-20 22:26:51 +07:00
Nils Hamerlinck 51a3501938 [13.0][FIX] attachment_azure: in 13.0, _file_read() is expected to return base64 encoded data 2021-10-20 22:26:51 +07:00
Patrick TombezandNils Hamerlinck dfdc58d4d6 [MIG] attachment_azure: Backport from 14.0 to 13.0 2021-10-20 22:26:51 +07:00
Patrick TombezandNils Hamerlinck 8cb2e7f0a6 [14.0][IMP] attachment_azure: Allow storage name override 2021-10-20 22:26:51 +07:00
Vincent RenavilleandNils Hamerlinck 2d55dd1028 [IMP] Add identity (#238)
* [IMP] can use ad identity to access storage
2021-10-20 22:26:51 +07:00
Nils Hamerlinck c17f6e7f50 [FIX] attachment_azure: clean dbname to fit with container naming rules 2021-10-20 22:26:51 +07:00
Nils Hamerlinck bff809b3f9 [FIX] attachment_azure: higher level of permissions needed to create container and upload blobs when using the SAS token 2021-10-20 22:26:51 +07:00
Hiren PattaniandNils Hamerlinck 3a17f375d6 [ADD] attachment_azure 2021-10-20 22:26:51 +07:00
Guewen BaconnierandGitHub 601842b9c0 Merge pull request #188 from acsone/logging_json-with-request_id-sbi
[10.0] Extend json logger with request uuid and user id
2020-06-22 13:35:45 +02:00
Guewen BaconnierandGitHub a880a406e8 Merge pull request #138 from camptocamp/10-fixes
cloud_platform: fix default config
2020-06-22 07:38:51 +02:00
Guewen Baconnier 3665465bbd Update setuptools files 2020-06-22 07:19:32 +02:00
Guewen BaconnierandGitHub e0d0b1a6dd Merge pull request #189 from acsone/10.0-logging-json-depency-override-lmi
[10.0][FIX] logging_json: define dependency override
2020-06-22 07:15:52 +02:00
Laurent Mignon (ACSONE) d71d159200 [FIX] logging_json: define dependency override 2020-06-19 09:46:25 +02:00
Stéphane Bidoul 9bcdc7b8f8 Log uid 2020-06-18 19:39:26 +02:00
Stéphane Bidoul dd7c2b2ac8 Log request uuid 2020-06-18 19:39:26 +02:00
Patrick TombezandGitHub b13c14612f Merge pull request #171 from p-tombez/10.0-s3_boto3
[10.0] attachment_s3: Migrate to boto3
2020-04-07 12:25:05 +02:00
Akim JuilleratandPatrick Tombez 9119d6d468 attachment_s3: Migrate to boto3 2020-03-10 11:07:23 +01:00
Akim JuilleratandGitHub 4ca8d4dd27 Merge pull request #163 from grindtildeath/bscloudfr-7_fix_auth_to_keystone_v3
[10.0] attachment_swift: fix auth to keystone v3
2020-03-09 13:32:20 +01:00
Akim Juillerat 9dff460f00 Fix authentication to Keystone v3
- Use newer version from python lib.
 - Define project_domain_id + user_domain_id in auth
2020-03-06 12:36:08 +01:00
Akim JuilleratandGitHub b7e66133e5 Merge pull request #149 from grindtildeath/10.0_dev_attachments
[10.0] Require AWS_BUCKETNAME for prod, integration and labs environments only
2020-03-05 10:00:31 +01:00
Patrick TombezandGitHub b6da6a9d89 Merge pull request #154 from p-tombez/10.0-keystoneauth_v3
[10.0] Use keystoneauth v3 for Swift attachments
2020-03-04 10:45:50 +01:00
Mussie SirakandPatrick Tombez 04fba0fdc4 Use keystoneauth v3 for Swift attachments 2020-03-04 10:26:37 +01:00
Akim Juillerat 98a55edc94 Require AWS_BUCKETNAME for prod, integration and labs environments only
AWS_BUCKETNAME is only needed in order to write on the bucket, but
read-only access should be allowed for other environments.

Fixes bug introduced by 6c3b610610
2020-02-25 16:00:03 +01:00
Simone Orsi 3b17357e57 cloud_platform: fix default config
`_config_by_server_env` should always retutn a `PlatformConfig` instance
2020-02-04 13:40:33 +01:00
Patrick TombezandGitHub 5b8804ffc0 Merge pull request #133 from p-tombez/10.0-anon_redis_session
[10.0] Add anonymous redis session expiration configuration
2020-01-31 11:15:17 +01:00
Patrick Tombez abdd69a1b2 Add anonymous redis session expiration configuration 2020-01-29 16:36:35 +01:00
Yannick VaucherandGitHub ede68ba355 Merge pull request #120 from leemannd/10_remove_useless_log
[10.0] Add description to model
2019-12-10 10:59:45 +01:00
Denis Leemann 018161eb11 [10.0] Add description to model
This removes the useless warning at startup
2019-12-09 16:31:02 +01:00
Guewen BaconnierandGitHub 5217cc9a6f Merge pull request #107 from camptocamp/revert-102-10.0-monitoring_check_db_connection
Revert "[10.0] [IMP] monitoring_status: check the db is reachable"
2019-11-18 13:50:23 +01:00
Guewen BaconnierandGitHub bacb45d30c Revert "[10.0] [IMP] monitoring_status: check the db is reachable" 2019-10-29 17:32:42 +01:00
Simone OrsiandGitHub 3e91624edb Merge pull request #102 from gurneyalex/10.0-monitoring_check_db_connection
[10.0] [IMP] monitoring_status: check the db is reachable
2019-10-28 08:10:33 +01:00
Alexandre Fayolle d17cf7deb9 [IMP] monitoring_status: check the db is reachable
make a real SQL query on GET /monitoring/status and return a 503
if the query failed.
2019-10-25 16:21:10 +02:00
Simone OrsiandGitHub 5fa64d3e82 Merge pull request #75 from guewen/10.0-monitoring_status-ignore-http
[10.0] Ignore HTTP version in monitoring_status filter
2019-08-09 11:55:46 +02:00
Simone OrsiandGuewen Baconnier 3a2d524cd9 Ignore HTTP version in monitoring_status filter 2019-08-09 10:02:34 +02:00
Guewen BaconnierandSimone Orsi 9d25b72f74 [10.0] Filter /monitoring/status werkzeug logs (#67)
* Filter /monitoring/status werkzeug logs

With healtchecks, they constitute 95% of our logs. Let's stop wasting
resources and shut them up.
2019-07-19 15:34:02 +02:00
Guewen BaconnierandGitHub 17847a8f2f Merge pull request #61 from guewen/10.0-swift-auth-session
[10.0] attachment_swift: share a session for all connections
2019-05-21 14:52:13 +02:00
Guewen Baconnier c405f57cc2 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:09:44 +02:00
Guewen Baconnier 1178b6d9a4 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:09:44 +02:00
Guewen Baconnier 5a0c554749 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:09:44 +02:00
Guewen Baconnier 0328868055 Add missing variable in documentation example 2019-05-09 10:06:02 +02:00
Patrick TombezandGitHub 67e7d27372 Merge pull request #52 from p-tombez/fix_s3_name_check
Fix S3 bucket name check to allow numbers
2019-04-24 12:03:02 +02:00
Patrick Tombez 3492b0a30d Fix S3 bucket name check to allow numbers 2019-04-24 11:53:43 +02:00
Guewen Baconnier 27e24e05f8 Add setuptools files 2018-12-03 09:25:08 +01:00
Guewen Baconnier 592637faa5 Edit readme 2018-12-03 09:24:35 +01:00
Guewen Baconnier 0d829264d8 base_attachment_object_storage: bump 1.2.0 2018-06-13 17:24:33 +02:00
Guewen BaconnierandGitHub 83ba63dbbb Merge pull request #34 from guewen/force-storage-at-upgrades
10.0 Fix attachments stored in FS instead of object storage
2018-06-13 17:17:35 +02:00
Guewen Baconnier 5039499b5b 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:01:22 +02:00
Guewen Baconnier 5d2fdeafb1 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:00:57 +02:00
Guewen Baconnier 896aec5976 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 15:59:16 +02:00