pulp / pulp/pulpcore

As a user, I want to see the last time a remote was synced.

Open
#2,863 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature GalaxyNG
Dominant language
Python
Stars
598
Forks
168
Avg merge
1d 4h
Merged PRs (30d)
86

Description

Is your feature request related to a problem? Please describe.
When I look through the remotes on the API, I want to know the details of the last time the remote was synced. This information helps me understand how up to date my content is and alert me if any syncs are failing.

Describe the solution you'd like
On the remote API response I would like to see a field like this:

            "last_sync_task": {
                "pulp_href": "/pulp/api/v3/tasks/abf24c48-cc91-4ac2-b628-5b05f06c218f/",
                "state": "running"
            },

This can be accomplished by looking up the latest task that includes the given remote in reserved_resource_record. There are two options for serializing this. The task can either be added directly to the serializer like the example above, or returned as an href like so "last_sync_href": "/pulp/api/v3/tasks/abf24c48-cc91-4ac2-b628-5b05f06c218f/" with the option to view it in more detail through a feature such as related fields (https://github.com/pulp/pulpcore/pull/2828).

Additional context
This is a nice to have performance improvement for https://issues.redhat.com/browse/AAH-756. Without this feature, the galaxy ui will have to query /pulp/api/v3/tasks/?reserved_resource_record every time it needs to display sync information for a remote in the UI.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the remote API response and the task endpoint query using reserved_resource_record. Review how the latest task for a remote can be represented, including the related-fields approach in pulpcore#2828. Done means the remote response exposes its latest sync task or task href, including enough state or detail for the Galaxy UI without issuing a separate task query.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.