Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 10, 2023

Conversation

6543
Copy link
Contributor

@6543 6543 commented Dec 6, 2023

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

schemas/2.2/schema.json Outdated Show resolved Hide resolved
@6543 6543 mentioned this pull request Dec 6, 2023
@6543
Copy link
Contributor Author

6543 commented Dec 6, 2023

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
Copy link
Contributor Author

6543 commented Dec 6, 2023

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
Copy link
Contributor Author

6543 commented Dec 6, 2023

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

@6543
Copy link
Contributor Author

6543 commented Dec 6, 2023

@jhass request your comments :)

@6543
Copy link
Contributor Author

6543 commented Dec 9, 2023

@jhass added max length of 500 to it

Copy link
Owner

@jhass jhass left a comment

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.

schemas/2.2/schema.json Outdated Show resolved Hide resolved
schemas/2.2/schema.json Outdated Show resolved Hide resolved
@6543 6543 mentioned this pull request Dec 10, 2023
7 tasks
@6543 6543 requested a review from jhass December 10, 2023 14:59
@6543
Copy link
Contributor Author

6543 commented Dec 10, 2023

squash-merged your changes and made instance required

@jhass jhass merged commit 87f6d8d into jhass:main Dec 10, 2023
1 check passed
@6543 6543 deleted the v2.2/nodeName branch December 10, 2023 21:21
@@ -21,6 +22,18 @@
"2.2"
]
},
"instance":{
"description": "Metadata specific to the instance. An instance is a the concrete installation of a software running on a server.",
Copy link
Contributor

@pfefferle pfefferle Dec 11, 2023

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
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
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 ❤️

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