Project

Profile

Help

Network maintenance. Planio will be observing two scheduled maintenance windows this Tuesday, March 2 and Wednesday, March 3 from 02:00 UTC until 06:00 UTC each in order to perform maintenance on access routers in our primary datacenter. Your account might observe short downtimes during these periods up to several minutes at a time.

Story #7731

As a user, I can use a /metadata endpoint to efficiently tell me if I need to perform a sync at all

Added by bmbouter 4 months ago. Updated 13 days ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

This story includes both the server and client sync implementation.

The idea is to have the repositoryversion's creation time be exposed as a 'created_at' timestamp at a url in the Galaxy V3 API at /metadata/. That would be listed in the v3 section of urls.py here.

So for a AnsibleDistribution with base_path='my_content' you would be able to fetch:

GET http://example.com/pulp_ansible/galaxy/my_content/api/v3/metadata/ which would return:

{
	"created": 1603308427
}

The value is the unix epoch time. This is taken from the repository verison pulp_created field which already exists.

Sync usage

Add a metadata_created filed to AnsibleRepository which can be None.

When syncing an AnsibleRepository:

  1. If using the Galaxy V3 API specifically, attempt to fetch /metadata/ early in the sync flow and ignore a 404
  2. If it returns a value compare it to the existing one stored on the AnsibleRepository.
  3. If the value is the same as the one stored do not continue syncing
  4. If syncing does continue then save the newly fetched value onto AnsibleRepository.metadata_created for comparison later.

It should not attempt to fetch this for the V2 API if possible, otherwise ignore it.


Related issues

Is duplicate of Ansible Plugin - Story #7939: As a user, the /v3/ endpoint returns the repository_version.created timeCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by bmbouter 4 months ago

  • Project changed from Pulp to Ansible Plugin

#2 Updated by fao89 4 months ago

  • Parent task set to #7777

#3 Updated by fao89 4 months ago

  • Parent task deleted (#7777)

#4 Updated by bmbouter 13 days ago

  • Status changed from NEW to CLOSED - DUPLICATE

#5 Updated by bmbouter 13 days ago

  • Is duplicate of Story #7939: As a user, the /v3/ endpoint returns the repository_version.created time added

Please register to edit this issue

Also available in: Atom PDF