web3.storage
web3.storage copied to clipboard
feat: list uploads joins to backup table to get backup urls
Motivation:
- add support for backup urls from backup table to https://github.com/web3-storage/web3.storage/pull/2347
Could we get more info about why we are adding this table? We actually had it before and moved towards having a column within upload table later on.
@vasco-santos I'm mainly adding it here to reflect the reality of this table existing in staging/production, and so that the local dev flow creates it so the tests can query against it and pass, and I did that because I thought you, me, and @alanshaw all wanted to make sure that this uploads list api would include backup urls from that backup table in prod.
Now, I just want to 'add it' to the code so the local dev and ci/test setup have access to it. I don't want to (re-?)add it in staging/production, because I think it's already there. That's why I didn't add a migration, because I don't want to run a migration on staging/production. I want the localdev to reflect what is running in staging/prod, but only insofar as I can run tests locally that use that table.
Does that seem reasonable why there is not a migration or do you still think I should add one @vasco-santos ?
@vasco-santos we never ran a migration to get the data out of the old backup table so it still exists in production. @gobengo just needs it to exist again for local dev and testing so that in production it all works.
Interesting we did not run the migration, the script was created https://github.com/web3-storage/web3.storage/pull/1305
Perhaps we could just run it now and get rid of backup table instead of making the list more complex? I do not want to block the plan, so if you prefer to go this way is fine for me :) I just though the backup table had been migrated
:warning: the migration may have run but a quick check and I have found entries in backup that are not in upload.backup_urls.
@gobengo does this need to get deployed?
Website preview 🔗✨
- ⛅️ https://663a2956.web3-storage-staging.pages.dev
build log
After deploying to staging via this, I verified w3 list calling the list uploads api still works ok. Going to release to prod.
i had to do this other PR to ensure this change to db package got incorporated into released api service https://github.com/web3-storage/web3.storage/pull/2362
verified in prod after deploy: w3 list works against prod.