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

EAM API: only UUID format for IDs is too strict #303

Open
gainsley opened this issue Sep 19, 2024 · 2 comments
Open

EAM API: only UUID format for IDs is too strict #303

gainsley opened this issue Sep 19, 2024 · 2 comments
Labels
enhancement Suggesting ideas for new API features or questions on directions for API evolution

Comments

@gainsley
Copy link
Collaborator

Problem description

AppId, EdgeCloudZoneId, etc IDs are currently defined as strings with format UUID. Our platform currently uses ULIDs. It's not really feasible for us to convert to use UUIDs because of existing deployments. We would like to add ULID as an additional allowed format for IDs.

Possible evolution

New IDs would have the following type definition:

type: string
anyOf:
- format: uuid
- format: ulid 

Alternative solution

An alternative would be to remove the format requirement completely. As long as the platform can guarantee that the IDs it generates are unique, then any format should be ok.

In particular, platforms using an SQL database will likely have IDs of type uint64.

An argument that IDs must be unique outside of the Edge Cloud Platform (i.e. for federation) does not seem like good practice, it would better to scope foreign IDs to the partner federation so there is no possibility of conflicts with our own IDs.

Additional context

@gainsley gainsley added the enhancement Suggesting ideas for new API features or questions on directions for API evolution label Sep 19, 2024
@gainsley
Copy link
Collaborator Author

gainsley commented Sep 20, 2024

See also #259: For federation EWBI API, AppId cannot be a UUID.

@gainsley
Copy link
Collaborator Author

gainsley commented Nov 6, 2024

Any comments on this? The only potential reason to specify a format would be because these IDs are used in URL paths (i.e. DELETE /apps/{appId} and it would be nice (but not necessary) for them to use URL-safe characters. But non-URL-safe chars can always be encoded. Otherwise I don't see any reason to restrict the ID format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Suggesting ideas for new API features or questions on directions for API evolution
Projects
None yet
Development

No branches or pull requests

1 participant