web3.storage icon indicating copy to clipboard operation
web3.storage copied to clipboard

feat: list uploads joins to backup table to get backup urls

Open gobengo opened this issue 1 year ago • 4 comments

Motivation:

  • add support for backup urls from backup table to https://github.com/web3-storage/web3.storage/pull/2347

gobengo avatar Jan 09 '24 23:01 gobengo

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 ?

gobengo avatar Jan 22 '24 17:01 gobengo

@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.

alanshaw avatar Jan 22 '24 18:01 alanshaw

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

vasco-santos avatar Jan 23 '24 08:01 vasco-santos

:warning: the migration may have run but a quick check and I have found entries in backup that are not in upload.backup_urls.

alanshaw avatar Jan 23 '24 13:01 alanshaw

@gobengo does this need to get deployed?

alanshaw avatar Mar 11 '24 15:03 alanshaw

Website preview 🔗✨

  • ⛅️ https://663a2956.web3-storage-staging.pages.dev

build log

github-actions[bot] avatar Mar 11 '24 17:03 github-actions[bot]

After deploying to staging via this, I verified w3 list calling the list uploads api still works ok. Going to release to prod.

gobengo avatar Mar 11 '24 18:03 gobengo

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.

gobengo avatar Mar 11 '24 19:03 gobengo