Skip to content

chore(data): use prod data for test_all_instances, and centralize config for data directory#452

Merged
Shillaker merged 1 commit intoBoavizta:mainfrom
Shillaker:fix/test-all-instances-prod-data
Jan 29, 2026
Merged

chore(data): use prod data for test_all_instances, and centralize config for data directory#452
Shillaker merged 1 commit intoBoavizta:mainfrom
Shillaker:fix/test-all-instances-prod-data

Conversation

@Shillaker
Copy link
Copy Markdown
Collaborator

@Shillaker Shillaker commented Jan 20, 2026

Context

I have modified the work of @ju3ouz4n in #395 to test all cloud instances on the "prod" data. This should guarantee that we no longer have instances in the API that cause errors.

This is part of the solution suggested for #390.

Summary

  • Centralized all data directory references to use the logic defined in boaviztapi/__init__.py
  • Fixed inconsistent imports in test files that were importing data_dir from the test-specific module
  • Added concept of "E2E" tests, which run against production data (and take a long time)
  • Modify test config to run E2E tests only when specified, which makes make test a lot quicker 🏃

Changes

  • Added tests/conftest.py with --rune2e pytest option to run E2E tests separately
  • Moved cloud E2E tests (test_all_instances to tests/api/test_cloud_e2e.py), and marked as e2e
  • Removed use of test data_dir
  • boaviztapi/__init__.py - use test data only if running tests, and --rune2e not specified, otherwise use prod data (i.e. for normal operation, and E2E tests)
  • Add job in tests workflow to run E2E tests

@Shillaker Shillaker changed the title fix: centralize use of data directory chore(data): centralize config for data directory, and use prod data for test_all_instances Jan 20, 2026
@Shillaker Shillaker changed the title chore(data): centralize config for data directory, and use prod data for test_all_instances chore(data): use prod data for test_all_instances, and centralize config for data directory, and Jan 20, 2026
@Shillaker Shillaker changed the title chore(data): use prod data for test_all_instances, and centralize config for data directory, and chore(data): use prod data for test_all_instances, and centralize config for data directory Jan 20, 2026
await test.check_result()


@pytest.mark.asyncio
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

note: moved to tests/api/test_cloud_e2e.py

@Shillaker Shillaker force-pushed the fix/test-all-instances-prod-data branch 2 times, most recently from 1dd49aa to aeab488 Compare January 20, 2026 15:49
@Shillaker Shillaker marked this pull request as ready for review January 20, 2026 15:49
@Shillaker Shillaker force-pushed the fix/test-all-instances-prod-data branch from aeab488 to 3839e84 Compare January 21, 2026 13:50
@Shillaker Shillaker requested a review from jonperron January 21, 2026 14:57
@ju3ouz4n
Copy link
Copy Markdown
Contributor

Hello @Shillaker , I took a look at the PR, it looks good to me (althought i did not run it on my env). I thought it would be convenient to use Env var to specify data_dir, i saw you had not kept that, maybe bc it added a dependency.
Splitting tests in two jobs on the workflow is a good idea!
Thanks

@Shillaker
Copy link
Copy Markdown
Collaborator Author

Ok great, thanks!

Yes I should have been clearer on why I didn't adopt the env-var change. I think it's a good idea, but currently we have config stored in two YAML files, and adding env vars means we then have two methods of configuration.

Instead, I propose that we move all config to using pydantic-settings as you proposed, and in doing that, we can also set the data dirs. I've put the details in #462. Let me know if you have any comments.

@Shillaker
Copy link
Copy Markdown
Collaborator Author

There will be some small conflicts between this PR and #464, but I will manage them at merge time once they are both approved.

@Shillaker Shillaker merged commit 27d7fb7 into Boavizta:main Jan 29, 2026
8 checks passed
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.

3 participants