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: unify ucan api endpoints #328

Closed
wants to merge 0 commits into from
Closed

Conversation

gobengo
Copy link
Contributor

@gobengo gobengo commented Jan 6, 2023

Motivation:

Status

  • approach changed after decision 2 to not have a new api-gateway package as I was making here, but instead to just add functionality into access-api

Parts

  • poc proxying to access-api
  • poc proxying to upload-api
  • make upstreams and route function configurable
  • staging deploy to cf workers
  • test dev url with access-client
  • test dev url with upload-client
  • script to run tests against an arbitrary url
    • run the script in github workflow after deploying to cf workers
  • better GET / response than 'hello world' (e.g. explain what you're looking at)
  • test multiple invocations to same service in same ucanto request
  • test multiple invocations to different services in same ucanto request
    • needs to split into multiple upstream requests and await response

@gobengo gobengo linked an issue Jan 6, 2023 that may be closed by this pull request
3 tasks
@gobengo gobengo temporarily deployed to dev January 6, 2023 01:59 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 6, 2023 02:02 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 6, 2023 02:47 — with GitHub Actions Inactive
? await toBuffer(toIt(request.body))
: Uint8Array.from([]),
})
if (invocations.length !== 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should requests to carry a single invocations, it's been designed to send batches of invocations in a single request.

Also I think you don't need to do most of these, you could simply define a server just like you usually would except don't wrap handler in provider that way handler will be called without performing any kind of validation and you'll be able to execute it on desired connection.

https://github.com/web3-storage/w3protocol/blob/4cfe312c9501c2c595a2c7f3fe768d58be1dbc7b/packages/access-api/src/service/index.js#L24-L31

@gobengo gobengo temporarily deployed to dev January 10, 2023 01:12 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 01:14 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 01:20 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 01:23 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 01:24 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 01:33 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 01:38 — with GitHub Actions Inactive
@gobengo gobengo requested a deployment to dev January 10, 2023 01:39 — with GitHub Actions Abandoned
@gobengo gobengo temporarily deployed to dev January 10, 2023 01:39 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 01:41 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 01:49 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 01:52 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 01:54 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 02:03 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 02:13 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 02:14 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 02:24 — with GitHub Actions Inactive
@gobengo gobengo force-pushed the 325-unify-ucan-api-endpoints branch from 51fe560 to 83ff9b6 Compare January 10, 2023 02:28
@gobengo gobengo temporarily deployed to dev January 10, 2023 02:29 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 02:33 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 02:35 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 02:58 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 03:04 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 03:08 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev- January 10, 2023 03:15 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev- January 10, 2023 03:22 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 03:23 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev- January 10, 2023 03:24 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 03:25 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev- January 10, 2023 03:29 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 03:29 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev- January 10, 2023 03:36 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 03:37 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev- January 10, 2023 04:52 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 04:53 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev- January 10, 2023 05:04 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 05:05 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev- January 10, 2023 05:07 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 05:08 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev- January 10, 2023 05:10 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 05:11 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev-refs-heads-325-unify-ucan-api-endpoints January 10, 2023 05:16 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 05:17 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev-refs-heads-325-unify-ucan-api-endpoints January 10, 2023 05:22 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 05:23 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev/refs-heads-325-unify-ucan-api-endpoints/api-gateway January 10, 2023 05:29 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev January 10, 2023 05:30 — with GitHub Actions Inactive
@gobengo gobengo temporarily deployed to dev/refs-heads-325-unify-ucan-api-endpoints/api-gateway January 10, 2023 05:38 — with GitHub Actions Inactive
@gobengo
Copy link
Contributor Author

gobengo commented Jan 10, 2023

lots of ugly commits for what was ultimately a silly mistake in my github workflow yaml. My bad. We'll squash when this PR merges.

Good news is now commits to api-gateway will get a dev deployment, e.g. https://refs-heads-325-unify-ucan-api-endpoints.protocol-labs.workers.dev/

tomorrow I will test it using access-client and upload-client

@gobengo
Copy link
Contributor Author

gobengo commented Jan 10, 2023

Status

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.

Unify UCAN API endpoints
2 participants