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 output file for ffdon #151

Merged
merged 4 commits into from
Feb 11, 2024
Merged

add output file for ffdon #151

merged 4 commits into from
Feb 11, 2024

Conversation

T0biii
Copy link
Member

@T0biii T0biii commented Feb 4, 2024

according to:
https://gist.github.com/herbetom/f8eae6fde7a00c59f4333b49c189c784
we can add more outputs + filter the output

config is untested

@T0biii T0biii requested a review from a team as a code owner February 4, 2024 14:03
awlx
awlx previously approved these changes Feb 4, 2024
Copy link
Member

@awlx awlx left a comment

Choose a reason for hiding this comment

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

Looks about right? :D

@herbetom
Copy link
Contributor

herbetom commented Feb 4, 2024

Not quite sure if it's right. From what i could tell filtering works on a site base and what you've listed seem to me to be domains.
So you might need to move the ffdon domains in their own site and then filter for that single ffdon site.

https://github.com/FreifunkBremen/yanic/blob/c19c1aed1b237480895e50f0bd50e6ff3758fadd/config_example.toml#L23-L29

@herbetom
Copy link
Contributor

herbetom commented Feb 5, 2024

Looks better. I don't know wheter domains can appear multiple times. But it's probably worth an attempt.

yanic/yanic.conf.tmpl Outdated Show resolved Hide resolved
Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

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

I took the liberty to push a small commit applying the changes that Black complained about in CI so it is green.
Looks good, I'll try deploying it.

@DasSkelett DasSkelett merged commit b82ab95 into freifunkMUC:main Feb 11, 2024
4 checks passed
@T0biii T0biii deleted the patch-1 branch February 11, 2024 14:02
@DasSkelett
Copy link
Member

Deployed, but the JSON is empty:
https://map.ffmuc.net/data/meshviewer-ffdon.json
https://gw04.ext.ffmuc.net/meshviewer-ffdon.json

{"timestamp":"2024-02-11T15:07:29+0100","nodes":[],"links":[]}

So maybe the same domain in multiple sites does indeed not work. I might check the yanic code later to confirm this (or see whether it could be changed)

@DasSkelett
Copy link
Member

Turns out yanic uses the site_code the node itself returns in the respondd data for filtering. Which kind of makes sense thinking about it.
https://github.com/FreifunkBremen/yanic/blob/c19c1aed1b237480895e50f0bd50e6ff3758fadd/output/filter/site/site.go#L33-L40
(nodeinfo.System.SiteCode is basically only written to from the respondd returned JSON)
I'm not really seeing a good way to do this in yanic right now.

Mabye we can adjust site_code in the gluon domain configs for the ffdon domains, but no idea what other site effects this would have (@grische ?).

@T0biii
Copy link
Member Author

T0biii commented Feb 12, 2024

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.

5 participants