Skip to content

[FIX] Harden CI, enforce coverage, and expand tests for stability#138

Open
brinkflew wants to merge 2 commits intobetafrom
avs-stability
Open

[FIX] Harden CI, enforce coverage, and expand tests for stability#138
brinkflew wants to merge 2 commits intobetafrom
avs-stability

Conversation

@brinkflew
Copy link
Copy Markdown
Contributor

Description

The workflow used a multiline Python version list, which made the matrix non-deterministic; POSTGRES_HOST pointed at a non-existent hostname; and --exitfirst hid secondary failures. CI now pins one Python per job, waits for PostgreSQL, uses localhost for the DB host, pins the apt-cache action, refreshes Odoo cache keys, and runs the full suite with coverage report.

Coverage had no floor, so regressions could slip through. fail_under and show_missing align local and CI reporting with CONTRIBUTING.

REST had no default timeout and nocache could leave bypass flags set after errors; Postgres Cursor.transaction committed after rollback. Defaults and try/finally restore predictable behavior without changing call sites.

fetch referenced self.args.name in an error path (wrong attribute), which crashed instead of surfacing a clean command error.

Tests previously picked up the user plugins directory in test mode, so machine-local plugin cycles could break the whole suite. Pointing plugins_path at the run temp dir isolates runs.

Added tests for __main__, connectors, plugin registration and dependency cycles, git/scripts commands, and database info/neutralize/dump.

Compliance

  • I have read the contribution guide
  • I made sure the documentation is up-to-date both in doctrings and the docs directory
  • I have added or modified unit tests where necessary
  • I have added new libraries to the requirements.txt file, if any
  • I have incremented the version number according the versioning guide
  • The PR contains my changes only and no other external commit

@brinkflew brinkflew self-assigned this Mar 27, 2026
@brinkflew brinkflew added enhancement New feature or request framework Improvements or additions to the Odev framework labels Mar 27, 2026
@brinkflew brinkflew force-pushed the avs-stability branch 4 times, most recently from 43ef013 to 19af527 Compare March 27, 2026 23:56
@brinkflew brinkflew marked this pull request as ready for review March 28, 2026 00:00
@brinkflew brinkflew requested a review from sea-odoo March 28, 2026 00:00
sea-odoo
sea-odoo previously approved these changes Mar 28, 2026
)


ODOO_DB_VERSION = "18.0"
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.

WHy 18 and not 19 ?

stdout, _ = self.dispatch_command("neutralize", self.database_name)

neutralize.assert_called_once_with()
self.assertIn("has been neutralized", stdout)
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.

It only looks about the log ? Not the actual result in the db ?

When topological_sort fails, enumerate simple_cycles and append a
human-readable chain to OdevError so users can see which plugins
participate in the cycle.
The workflow used a multiline Python version list, which made the matrix
non-deterministic; POSTGRES_HOST pointed at a non-existent hostname; and
--exitfirst hid secondary failures. CI now pins one Python per job, waits for
PostgreSQL, uses localhost for the DB host, pins the apt-cache action, refreshes
Odoo cache keys, and runs the full suite with `coverage report`.

Coverage had no floor, so regressions could slip through. `fail_under` and
`show_missing` align local and CI reporting with CONTRIBUTING.

REST had no default timeout and nocache could leave bypass flags set after
errors; Postgres `Cursor.transaction` committed after rollback. Defaults and
try/finally restore predictable behavior without changing call sites.

`fetch` referenced `self.args.name` in an error path (wrong attribute),
which crashed instead of surfacing a clean command error.

Tests previously picked up the user plugins directory in test mode, so
machine-local plugin cycles could break the whole suite. Pointing
`plugins_path` at the run temp dir isolates runs.

Added tests for `__main__`, connectors, plugin registration and dependency
cycles, git/scripts commands, and database info/neutralize/dump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request framework Improvements or additions to the Odev framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants