ipfs / distributions

Legacy dist.ipfs.tech website and artifact build tools
https://dist.ipfs.tech
MIT License
48 stars 32 forks source link

Duplicate DNSLink TXT record #1053

Closed lidel closed 8 months ago

lidel commented 8 months ago

ipfs ls /ipns/dist.ipfs.tech/kubo/v0.24.0-rc2 is flaky because we have two dnslink TXT records for some reason:

$ dig +short TXT _dnslink.dist.ipfs.tech @1.1.1.1
"dnslink=/ipfs/QmTdbtbfzGrgoFbbeAM3N9kdWWJtUNmm4rGSQGPycnHYYt"
"dnslink=/ipfs/QmegzKtEkh5ST7TWDCRsEwVmBoHhbuQyTuKtHkjVxXWtXj"

DNS spec does not define order of records, and they are returned in random order.
If we are unlucky, we get old one which does not have the RC2, and ipfs ls returns with exit code 1 and error:

Error: no link named "v0.24.0-rc2" under QmZaCQbvsxerzwknjEURf5HQ6ftNsRz6AWAFTut7br6exf

Could be some race condition in dnslink-dnsimple tool this Github Action use for updating DNSLink at DNSimple, or a bug in DNSSimple (our DNS host) itself.

lidel commented 8 months ago

I've removed duplicate DNS TXT records (for both .io and .tech), and the issue is resolved.

I'm assuming a hiccup on the dnsimple end, but if we have this problem again, we need to investigate the https://www.npmjs.com/package/dnslink-dnsimple angle, maybe API changed, and we need to update that tool.

hacdias commented 8 months ago

It's happening again, I have no permissions to remove it.

cewood commented 8 months ago

Seems related to API changes that DNSimple seems to have made a some point, and we discovered as part of https://github.com/protocol/bifrost-infra/issues/2814 and https://github.com/ipfs-shipyard/dnslink-dnsimple/pull/21

hacdias commented 8 months ago

We'll need to also update https://github.com/ipfs-shipyard/js-dnslink-dnsimple then (which after a npm-check-updates is very out of date 😱 )

lidel commented 8 months ago

Asked @olizilla to give me and @hacdias publishing rights to the NPM package, but JS necromancy can be a time sink. Switching to already working and way more deterministic GO version may be more stable, given how finicky JS packages run via npx can be.

I'll open a PR later today. Update: see https://github.com/ipfs/distributions/pull/1055