feat: Add record truncation and improve logging
- Add new flag
--truncate-long-recordsto handle long record names - Implement record validation and truncation using SHA-256 hash
- Enhance logging with emoji-based status indicators
- Update Dockerfile to use Go 1.23
- Update .dockerignore to exclude manifests directory
- Improve error and configuration logging messages
- added skaffold.yaml to simplify development
Added requested changes
@blake Cannot reassign back to you.
As the name while predictable is not straightforward I opted to skip it instead of shortening it. So we are still in RFC. Before this patch the program would just crash when creating an out of RFC record.
Andrea Cervesato
Phone: +39.392.23.80.611 Mail: @.***
Il lun 24 feb 2025, 06:39 Blake Covarrubias @.***> ha scritto:
@.**** commented on this pull request.
In main.go https://github.com/blake/external-mdns/pull/29#discussion_r1967061259:
@@ -216,6 +220,7 @@ func main() { flag.BoolVar(&exposeIPv4, "expose-ipv4", lookupEnvOrBool("EXTERNAL_MDNS_EXPOSE_IPV4", exposeIPv4), "Publish A DNS entry (default: true)") flag.BoolVar(&exposeIPv6, "expose-ipv6", lookupEnvOrBool("EXTERNAL_MDNS_EXPOSE_IPV6", exposeIPv6), "Publish AAAA DNS entry (default: false)") flag.IntVar(&recordTTL, "record-ttl", lookupEnvOrInt("EXTERNAL_MDNS_RECORD_TTL", recordTTL), "DNS record time-to-live")
- flag.BoolVar(&truncateLongRecords, "truncate-long-records", lookupEnvOrBool("EXTERNAL_MDNS_TRUNCATE_LONG_RECORDS", false), "Truncate long record names using SHA-256 hash (default: false)")
@thekoma https://github.com/thekoma What do you think about enabling this by default given that the current behavior violates section 2.3.1 https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.1 of RFC 1035, DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION.
— Reply to this email directly, view it on GitHub https://github.com/blake/external-mdns/pull/29#pullrequestreview-2636043602, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB4LAV4PPBR3ATEEEKO26L2RKV7ZAVCNFSM6AAAAABWA3UPO6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMZWGA2DGNRQGI . You are receiving this because you were mentioned.Message ID: @.***>
@thekoma are you okay with me rebasing these changes onto master, resolving the merge conflicts, and force pushing the changes to your branch?
Sure Blake! Rebase it as you like!