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

feat: index ad removal command #1859

Merged
merged 2 commits into from
Jan 9, 2024
Merged

feat: index ad removal command #1859

merged 2 commits into from
Jan 9, 2024

Conversation

LexLuthr
Copy link
Collaborator

This command will send an ad to IPNI to remove the indexes for a particular deal. This command is to be used for removing deals not being cleaned up by automated system in Boost.

api/api.go Outdated
@@ -41,6 +41,8 @@ type Boost interface {
BoostDeal(ctx context.Context, dealUuid uuid.UUID) (*smtypes.ProviderDealState, error) //perm:admin
BoostDealBySignedProposalCid(ctx context.Context, proposalCid cid.Cid) (*smtypes.ProviderDealState, error) //perm:admin
BoostDummyDeal(context.Context, smtypes.DealParams) (*ProviderDealRejectionInfo, error) //perm:admin
BoostIndexerAnnounceDealRemoved(ctx context.Context, pieceCid cid.Cid) (cid.Cid, error) //perm:admin
LegacyDealByProposalCid(ctx context.Context, propCid cid.Cid) (storagemarket.MinerDeal, error) //perm:admin
Copy link
Member

Choose a reason for hiding this comment

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

This is added under Boost MethodGroup, so maybe add Boost prefix?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated. The reason to have it under Boost group is ensure compatibility after removing legacy markets.

@@ -454,6 +458,17 @@ func (s *BoostStub) BoostIndexerAnnounceAllDeals(p0 context.Context) error {
return ErrNotSupported
}

func (s *BoostStruct) BoostIndexerAnnounceDealRemoved(p0 context.Context, p1 cid.Cid) (cid.Cid, error) {
if s.Internal.BoostIndexerAnnounceDealRemoved == nil {
return *new(cid.Cid), ErrNotSupported
Copy link
Member

Choose a reason for hiding this comment

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

I think you can just use cid.Undef instead of *new(cid.Cid)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is auto generated by the make gen. We might have to adjust the types in api gen for this. I am not sure if it is worth the required changes.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, sorry, didn't notice this is the auto-generated part of the API.

@LexLuthr LexLuthr requested a review from nonsense January 8, 2024 12:40
@LexLuthr LexLuthr merged commit 71450ee into main Jan 9, 2024
22 checks passed
@LexLuthr LexLuthr deleted the feat/index-removal-ad branch January 9, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants