Skip to content

Add new "instance" object and use it for instance name propagation#77

Merged
jhass merged 1 commit into
jhass:mainfrom
6543:v2.2/nodeName
Dec 10, 2023
Merged

Add new "instance" object and use it for instance name propagation#77
jhass merged 1 commit into
jhass:mainfrom
6543:v2.2/nodeName

Conversation

@6543

@6543 6543 commented Dec 6, 2023

Copy link
Copy Markdown
Contributor

move wily used nodeName into the normal spec.
this also should contain more instance configured specific information.

Comment thread schemas/2.2/schema.json Outdated
@6543 6543 mentioned this pull request Dec 6, 2023
@6543

6543 commented Dec 6, 2023

Copy link
Copy Markdown
Contributor Author

about limit length

the-federation.info database has this:

select node.domain,LENGTH(d::text) as l from (select node_id,data->'metadata'->'nodeName'::text as d from node_info where data->'metadata'->'nodeDescription' IS NOT NULL) JOIN node on node.id=node_id order by l desc limit 30;
                                domain                                |  l  
----------------------------------------------------------------------+-----
 sevenbyte.org                                                        |    
 polskijutub.mkljczk.pl                                               | 164
 tv.suwerenni.org                                                     | 139
 withbrains.com                                                       | 122
 video.medienzentrum-harburg.de                                       |  90
 lepetitmayennais.fr.nf                                               |  84
 togethr.party                                                        |  82
 tube-education.beta.education.fr                                     |  79
 videos.side-ways.net                                                 |  72
 wetube.moe                                                           |  71
 dontdontdontletsstartthisistheworstpartcouldntbelieveforallthe.world |  70
 video.csc49.fr                                                       |  70
 tube.nah.re                                                          |  70
 fedi.moegirl.live                                                    |  69
 lessthanthree.cc                                                     |  69
 rhoads.com                                                           |  67
 offenes.tv                                                           |  67
 fedi.s1i.dev                                                         |  67
 s.lx.ddnss.org                                                       |  66
 videos.npa-marseille.org                                             |  65
 fedi.desvox.es                                                       |  65
 video.emergeheart.info                                               |  65
 viet69.ml                                                            |  64
 video.pourpenser.pro                                                 |  64
 shitposting.on.incorrigible.moe                                      |  64
 media.mzhd.de                                                        |  63
 peertube.serveur.slv-valbonne.fr                                     |  63
 nsfw.vger.cloud                                                      |  62
 htp.live                                                             |  62
 shin.pp.ua                                                           |  62

@6543

6543 commented Dec 6, 2023

Copy link
Copy Markdown
Contributor Author
thefederation=# select domain,LENGTH(name) as l from node order by l desc limit 30;
                                             domain                                             |  l  
------------------------------------------------------------------------------------------------+-----
 polskijutub.mkljczk.pl                                                                         | 162
 hear-ye.com                                                                                    | 141
 tv.suwerenni.org                                                                               | 137
 withbrains.com                                                                                 | 120
 f.cz                                                                                           | 100
 social.b4tech.cc                                                                               |  98
 anticapitalista.it                                                                             |  97
 a-mastodon-instance.hosted-at-a.super-fukin.long-ass.fully-qualified.domain.name.bruh.lamp.wtf |  94
 remotenode.host                                                                                |  94
 mastodon.nuages.noho.st                                                                        |  93
 creatorsunited.social                                                                          |  91
 social.homenet.org                                                                             |  91
 video.medienzentrum-harburg.de                                                                 |  88
 seacow.social                                                                                  |  87
 zocial.ee                                                                                      |  87
 denvr.social                                                                                   |  85
 digitalmarketer.social                                                                         |  85
 freegaff.club                                                                                  |  85
 lepetitmayennais.fr.nf                                                                         |  82
 cryptids.online                                                                                |  81
 isp.datanerd.se                                                                                |  81
 togethr.party                                                                                  |  80
 curators.mixremix.cc                                                                           |  80
 www.chefblogger.me                                                                             |  80
 jimcarroll.com                                                                                 |  80
 freeatlantis.com                                                                               |  79
 social.extremelyoffline.org                                                                    |  79
 wrannek.de                                                                                     |  78
 privacyofficers.social                                                                         |  78
 txs.es                                                                                         |  78

@6543

6543 commented Dec 6, 2023

Copy link
Copy Markdown
Contributor Author

I propose limit of 500 , so #78 would be exactly 10x

@6543

6543 commented Dec 6, 2023

Copy link
Copy Markdown
Contributor Author

@jhass request your comments :)

@6543

6543 commented Dec 9, 2023

Copy link
Copy Markdown
Contributor Author

@jhass added max length of 500 to it

@jhass jhass left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the instance.name property itself should obviously be optional, I'd actually favor to make the instance object itself mandatory. That is I think it would be preferable for an instance without a configured name to expose "instance": {} or "instance: { "name": null } always, such that a client who validated the response against the schema can be sure to always have an object at instance and save a null check.

Comment thread schemas/2.2/schema.json Outdated
Comment thread schemas/2.2/schema.json Outdated
@6543 6543 mentioned this pull request Dec 10, 2023
7 tasks
@6543 6543 requested a review from jhass December 10, 2023 14:59
@6543

6543 commented Dec 10, 2023

Copy link
Copy Markdown
Contributor Author

squash-merged your changes and made instance required

@jhass jhass merged commit 87f6d8d into jhass:main Dec 10, 2023
@6543 6543 deleted the v2.2/nodeName branch December 10, 2023 21:21
Comment thread schemas/2.2/schema.json
]
},
"instance":{
"description": "Metadata specific to the instance. An instance is a the concrete installation of a software running on a server.",

@pfefferle pfefferle Dec 11, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo An instance is a the concrete [...]!

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ups, sorry, mind opening a follow up? 😇

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh sorry I'm bad at typos too 😓

We migt at cSpell linter?

PS: @pfefferle if you want just open a pull ❤️

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> #108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants