Jonkman Microblog
  • Login
Show Navigation
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. clacke: inhibited exhausted pixie dream boy πŸ‡ΈπŸ‡ͺπŸ‡­πŸ‡°πŸ’™πŸ’› (clacke@libranet.de)'s status on Friday, 28-Jun-2024 07:24:25 EDT clacke: inhibited exhausted pixie dream boy 🇸🇪🇭🇰💙💛 clacke: inhibited exhausted pixie dream boy πŸ‡ΈπŸ‡ͺπŸ‡­πŸ‡°πŸ’™πŸ’›

    I had an error on a nightly build. A test failed because a method had been passed an invalid hostname.

    The fixture used `faker.word()`, which is of course not guaranteed to be a valid hostname. But most of the time it is, because this error never triggered before in five years.

    I ran 10 million faker.word() and fed them to the validator. All valid!

    I started running a billion loops but then realized that's silly and wasteful. Run the loop with `faker.unique.word()` instead and exhaust the pool. *facepalm*

    It quickly came to a point where it failed to find a unique word.

    The pool only has 971 words, and they all coincidentally pass as hostnames. So now I have no idea what failed the test.

    In conversation about a year ago from libranet.de permalink
    1. clacke: inhibited exhausted pixie dream boy πŸ‡ΈπŸ‡ͺπŸ‡­πŸ‡°πŸ’™πŸ’› (clacke@libranet.de)'s status on Friday, 28-Jun-2024 08:10:55 EDT clacke: inhibited exhausted pixie dream boy 🇸🇪🇭🇰💙💛 clacke: inhibited exhausted pixie dream boy πŸ‡ΈπŸ‡ͺπŸ‡­πŸ‡°πŸ’™πŸ’›
      in reply to

      I failed to trigger the validator, that was why. *another facepalm*

      2 of the 971 possible words trigger the error, and that's "I" and "a". Turns out our code has some restrictions on hostnames for whatever reason, and it makes the minimum hostname length 2 characters.

      Any hostname in production will follow a naming convention that makes it have at least 11 characters. I won't change the validator as I don't know why it looks like that.

      In conversation about a year ago from libranet.de permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Jonkman Microblog is a social network, courtesy of SOBAC Microcomputer Services. It runs on GNU social, version 1.2.0-beta5, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Jonkman Microblog content and data are available under the Creative Commons Attribution 3.0 license.

Switch to desktop site layout.