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

Cleanup repository deposits made by pass-acceptance-testing #992

Closed
markpatton opened this issue Jun 6, 2024 · 3 comments · Fixed by eclipse-pass/pass-support#119
Closed
Assignees
Labels
bug Something isn't working deployment
Milestone

Comments

@markpatton
Copy link
Contributor

What?

The pass-acceptance-testing tests are run against production on release. (Are they also run against staging? Should investigate staging as well.) They make deposits to JScholarship. The PASS objects created are cleaned up by pass-deposit-services, but there is nothing to cleanup the JScholarship deposits. Figure out and implement a cleanup mechanism.

Why?

Production jscholarship should not have test submissions.

How?

Perhaps we just need to setup a procedure to request that test submissions be deleted? Or perhaps pass-acceptance-testing (or pass-deposit-services) should be responsible for automatically deleting JScholarship test deposits.

Acceptance Criteria

Test deposits no longer accumulate in JScholarship.

Related Issues

@markpatton markpatton added bug Something isn't working deployment labels Jun 6, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Eclipse PASS Jun 6, 2024
@markpatton markpatton added this to the 1.8.0 milestone Jun 6, 2024
@dkriethof dkriethof moved this from Backlog to Ready for Development in Eclipse PASS Jun 6, 2024
@dkriethof dkriethof moved this from Ready for Development to Backlog in Eclipse PASS Jun 6, 2024
@rpoet-jh rpoet-jh self-assigned this Jun 6, 2024
@rpoet-jh rpoet-jh moved this from Backlog to In Progress in Eclipse PASS Jun 6, 2024
@rpoet-jh
Copy link
Contributor

rpoet-jh commented Jun 6, 2024

@markpatton @bbranan

Depending on what we want the goal of the deployment tests coverage to be, here are a few changes that could be made:

a) Change the test data cleanup to programmatically delete the test deposit from j10p in stage and prod. This assumes we are ok having the test deposit in prod j10p for a couple minutes. This also assumes there is a j10p api we can call to delete the deposit. We can also investigate if we can deposit our test submissions as hidden or not public in j10p, but that would require new code in deposit services to only do this for test submissions.

b) Change the deposit services to look for test submissions (any submission associated to the E2E test grant) and do everything except executing the transport code (sends the deposit to j10p) and set the Deposit to Accepted.

c) Do option a) for non-prod environment and do b) for prod environment.

d) Do b) for prod environment and keep deployment tests as they are for non-prod environment with a reminder to clean up test deposits in the j10p test instance every so often manually.

For the prod environment, if we don't do option a), then we will have no integration tests with prod j10p, so we won't know if there is an issue until an actual user tries to make a submission. This would be a compromise in how confident we can be when we deploy a new version of PASS.

@rpoet-jh
Copy link
Contributor

rpoet-jh commented Jun 7, 2024

We can also investigate if we can deposit our test submissions as hidden or not public in j10p, but that would require new code in deposit services to only do this for test submissions.

It does appear possible to DELETE an item based on the dspace docs: https://github.com/DSpace/RestContract/blob/dspace-7_x/items.md#deleting-an-item . We would have to try this out and ensure it works as expected.

@dkriethof dkriethof modified the milestones: 1.8.0, 1.9.0 Jun 25, 2024
@rpoet-jh
Copy link
Contributor

In the PASS weekly status meeting, we decided to go with option c) above with a small change. So in summary:

  • Run full E2E tests in stage with deposits into stage j10p (dpsace).
  • Write code that cleans up deposits in stage j10p. This could be a cron job running on dspace side, or it could be an dspace API call from the PASS test data cleanup job to delete the deposit from dspace. Analysis should be done to figure out which is the better solution.
  • Run full E2E tests in PROD, but don't deposit into prod j10p. This will require a change in the deposit services to not execute the actual j10p deposit if the Deposit is for a Submission related to the E2E test grant. In this case, a Deposit will be created and set to ACCEPTED, but no deposit made to prod j10p.

@rpoet-jh rpoet-jh moved this from In Progress to Peer Review/QA in Eclipse PASS Jul 15, 2024
@github-project-automation github-project-automation bot moved this from Peer Review/QA to Done in Eclipse PASS Jul 18, 2024
@rpoet-jh rpoet-jh moved this from Done to Deployed in Eclipse PASS Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deployment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants