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

fix: add missing status UnexpectedlyUnpinned #1105

Merged
merged 2 commits into from
Mar 11, 2022

Conversation

alanshaw
Copy link
Member

Pins cron is currently failing with:

Error: unknown tracker status: unexpectedly_unpinned
    at toPinStatusEnum (file:///home/runner/work/web3.storage/web3.storage/packages/api/src/utils/pin.js:52:11)
    at file:///home/runner/work/web3.storage/web3.storage/packages/cron/src/jobs/pins.js:67:20
    at Array.map (<anonymous>)
    at updatePinStatuses (file:///home/runner/work/web3.storage/web3.storage/packages/cron/src/jobs/pins.js:52:49)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async main (file:///home/runner/work/web3.storage/web3.storage/packages/cron/src/bin/pins.js:16:3)

https://github.com/web3-storage/web3.storage/runs/5509298651?check_suite_focus=true

...this is because we do not model this new status in our API code or in our DB schema yet.

resolves #912

@flea89
Copy link
Contributor

flea89 commented Mar 11, 2022

Nice! 👏

Can you please also update the PSAStatus map here? 🙏

ps now that I look at it, that mapping logic might need to be reviewed, but I can do that as part of this

@alanshaw
Copy link
Member Author

ps now that I look at it, that mapping logic might need to be reviewed, but I can do that as part of this

yes I think it's missing some statuses and might be the cause

Copy link
Contributor

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@flea89
Copy link
Contributor

flea89 commented Mar 11, 2022

LGTM

@alanshaw alanshaw merged commit 118ceb0 into main Mar 11, 2022
@alanshaw alanshaw deleted the fix/add-missing-status-UnexpectedlyUnpinned branch March 11, 2022 15:38
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

Successfully merging this pull request may close these issues.

Cron pins job is failing
3 participants