Monorepo for Tangled tangled.org

appview: update repo, pulls, issues, and pages handlers for repo DID #1141

deleted opened by oyster.cafe targeting master from oyster.cafe/tangled-core: master
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:3fwecdnvtcscjnrx2p4n7alz/sh.tangled.repo.pull/3mgprvt2eqy22
+6 -6
Interdiff #2 #3
appview/issues/issues.go

This file has not been changed.

appview/pages/funcmap.go

This file has not been changed.

appview/pages/repoinfo/repoinfo.go

This file has not been changed.

appview/pages/templates/repo/fork.html

This file has not been changed.

appview/pages/templates/repo/new.html

This file has not been changed.

appview/pulls/pulls.go

This file has not been changed.

appview/repo/archive.go

This file has not been changed.

appview/repo/artifact.go

This file has not been changed.

appview/repo/blob.go

This file has not been changed.

appview/repo/branches.go

This file has not been changed.

appview/repo/compare.go

This file has not been changed.

appview/repo/index.go

This file has not been changed.

appview/repo/log.go

This file has not been changed.

appview/repo/repo.go

This file has not been changed.

+6 -6
appview/repo/settings.go
··· 293 293 // Skip entirely if there is no active domain claim — the site cannot be served anyway. 294 294 ownerClaim, _ := db.GetActiveDomainClaimForDid(rp.db, f.Did) 295 295 if ownerClaim == nil { 296 - rp.logger.Info("skipping deploy: no active domain claim", "repo", f.DidSlashRepo()) 296 + rp.logger.Info("skipping deploy: no active domain claim", "repo", f.RepoIdentifier()) 297 297 } else if rp.cfClient.Enabled() { 298 298 scheme := "http" 299 299 if !rp.config.Core.Dev { ··· 313 313 314 314 deployErr := sites.Deploy(ctx, rp.cfClient, knotHost, f.Did, f.Name, branch, dir) 315 315 if deployErr != nil { 316 - l.Error("sites: initial R2 sync failed", "repo", f.DidSlashRepo(), "err", deployErr) 316 + l.Error("sites: initial R2 sync failed", "repo", f.RepoIdentifier(), "err", deployErr) 317 317 deploy.Status = models.SiteDeployStatusFailure 318 318 deploy.Error = deployErr.Error() 319 319 } else { ··· 321 321 } 322 322 323 323 if err := db.AddSiteDeploy(rp.db, deploy); err != nil { 324 - l.Error("sites: failed to record deploy", "repo", f.DidSlashRepo(), "err", err) 324 + l.Error("sites: failed to record deploy", "repo", f.RepoIdentifier(), "err", err) 325 325 } 326 326 327 327 if deployErr == nil { 328 328 if err := sites.PutDomainMapping(ctx, rp.cfClient, ownerClaim.Domain, f.Did, f.Name, isIndex); err != nil { 329 329 l.Error("sites: KV write failed", "domain", ownerClaim.Domain, "err", err) 330 330 } 331 - rp.logger.Info("site deployed to r2", "repo", f.DidSlashRepo(), "is_index", isIndex) 331 + rp.logger.Info("site deployed to r2", "repo", f.RepoIdentifier(), "is_index", isIndex) 332 332 } 333 333 }() 334 334 } else { 335 - rp.logger.Warn("cloudflare integration is disabled; site won't be deployed", "repo", f.DidSlashRepo()) 335 + rp.logger.Warn("cloudflare integration is disabled; site won't be deployed", "repo", f.RepoIdentifier()) 336 336 } 337 337 338 338 rp.pages.HxRefresh(w) ··· 367 367 go func() { 368 368 ctx := context.Background() 369 369 if err := sites.Delete(ctx, rp.cfClient, f.Did, f.Name); err != nil { 370 - l.Error("sites: R2 delete failed", "repo", f.DidSlashRepo(), "err", err) 370 + l.Error("sites: R2 delete failed", "repo", f.RepoIdentifier(), "err", err) 371 371 } 372 372 if ownerClaim != nil { 373 373 if err := sites.DeleteDomainMapping(ctx, rp.cfClient, ownerClaim.Domain, f.Name); err != nil {
appview/repo/tags.go

This file has not been changed.

appview/repo/tree.go

This file has not been changed.

appview/repo/webhooks.go

This file has not been changed.

History

9 rounds 2 comments
sign up or login to add to the discussion
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 2 comments

Uh, in general I want to abandon like half of the stacks. I should've be more clear on this at first place.

Appview doesn't need to know about repo-did situation in most of the cases yet. If repoDid is optional value, there is no reason to use it. Appview still has to support legacy at-uri based connection, so I'd suggest to not introduce extra behavior on referencing and only use repo-did when performing the repository migration. We don't need to touch any tables except the repos itself.

Appview will

  1. ingest repo-did information from sh.tangled.repo records,
  2. store that extra identifier in repos table,
  3. and use that unique identifier when doing redirection/backlinking after owner migration.

No need to change other data.

I'll do some cutting then let you know! :p

This pull has been deleted (possibly by jj abandon or jj squash)
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments
1 commit
expand
appview: update repo, pulls, issues, and pages handlers for repo DID
expand 0 comments