Split Project out of Repository #105

Closed
opened 6 months ago by dachary · 10 comments
dachary commented 6 months ago (Migrated from notabug.org)
Owner

The Repository model is an aggregation of two separate models:

  • A VCS repository (id + forks)
  • A software Project (everything else)

It would be sensible to split the two by creating a new Project model and simplify the Repository model.

The [Repository model](https://forgefed.peers.community/modeling.html#repository) is an aggregation of two separate models: * A VCS repository (id + forks) * A software Project (everything else) It would be sensible to split the two by creating a new Project model and simplify the Repository model.
zPlus commented 6 months ago (Migrated from notabug.org)
Owner

The Repository was actually meant to mean a single VCS repository (for example with id https://notabug.org/peers/forgefed.git). There was a Project object but it's undocumented and I think the idea was to remove it (unless there's a good reason to keep it).

The `Repository` was actually meant to mean a single VCS repository (for example with `id` https://notabug.org/peers/forgefed.git). There was a [`Project`](https://notabug.org/zPlus/forgefed/src/master/forgefed/activitypub.py#L357) object but it's undocumented and I think the idea was to remove it (unless there's a good reason to keep it).
dachary commented 6 months ago (Migrated from notabug.org)
Owner

So it would be ok for the receiver of the Repository message to assume that the id ( https://notabug.org/peers/forgefed.git for instance ) is suitable to use with the Git protocol and, for instance, run git clone https://notabug.org/peers/forgefed.git?

So it would be ok for the receiver of the Repository message to assume that the id ( https://notabug.org/peers/forgefed.git for instance ) is suitable to use with the Git protocol and, for instance, run `git clone https://notabug.org/peers/forgefed.git`?
zPlus commented 6 months ago (Migrated from notabug.org)
Owner

In order to keep things simple, I think that we can make this assumption. The same URL will return the ActivityPub representation of the repository when it's queried with the usual AcitivyPub header (application/ld+json; profile="https://www.w3.org/ns/activitystreams).
I can see how some forges could use different URLs, for example by using different domains for their clone URLs, or by having aliases. It's a choice that we have to make. But if there is not a practical and immediate reason for considering it, I think we should probably go with the simpler option.

@fr33domlover what is your take on this?

In order to keep things simple, I think that we can make this assumption. The same URL will return the ActivityPub representation of the repository when it's queried with the usual AcitivyPub header (application/ld+json; profile="https://www.w3.org/ns/activitystreams). I can see how some forges could use different URLs, for example by using different domains for their clone URLs, or by having aliases. It's a choice that we have to make. But if there is not a practical and immediate reason for considering it, I think we should probably go with the simpler option. @fr33domlover what is your take on this?
dachary commented 6 months ago (Migrated from notabug.org)
Owner

Opened a pull request at https://notabug.org/peers/forgefed/pulls/108 to clarify the semantic of the Repository id.

Opened a pull request at https://notabug.org/peers/forgefed/pulls/108 to clarify the semantic of the Repository id.
fr33domlover commented 6 months ago (Migrated from notabug.org)
Owner

A Repository is only the VCS part, it doesn't refer to a whole project with issues and MRs and wikis etc. etc.

(There's no Project type because there's no need for it so far in S2S implementation logic; it's an abstract concept that seems to only limit flexibility; S2S implementation logic uses properties to find related objects, not types; perhaps a Project type could be useful but I haven't seen a use case so far)

The id of a Repository is just the ActivityPub/RDF identifier URL, used for HTTPS-fetching the ActivityPub object. it's NOT the URI for git-cloning the repo.

There was a discussion somewhere (here? On the Feneas forum?) about the names of the properties that would specify the authenticated and the public clone URIs. If you can't find it here in any issue, maybe it was on the Feneas forum and that info is lost.... and then feel free to suggest property names for these URIs :P

A `Repository` is only the VCS part, it doesn't refer to a whole project with issues and MRs and wikis etc. etc. (There's no `Project` type because there's no need for it so far in S2S implementation logic; it's an abstract concept that seems to only limit flexibility; S2S implementation logic uses properties to find related objects, not types; perhaps a `Project` type could be useful but I haven't seen a use case so far) The `id` of a `Repository` is just the ActivityPub/RDF identifier URL, used for HTTPS-fetching the ActivityPub object. it's **NOT** the URI for git-cloning the repo. There was a discussion somewhere (here? On the Feneas forum?) about the names of the properties that would specify the authenticated and the public clone URIs. If you can't find it here in any issue, maybe it was on the Feneas forum and that info is lost.... and then feel free to suggest property names for these URIs :P
zPlus commented 6 months ago (Migrated from notabug.org)
Owner

@fr33domlover do we need to make the distinction about the HTTP URL and the clone URL? Can't we just use the same URL? Sending an ActivityPub request will respond with the JSON object and this will not interfer with any git clone action.
On the other hand, repositories can have multiple clone URLs for different protocols so a property for this is probably needed anyway.

@fr33domlover do we *need* to make the distinction about the HTTP URL and the clone URL? Can't we just use the same URL? Sending an ActivityPub request will respond with the JSON object and this will not interfer with any `git clone` action. On the other hand, repositories can have multiple clone URLs for different protocols so a property for this is probably needed anyway.
dachary commented 6 months ago (Migrated from notabug.org)
Owner

suggest property names for these URIs

What about :drum_roll: vcs ?

> suggest property names for these URIs What about :drum_roll: **vcs** ?
zPlus commented 6 months ago (Migrated from notabug.org)
Owner

Or cloneUri? Seems more clear

Or *cloneUri*? Seems more clear
dachary commented 6 months ago (Migrated from notabug.org)
Owner

Yes and also commonly used in API, +1 on cloneUri.

Yes and also commonly used in API, +1 on cloneUri.
dachary commented 6 months ago (Migrated from notabug.org)
Owner
Closed via https://notabug.org/peers/forgefed/pulls/108
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: ForgeFed/ForgeFed#105
Loading…
There is no content yet.