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

Relay - inconsistent link_connector_api/ path usage vs. Bunny and other Task APIs #14

Open
2 of 13 tasks
beforan opened this issue Jan 28, 2025 · 0 comments
Open
2 of 13 tasks
Milestone

Comments

@beforan
Copy link
Member

beforan commented Jan 28, 2025

Is this the right issue type?

  • Yes, I'm planning work for this project team.

Summary

This issue represents work on both Upstream and Downstream aspects of Relay, around the inconsistent use of link_connector_api/ in endpoint paths.

Downstream considerations

All of Relay's API endpoints are served from the root path /, even for Task API compatible endpoints.

This is inconsistent with other Task API implementations, which separate their API surfaces, and put the Task API in particular under the path link_connector_api/

For improved compatibility with downstream clients, Task API endpoint implementations in Relay should be moved to the path link_connector_api/. This also makes it easier for Relay to have other endpoints in future if desirable.

Upstream considerations

Both Bunny and Relay are configurable with the Base URL of their Upstream Task APIs, but they behave differently:

  • Bunny requires both the host and the API base path, e.g. for link_connector_api endpoints (which are all Bunny cares about currently) it would require the following config:

    • Standard Task API implementations: https://my-task-api.com/link_connector_api/
    • Relay: https://my-relay.com/
  • Relay requires only the host in its configuration, and auto appends link_connector_api/ path

This makes configuring Relay arguably nicer, but also means when combined with the Downstream considerations above, that Relay currently is incompatible with itself; i.e. you can't chain Relays together because the Downstream one will append the wrong path for the endpoints on the Upstream one.

Configuration is also arguably confusing as if you configure it the same way as Bunny for standard Upstream servers, it won't work as the final base API URL would be: https://my-task-api.com/link_connector_api/link_connector_api/

To combat this, Relay should check if the configured URL ends with the path, and add it if not. And Relay should standardise it's endpoint paths so it's compatible with itself.

Acceptance Criteria

  • Relay Upstream Base URL config https://my-task-api.com/link_connector_api/ resolves to https://my-task-api.com/link_connector_api/
  • Relay Upstream Base URL config https://my-task-api.com/ resolves to https://my-task-api.com/link_connector_api/
  • Relay Task API endpoints are found at the path link_connector_api/
  • A chain of Relays works
    • example setup: RQuest -> Relay -> Relay -> Bunny
  • Tests pass.
  • Documentation added.

Tasks

  • Change Task API endpoint paths
  • Adjust client (this may be RACKit code) to detect if the link_connector_api/ path needs appending, and only add it if it does
  • Confirm it works as expected
  • Unit tests.
  • Documentation.

Confirm creation

  • This issue is ready
@AndyRae AndyRae added this to the Relay v1.0.0 milestone Jan 28, 2025
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

No branches or pull requests

2 participants