Skip to content

[17.0] [IMP] storage: Remove dependency on server_environment - #654

Open
yankinmax wants to merge 18 commits into
OCA:17.0from
camptocamp:17-storage-split
Open

[17.0] [IMP] storage: Remove dependency on server_environment#654
yankinmax wants to merge 18 commits into
OCA:17.0from
camptocamp:17-storage-split

Conversation

@yankinmax

@yankinmax yankinmax commented Aug 19, 2026

Copy link
Copy Markdown

@OCA-git-bot OCA-git-bot added mod:fs_storage Module fs_storage series:17.0 mod:fs_storage_environment Module fs_storage_environment labels Aug 19, 2026
@yankinmax
yankinmax marked this pull request as draft August 19, 2026 15:33
@OCA-git-bot OCA-git-bot added mod:fs_attachment Module fs_attachment mod:fs_attachment_s3 Module fs_attachment_s3 mod:fs_attachment_s3_environment Module fs_attachment_s3_environment mod:fs_attachment_environment Module fs_attachment_environment mod:storage_backend Module storage_backend mod:storage_backend_sftp Module storage_backend_sftp mod:storage_backend_environment Module storage_backend_environment mod:storage_backend_sftp_environment Module storage_backend_sftp_environment labels Aug 20, 2026
@yankinmax
yankinmax marked this pull request as ready for review August 20, 2026 08:31
@yankinmax

Copy link
Copy Markdown
Author

Hello @etobella @lmignon @ivantodorovich
In this PR I've cherry-picked the commits from merged 16.0 PR.
I squashed the commits that are related to one module split.
I've added new commits for storage_backend* modules.
The upgrade scripts and uninstall hooks are added for each module.
image_tag split is handled separately, because it doesn't introduce any server_env_fields override, so only need the upgrade script:

@yankinmax yankinmax changed the title [17.0] [IMP] fs_storage: Remove dependency on server_environment [17.0] [IMP] storage: Remove dependency on server_environment Aug 20, 2026

@lmignon lmignon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the FWP

@ivantodorovich ivantodorovich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@yankinmax
yankinmax force-pushed the 17-storage-split branch 2 times, most recently from abb1082 to 04b1706 Compare August 24, 2026 07:17
Comment thread fs_storage_environment/__manifest__.py Outdated
"depends": ["fs_storage", "server_environment"],
"post_init_hook": "post_init_hook",
"uninstall_hook": "uninstall_hook",
"auto_install": True,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm are we sure we want to make these modules auto-install?
That means that if I still have server env installed for a different app (eg: mail) this module will be installed as well w/o any reason.
Since the migration is taking care of installing the modules I would say this has to change.
Am I missing any particular reason to keep auto-install?

@yankinmax yankinmax Aug 31, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason was to keep it as much as possible similar to what it was before, so making them auto install would prove the goal, but there is no specific reason.
WDYT @ivantodorovich @lmignon @etobella ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the next version of Odoo, we should remove the autoinstall. However, since this feature was enabled by default in existing versions, I think we should preserve the current default behaviour for backward compatibility.

BTW, I recently discovered the root cause of a strange behaviour with server.env.mixin, where some fields can no longer be edited manually. see OCA/server-env#289

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally, I've decided to remove auto_install and tend to agree with @simahawk :
All five upgrade scripts explicitly call button_install.
Removing auto_install:

  1. Preserves environment managed fields and previous behavior during upgrades.
  2. Prevents fresh installations from unexpectedly installing a storage_environment_* module just because server_environment is used a dependency by another module.
  3. The auto_install has never landed to recent versions actually. It was an idea to add it, but it seems there is no practical need.

@simahawk

simahawk commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The dependency is getting merged 😉

@yankinmax

Copy link
Copy Markdown
Author

The dependency is getting merged 😉

I'll update this PR without auto_install just after

@simahawk

simahawk commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@yankinmax ready for merge w/ nobump, right?

@yankinmax

Copy link
Copy Markdown
Author

@yankinmax ready for merge w/ nobump, right?

Yep, the version is bumped manually accordingly with upgrade script

@lmignon

lmignon commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

/ocabot merge nobmup

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @lmignon. Your command failed:

Invalid options for command merge: nobmup.

Ocabot commands

  • ocabot merge major|minor|patch|nobump
  • ocabot rebase
  • ocabot migration {MODULE_NAME}

More information

@lmignon

lmignon commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 17.0-ocabot-merge-pr-654-by-lmignon-bump-nobump, awaiting test results.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

@lmignon The merge process could not be finalized, because command twine upload --disable-progress-bar --non-interactive --repository-url https://upload.pypi.org/legacy/ -u __token__ odoo_addon_storage_backend_sftp_environment-17.0.1.0.0.3-py3-none-any.whl failed with output:

Uploading distributions to https://upload.pypi.org/legacy/
Uploading 
odoo_addon_storage_backend_sftp_environment-17.0.1.0.0.3-py3-none-any.whl
�[33mWARNING �[0m Error during upload. Retry with the --verbose option for more details. 
�[31mERROR   �[0m HTTPError: 429 Too Many Requests from https://upload.pypi.org/legacy/  
         Too Many Requests                                                      

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved mod:fs_attachment_environment Module fs_attachment_environment mod:fs_attachment_s3_environment Module fs_attachment_s3_environment mod:fs_attachment_s3 Module fs_attachment_s3 mod:fs_attachment Module fs_attachment mod:fs_storage_environment Module fs_storage_environment mod:fs_storage Module fs_storage mod:storage_backend_environment Module storage_backend_environment mod:storage_backend_sftp_environment Module storage_backend_sftp_environment mod:storage_backend_sftp Module storage_backend_sftp mod:storage_backend Module storage_backend series:17.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants