IPCR Forge: fixes from the holyhorse run
- forge-runner: 1G (act_runner was OOM-killed mid-job at 256M) - bridge: log rad's stdout on failure; page links Gitea from its own host (html_url is the internal address); description fallback without it - docs/forge.md: holyhorse verification and findings 11-14
This commit is contained in:
@@ -96,7 +96,6 @@ type repo struct {
|
||||
Mirror bool `json:"mirror"`
|
||||
Empty bool `json:"empty"`
|
||||
DefaultBranch string `json:"default_branch"`
|
||||
HTMLURL string `json:"html_url"`
|
||||
Owner struct {
|
||||
Login string `json:"login"`
|
||||
// public | limited | private. Only a public owner's repositories are public.
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ func (m *mirror) sync(id int64) {
|
||||
return
|
||||
}
|
||||
cur := prev
|
||||
cur.FullName, cur.HTMLURL = r.FullName, r.HTMLURL
|
||||
cur.FullName = r.FullName
|
||||
if r.Empty {
|
||||
if cur.RID == "" {
|
||||
cur.State, cur.Error = stWaiting, ""
|
||||
|
||||
+5
-1
@@ -43,6 +43,10 @@ func (m *mirror) run(timeout time.Duration, dir, name string, args ...string) (s
|
||||
cmd.Stdout, cmd.Stderr = &stdout, &stderr
|
||||
if err := cmd.Run(); err != nil {
|
||||
msg := strings.TrimSpace(stderr.String())
|
||||
if msg == "" {
|
||||
// rad reports its errors on stdout.
|
||||
msg = strings.TrimSpace(stdout.String())
|
||||
}
|
||||
if len(msg) > 500 {
|
||||
msg = "…" + msg[len(msg)-500:]
|
||||
}
|
||||
@@ -66,7 +70,7 @@ func (m *mirror) rad(dir string, args ...string) (string, error) {
|
||||
func (m *mirror) radInit(dir string, r *repo) (string, error) {
|
||||
desc := r.Description
|
||||
if desc == "" {
|
||||
desc = "Mirrored from " + r.HTMLURL
|
||||
desc = "Mirrored from Gitea: " + r.FullName
|
||||
}
|
||||
out, err := m.rad(dir, "init", dir, "--name", r.Name, "--description", desc,
|
||||
"--default-branch", r.DefaultBranch, "--public", "--no-confirm")
|
||||
|
||||
@@ -24,7 +24,6 @@ const (
|
||||
type repoState struct {
|
||||
ID int64 `json:"id"`
|
||||
FullName string `json:"full_name"`
|
||||
HTMLURL string `json:"html_url,omitempty"`
|
||||
RID string `json:"rid,omitempty"`
|
||||
DefaultBranch string `json:"default_branch,omitempty"`
|
||||
State string `json:"state"`
|
||||
|
||||
@@ -347,7 +347,8 @@ for IPFS peers. Details: <a href="https://github.com/Yundera/ipcr" target="_blan
|
||||
repos.forEach(function (r) {
|
||||
var tr = el("tr");
|
||||
var td1 = el("td");
|
||||
td1.appendChild(r.html_url ? link(r.html_url, r.full_name) : el("span", r.full_name));
|
||||
// Not r.html_url: the bridge talks to Gitea's internal address, which is what Gitea puts there.
|
||||
td1.appendChild(base ? link(url("gitea") + "/" + r.full_name, r.full_name) : el("span", r.full_name));
|
||||
var td2 = el("td");
|
||||
if (r.rid) {
|
||||
td2.appendChild(base ? link(url("radicle") + "/nodes/radicle-api-" + base + "/" + r.rid, r.rid) : el("code", r.rid));
|
||||
|
||||
Reference in New Issue
Block a user