Skip to content

[FIX] various improvements to test execution and rest connector#140

Merged
sea-odoo merged 8 commits into
betafrom
fix/various-improvements-beta
Apr 9, 2026
Merged

[FIX] various improvements to test execution and rest connector#140
sea-odoo merged 8 commits into
betafrom
fix/various-improvements-beta

Conversation

@sea-odoo
Copy link
Copy Markdown
Contributor

@sea-odoo sea-odoo commented Apr 1, 2026

This PR includes improvements to Odoo test execution error handling, simplified subcommand input formatting, and forced authentication in RestConnector downloads.

@sea-odoo sea-odoo force-pushed the fix/various-improvements-beta branch from 0103d2d to 9da71d0 Compare April 1, 2026 12:40
Comment thread odev/common/commands/odoobin.py
Comment thread odev/common/commands/odoobin.py
brinkflew
brinkflew previously approved these changes Apr 3, 2026
- Use readlink -f in odev.sh for better script resolution
- Refactor database template creation logic
- Relax database name validation to allow colons
- Include request body in RestConnector cache key
- Fix odev.plugins module initialization for Python 3 compatibility
- Deduplicate addons paths
- Proper shell quoting for python script arguments
sea-odoo added 4 commits April 7, 2026 12:48
- Fixed carriage return handling in shell stream to avoid broken log formatting.
- Enhanced ODOO_LOG_REGEX to support logs without date or PID.
- Standardized version, venv, and worktree resolution to look for *_argument attributes in commands.
- Added combined_odoo_args to handle Odoo flags captured by positional 'addons' argument.
- Implemented --command flag support for 'odev shell' to pipe code via stdin.
- Added EmployeeUtils to centralize Odoo employee detection and xgram retrieval.
- Updated Telemetry to use the new utility.
Implemented native 'upgrade_code' tool support. The command includes logic to automatically handle shell glob expansion and reconstruct target glob patterns for the Odoo upgrade tool.
Comment thread odev/commands/database/upgrade_code.py Outdated
Comment on lines +67 to +77
# Redeclare database to ensure its order is correct
database_arg = args.String(
name="database",
description="The database to target (used for version/path resolution).",
)

# Catch-all for extra arguments
odoo_args = args.String(
nargs="*",
description="Additional arguments to pass to odoo-bin.",
)
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.

Isn't this already inherited from OdoobinCommand?

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.

This could have been its own PR haha

Comment thread odev/common/utils.py Outdated
secret = self.odev.store.secrets.get("accounts.odoo.com", ["login"], scope="user", ask_missing=False)
if secret and secret.login.endswith("@odoo.com"):
return secret.login.split("@")[0]
except Exception: # noqa: BLE001, S110
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.

Don't use blind exceptions

Comment thread odev/common/utils.py Outdated
email = process.stdout.decode().strip()
if email.endswith("@odoo.com"):
return email.split("@")[0]
except Exception: # noqa: BLE001, S110
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.

Same here

@sea-odoo sea-odoo merged commit fbb2184 into beta Apr 9, 2026
6 checks passed
@sea-odoo sea-odoo deleted the fix/various-improvements-beta branch April 9, 2026 13:27
sea-odoo added a commit that referenced this pull request Apr 25, 2026
* [FIX] various improvements to test execution and rest connector

* core: miscellaneous improvements and bug fixes

- Use readlink -f in odev.sh for better script resolution
- Refactor database template creation logic
- Relax database name validation to allow colons
- Include request body in RestConnector cache key
- Fix odev.plugins module initialization for Python 3 compatibility
- Deduplicate addons paths
- Proper shell quoting for python script arguments

* [FIX] Version bump

* [IMP] core: improve odoo log parsing and argument handling

- Fixed carriage return handling in shell stream to avoid broken log formatting.
- Enhanced ODOO_LOG_REGEX to support logs without date or PID.
- Standardized version, venv, and worktree resolution to look for *_argument attributes in commands.
- Added combined_odoo_args to handle Odoo flags captured by positional 'addons' argument.
- Implemented --command flag support for 'odev shell' to pipe code via stdin.

* [IMP] core: introduce EmployeeUtils and refactor telemetry

- Added EmployeeUtils to centralize Odoo employee detection and xgram retrieval.
- Updated Telemetry to use the new utility.

* [IMP] core: add upgrade-code command for Odoo 18.0+

Implemented native 'upgrade_code' tool support. The command includes logic to automatically handle shell glob expansion and reconstruct target glob patterns for the Odoo upgrade tool.

* [FIX] Fix after review

* [FIX] Fix failing test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants