Opened 15 years ago

Closed 14 years ago

#236 closed enhancement (fixed)

extend "list" command for henrietta CGI

Reported by: felix winkelmann Owned by:
Priority: minor Milestone:
Component: infrastructure Version:
Keywords: henrietta Cc: Mario Domenech Goulart
Estimated difficulty:

Description

Handy would be

  1. List all eggs with the highest available version
  2. send all *.meta files

Change History (5)

comment:1 Changed 15 years ago by Mario Domenech Goulart

Here's a suggestion for the henrietta API:

Have an action query string variable which could assume the following values: list, meta, version and versions

So we could have requests like (the first three examples consider compatibility with the current henrietta):

http://server/henrietta?name=<name>

Return the files for the latest version of egg <name>

http://server/henrietta?name=<name>&version=<version>

Return the files for the version <version> of egg <name>

http://server/henrietta?action=list

or

http://server/henrietta?list=1 (for backward compatibility)

List the egg names

http://server/henrietta?name=<name>&action=versions

Return a list of the available versions for egg <name> (most recent versions first).

http://server/henrieta?action=versions

Return a text response in the following format (one egg per line):

egg1 versionN versionN-1 ... version0
egg2 versionN versionN-1 ... version0
...
eggN versionN versionN-1 ... version0

where versionN is the latest version and version0 is the oldest version in the eggs repo.

http://server/henrietta?name=<name>&action=meta

Return the meta file for the latest version of egg <name>

http://server/henrietta?name=<name>&action=meta&version=<version>

Return the meta file for version <version> of egg <name>

http://server/henrietta?action=meta

Return all the meta files for the most recent egg versions. (Is it feasible?)

On the current repo for release 4, we have

$ find -name "*.meta" | grep trunk | xargs du -csh
...
796K    total

That's just a quick measurement. Some eggs don't use the trunk/tags layout and the meta file should be picked from the latest tag directory, but that gives an idea about the size of the response.

Maybe that's too overengineered...

comment:2 Changed 15 years ago by Mario Domenech Goulart

Hmmm. Actually version is not a value for action. version is a variable and versions is a value for action.

comment:3 Changed 14 years ago by felix winkelmann

Owner: set to felix winkelmann
Status: newassigned

I'm not sure how to handle this efficiently. We will have to do an svn ls (which we already do), and then walk the egg directories, doing more ls commands, etc. Unfortunately this doesn't scale at all in the case of "whole repository-info" style actions (like listing the available versions) - recursive ls operations are slow.

Recently, I have implemented name=<name>&mode=meta to support at least retrieving the meta-file for an egg (this isn't installed yet, see the scripts subdirectory in the chicken-core repository); this should work for any given version.

Listing available versions sounds feasible, though. I would recommend against providing much more: it's not so much the size of response, but the time needed to process the file-list of a repository that is already large and likely to get larger.

comment:4 Changed 14 years ago by felix winkelmann

Owner: felix winkelmann deleted

comment:5 Changed 14 years ago by felix winkelmann

Resolution: fixed
Status: assignedclosed

A listversion command has been added to henrietta (r19432). This will require the changes made in commit aca9e5a (experimental) in the chicken-core git repository.

Note: See TracTickets for help on using tickets.