Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time control #499

Open
MFAshby opened this issue Apr 7, 2022 · 1 comment
Open

Time control #499

MFAshby opened this issue Apr 7, 2022 · 1 comment

Comments

@MFAshby
Copy link

MFAshby commented Apr 7, 2022

Problem I need to solve

I want to control the current date and time in full system tests, for reproducible tests and to test edge cases around dates (e.g. leap days).

Solution I see

An API within aidbox, to set / clear a fixed time value. This value should be used throughout the application instead of the current date and time. This API should be enabled by a feature flag and not available in production deployments.

Alternatives I've considered, but they don't work

libfaketime installed on the postgresql server, however this causes some other issues with postgres, since any functions getting the date and time are affected, which affects scheduling behaviour, logging, which I don't want to interfere with. I want to affect only application-level data (e.g. created date and time on .Meta elements).

Patching postgres to introduce an API for controlling the current date and time. This would be very difficult to maintain.

Intercepting queries issues from aidbox and transforming them to fix the date and time. This is also difficult to maintain.

Additional context

@github-actions
Copy link

github-actions bot commented Jun 7, 2022

This issue has been automatically marked as stale because it has not had activity in the last 30 days. Please make sure you've added all the necessary details including clear description and severity level.

@github-actions github-actions bot added the stale label Jun 7, 2022
@Nesmeshnoy Nesmeshnoy removed the stale label Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants