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

Seeding Sentry REST API #514

Open
4 of 5 tasks
elpiel opened this issue Jun 22, 2022 · 0 comments · Fixed by #526, #520 or #559
Open
4 of 5 tasks

Seeding Sentry REST API #514

elpiel opened this issue Jun 22, 2022 · 0 comments · Fixed by #526, #520 or #559
Milestone

Comments

@elpiel
Copy link
Member

elpiel commented Jun 22, 2022

Due to the changes made in V5 which relying on redis to store the remaining budget for a Campaign a postgres seeding of the database is not sufficient for the sentry application anymore.

Combined with the fact that we also have a spendable amount for each Channel that will be regularly update by one of the Adapters (Dummy or Ethereum) we need to develop a way to fully seed the sentry application databases and setup the adapters prerequisites.

In this line of thought, here's what we can do to make the seeding of the development environment of sentry usable:

  • Create a set of Campaigns (like in test_harness) that will be used to populate the database (AdUnits, Channels, etc)
    Seeding was introduced in Sentry benchmark #526

  • A seeder can use a set of Deposits and Campaigns (and in turn Channels) to setup the database and adapter in the necessary state
    Seeding with deposits was introduced in Sentry benchmark #526

  • Dummy adapter should be improved upon the current functionality to return a set deposit no matter how often it is called until the value is changed (set a new value through the adapter). The current setup allows only to set a specific call on the Dummy and what value it should return on that specific call only.
    Dummy adapter deposit was introduced in Sentry dummy adapter deposits #520

The only outstanding tasks right now are to:

Seed data

We've already introduced 3 campaigns that are available when seeding the sentry application:
.../rust-validator/sentry$ cargo make run-seed (runs the seed binary)

Related work

  • test_harness - These capabilities are somewhat similar to what the test_harness is doing at the moment (setting Ethereum deposits, making API calls to create campaigns, events, etc.)

  • sentry REST API documentation - this setup is also related to the API documentation, since we need to be able to generate examples of the JSON responses, request queries, etc. for the sentry API endpoints.

@elpiel elpiel added this to the sentry-v0.2.0 milestone Jun 22, 2022
This was linked to pull requests Aug 5, 2022
@elpiel elpiel linked a pull request Oct 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment