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

Create method to copy remote API to local schema #20

Open
preaction opened this issue Feb 9, 2018 · 0 comments
Open

Create method to copy remote API to local schema #20

preaction opened this issue Feb 9, 2018 · 0 comments

Comments

@preaction
Copy link
Member

preaction commented Feb 9, 2018

It's useful to run CPAN Testers processes locally for testing purposes. But, to make useful tests, we need real data to work with.

For example, in order for the backend processes to run, we need the uploads table. It's too onerous to require the user to mirror CPAN and run the upload backend process. To test some backend processes, we would need some rows from the test_reports table and the uploads table.

We should have a method on the schema object, fetch, that syncs data from a remote API server. It should take a list of arguments of API path parts and an optional hashref of query parameters for that API. It should make the request, and be able to map the data that comes back from the API into the correct CPAN::Testers::Schema ResultSet class to write to the local database.

This method should be able to fetch:

  • upload - The CPAN Uploads table
  • report - Test reports
  • summary - Test report summaries
  • release - Test report releases

There should be an option to automatically fulfill dependencies in the data: summary rows require report and upload rows. release rows require summary rows (and all summary row dependencies).

It would be nice if we could search using MetaCPAN's database and then fill our database with the distributions we find. This would make it easy to, for example, create a local database full of the test reports for the current releases of modules high in the CPAN river.

preaction added a commit that referenced this issue Apr 27, 2019
This is useful for development instances to give them some real data for
testing purposes.

This does not yet download full reports. That should be completed before
the ticket is considered done.

Refs #20
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

No branches or pull requests

1 participant