Project

Profile

Help

Task #3160

Flatten url structure

Added by amacdona@redhat.com almost 2 years ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

This thread [0] contains the discussion of why we should un-nest the urls.

This task is to
1. make each url endpoint a top level resource
2. Adjust the fields (on serializers) that reference resources that have moved
3. Remove drf-nested-routers and all code that uses it.
4. Delete the extra code for routing (urls.py)

(3 and 4 moved to https://pulp.plan.io/issues/3168)

Example:
v3/repositories/ - This endpoint is already top level, but it contains some extra code (which should be removed) that allows it to be a parent endpoint. It also has fields `importer` and `publishers` that reference resources that will move.

This should be done all at once. If it isn't, a fair amount of extra work will have to go into fixing fields that will be changed again. (Also, some of that will not be possible to get working in the intermediate due to a drf-nested bug.)

When this is finished, the top level API should look like this:

v3/repositories/
v3/importers/<type>/
v3/publishers/<type>/
v3/publications/
v3/distributions/
v3/artifacts/
v3/content/<type>/
v3/repositorycontents/
v3/tasks/
v3/users/
v3/workers/
v3/status/
v3/jwt/

[0]: https://www.redhat.com/archives/pulp-dev/2017-November/msg00090.html

Associated revisions

Revision cbba0e49 View on GitHub
Added by amacdona@redhat.com almost 2 years ago

Move nested urls to flat structure

closes #3160

Revision cbba0e49 View on GitHub
Added by amacdona@redhat.com almost 2 years ago

Move nested urls to flat structure

closes #3160

Revision cbba0e49 View on GitHub
Added by amacdona@redhat.com almost 2 years ago

Move nested urls to flat structure

closes #3160

History

#1 Updated by amacdona@redhat.com almost 2 years ago

  • Description updated (diff)

#2 Updated by bmbouter almost 2 years ago

It would be cool if we could get the top-level API written here so we know what to expect. Something akin to the URLs on this page for Galaxy.

#3 Updated by amacdona@redhat.com almost 2 years ago

  • Description updated (diff)
  • Tags Pulp 3 added

#4 Updated by amacdona@redhat.com almost 2 years ago

  • Description updated (diff)

#5 Updated by daviddavis almost 2 years ago

  • Tags Pulp 3 MVP added

#6 Updated by amacdona@redhat.com almost 2 years ago

  • Status changed from NEW to POST

#7 Updated by amacdona@redhat.com almost 2 years ago

  • Blocks Task #3168: Remove drf-nested-routers dependency and simplify routing added

#8 Updated by amacdona@redhat.com almost 2 years ago

  • Description updated (diff)

In the interest of getting this done quickly, while also leaving our options open, I have not changed the routing in urls.py. The current routing is more complex than it needs to be for a flat structure, but it works. By leaving that code intact for now, we leave open the option for (1) versioned repos to be nested and (2) plugin live apis to be nested.

This means that we are keeping the drf-nested-routers and the routing, which I am moving to https://pulp.plan.io/issues/3168

#9 Updated by amacdona@redhat.com almost 2 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#10 Updated by amacdona@redhat.com over 1 year ago

  • Blocks deleted (Task #3168: Remove drf-nested-routers dependency and simplify routing)

#11 Updated by dkliban@redhat.com over 1 year ago

  • Sprint/Milestone set to 3.0

#12 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)

Please register to edit this issue

Also available in: Atom PDF