Summary
extend "list" command for henrietta CGI
Metadata
- Id: bb8ad138949d00310d33c1ac23d0f36fd6cba431
- Trac id: 236
- Type: enhancement
- Reporter: felix
- Owner:
- Cc: mario
- Status: closed
- Component: infrastructure
- Estimated difficulty:
- Resolution: fixed
- Priority: minor
- Milestone:
- Version:
- Changetime: 2010-08-16 12:52:24 UTC
- Created: 2010-05-14 23:52:44 UTC
- Keywords: henrietta
Description
Handy would be
1. List all eggs with the highest available version 2. send all *.meta files
Changes and comments
[2010-05-17 22:09:33 UTC] mario wrote:
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...
[2010-05-17 22:15:41 UTC] mario wrote:
Hmmm. Actually version is not a value for action. version is a variable and versions is a value for action.
[2010-07-02 12:34:46 UTC] felix changed status from new to assigned
[2010-07-02 12:34:46 UTC] felix set owner to felix
[2010-07-02 12:34:46 UTC] felix wrote:
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.
[2010-07-20 01:57:00 UTC] felix removed owner felix
[2010-08-16 12:52:24 UTC] felix changed status from assigned to closed
[2010-08-16 12:52:24 UTC] felix set resolution to fixed
[2010-08-16 12:52:24 UTC] felix wrote:
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.