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: ucan stream handles receipts #174

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

vasco-santos
Copy link
Contributor

This PR hooks kinesis consumers with receipts, instead of previous world where it would hook up with workflows. For this, it simply filters out Kinesis events that are not receipts as they should not be account for the metrics we want to track at the moment.

As talked in today`s morning sync, setting up a new Kinesis stream so that:

  • we reset clock history of 1 year
  • we still keep old stream around so that we can persist what is there to S3 (or even re-process it and pipe to the new stream with receipts and needed files in correct buckets!)

@seed-deploy seed-deploy bot temporarily deployed to pr174 March 23, 2023 14:07 Inactive
@seed-deploy
Copy link

seed-deploy bot commented Mar 23, 2023

View stack outputs
  • pr174-w3infra-CarparkStack

    Name Value
    BucketName carpark-pr174-0
    Region us-east-2
  • pr174-w3infra-SatnavStack

    Name Value
    BucketName satnav-pr174-0
    Region us-east-2
  • pr174-w3infra-UploadApiStack

    Name Value
    ApiEndpoint https://u8q02tull2.execute-api.us-east-2.amazonaws.com
    CustomDomain https://pr174.up.web3.storage
  • pr174-w3infra-BusStack

  • pr174-w3infra-ReplicatorStack

  • pr174-w3infra-UcanInvocationStack

  • pr174-w3infra-UploadDbStack

@vasco-santos vasco-santos marked this pull request as ready for review March 23, 2023 14:26
@vasco-santos vasco-santos added this to the w3up phase 3 milestone Mar 23, 2023
@vasco-santos vasco-santos force-pushed the feat/ucan-stream-handle-receipts branch from 45543c0 to e7bf749 Compare March 23, 2023 14:39
@seed-deploy seed-deploy bot temporarily deployed to pr174 March 23, 2023 14:39 Inactive
@@ -189,8 +189,17 @@ export function UcanInvocationStack({ stack, app }) {
deadLetterQueue: spaceMetricsDLQ.cdk.queue,
})

// TODO: keep for historical content that we might want to process
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vasco-santos vasco-santos merged commit 817eb0f into main Mar 23, 2023
@vasco-santos vasco-santos deleted the feat/ucan-stream-handle-receipts branch March 23, 2023 14:52
Comment on lines +11 to +12
WORKFLOW: 'application/invocations+car',
RECEIPT: 'application/receipt+dag-cbor'
Copy link
Contributor

Choose a reason for hiding this comment

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

  • the + suffix denotes an existing media type which are registered as vnd.ipld.car and vnd.ipld.dag-cbor
  • the prefix is a tree, and we can add things to the vnd tree without much fuss like:
application/vnd.w3.ucan+vnd.ipld.car
application/vnd.w3.ucan.receipt+vnd.ipld.dag-cbor

of if we really don't care then

application/x.ucan+vnd.ipld.car
application/x.ucan.receipt+vnd.ipld.dag-cbor

see: https://en.wikipedia.org/wiki/Media_type#Naming

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

note that our notion of an invocation is currently a short lived ucan delegation that we as a service provider choose to interpret as an invocation. they are not explicitly invocation ucans.

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.

3 participants