Monorepo for Tangled tangled.org

appview,knotserver: immutable nix flakeref link header #741

closed opened by boltless.me targeting master from push-ptrrwwvnkmxq
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3m4nnmyspof22
+100 -2
Interdiff #3 โ†’ #4
+41
api/tangled/repoarchive.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package tangled 4 + 5 + // schema: sh.tangled.repo.archive 6 + 7 + import ( 8 + "bytes" 9 + "context" 10 + 11 + "github.com/bluesky-social/indigo/lex/util" 12 + ) 13 + 14 + const ( 15 + RepoArchiveNSID = "sh.tangled.repo.archive" 16 + ) 17 + 18 + // RepoArchive calls the XRPC method "sh.tangled.repo.archive". 19 + // 20 + // format: Archive format 21 + // prefix: Prefix for files in the archive 22 + // ref: Git reference (branch, tag, or commit SHA) 23 + // repo: Repository identifier in format 'did:plc:.../repoName' 24 + func RepoArchive(ctx context.Context, c util.LexClient, format string, prefix string, ref string, repo string) ([]byte, error) { 25 + buf := new(bytes.Buffer) 26 + 27 + params := map[string]interface{}{} 28 + if format != "" { 29 + params["format"] = format 30 + } 31 + if prefix != "" { 32 + params["prefix"] = prefix 33 + } 34 + params["ref"] = ref 35 + params["repo"] = repo 36 + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.archive", params, nil, buf); err != nil { 37 + return nil, err 38 + } 39 + 40 + return buf.Bytes(), nil 41 + }
appview/repo/archive.go

This file has not been changed.

appview/repo/router.go

This file has not been changed.

appview/state/git_http.go

This file has not been changed.

+3 -2
appview/state/proxy_knot.go
··· 65 65 s.proxyRequest(w, r, targetURL) 66 66 } 67 67 68 - var knotVersionDownloadArchiveConstraint = version.MustConstraints(version.NewConstraint(">= 1.12")) 68 + var knotVersionDownloadArchiveConstraint = version.MustConstraints(version.NewConstraint(">= 1.12.0-alpha")) 69 69 70 70 func (s *State) DownloadArchive(w http.ResponseWriter, r *http.Request) { 71 71 l := s.logger.With("handler", "DownloadArchive") ··· 84 84 scheme = "http" 85 85 } 86 86 87 + host := fmt.Sprintf("%s://%s", scheme, repo.Knot) 87 88 xrpcc := &indigoxrpc.Client{ 88 - Host: repo.Knot, 89 + Host: host, 89 90 } 90 91 l = l.With("knot", repo.Knot) 91 92
appview/state/router.go

This file has not been changed.

go.mod

This file has not been changed.

go.sum

This file has not been changed.

knotserver/archive.go

This file has not been changed.

knotserver/git/git.go

This file has not been changed.

knotserver/router.go

This file has not been changed.

knotserver/xrpc/repo_archive.go

This file has not been changed.

knotserver/xrpc/xrpc.go

This file has not been changed.

+56
lexicons/repo/archive.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.archive", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "deprecated. use `/{did}/{reponame}/archive/{ref} endpoint instead", 8 + "parameters": { 9 + "type": "params", 10 + "required": ["repo", "ref"], 11 + "properties": { 12 + "repo": { 13 + "type": "string", 14 + "description": "Repository identifier in format 'did:plc:.../repoName'" 15 + }, 16 + "ref": { 17 + "type": "string", 18 + "description": "Git reference (branch, tag, or commit SHA)" 19 + }, 20 + "format": { 21 + "type": "string", 22 + "description": "Archive format", 23 + "enum": ["tar", "zip", "tar.gz", "tar.bz2", "tar.xz"], 24 + "default": "tar.gz" 25 + }, 26 + "prefix": { 27 + "type": "string", 28 + "description": "Prefix for files in the archive" 29 + } 30 + } 31 + }, 32 + "output": { 33 + "encoding": "*/*", 34 + "description": "Binary archive data" 35 + }, 36 + "errors": [ 37 + { 38 + "name": "RepoNotFound", 39 + "description": "Repository not found or access denied" 40 + }, 41 + { 42 + "name": "RefNotFound", 43 + "description": "Git reference not found" 44 + }, 45 + { 46 + "name": "InvalidRequest", 47 + "description": "Invalid request parameters" 48 + }, 49 + { 50 + "name": "ArchiveError", 51 + "description": "Failed to create archive" 52 + } 53 + ] 54 + } 55 + } 56 + }
nix/gomod2nix.toml

This file has not been changed.

History

7 rounds 2 comments
sign up or login to add to the discussion
2 commits
expand
appview,knotserver: support immutable nix flakeref link header
lexicons,knotserver: remove /xrpc/sh.tangled.repo.archive endpoint
3/3 success
expand
expand 1 comment
closed without merging
2 commits
expand
appview,knotserver: support immutable nix flakeref link header
lexicons,knotserver: remove /xrpc/sh.tangled.repo.archive endpoint
3/3 success
expand
expand 0 comments
3 commits
expand
nix: bump gomod2nix
appview,knotserver: support immutable nix flakeref link header
lexicons,knotserver: remove /xrpc/sh.tangled.repo.archive endpoint
3/3 success
expand
expand 0 comments
3 commits
expand
nix: bump gomod2nix
appview,knotserver: support immutable nix flakeref link header
lexicons,knotserver: remove sh.tangled.repo.archive
2/3 failed, 1/3 success
expand
expand 0 comments
3 commits
expand
appview,knotserver: support knot http endpoint for archive
knotserver: support immutable nix flakeref link header
lexicons,knotserver: remove sh.tangled.repo.archive
3/3 success
expand
expand 0 comments
1 commit
expand
appview,knotserver: immutable nix flakeref link header
3/3 success
expand
expand 0 comments
1 commit
expand
appview,knotserver: immutable nix flakeref link header
1/3 failed, 2/3 timeout
expand
expand 1 comment

link to related issue: #231