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

Name issue output files using issue hash instead of random uuid #242

Open
rbailey-godaddy opened this issue Oct 27, 2021 · 0 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest

Comments

@rbailey-godaddy
Copy link
Contributor

Feature Request

Currently, per-issue files (created using --output-dir) have non-deterministic names based on generated UUIDs. I suggest that we name these files using the issue hash instead.

This would have the important property of making the output files deterministic (within the output directory, which still is named using a timestamp). While there might be several reasons to do this, the one I have in mind is integration testing, where it might be easier to diff the output directory against a known baseline than interpret program output directly.

Even if you think this is not a useful property, the downsides seem limited.

  • The issue hash is readily available via its .signature property
  • Because we intend the signature to uniquely identify a specific issue, it should (for practical purposes) be as collision-resistant as the UUID currently employed
  • While the format of the filename changes slightly, this would only impact users who look specifically for uuid4-formatted filenames in the output directory -- but since the directory is created new for each run, every file in it is known to be related to an issue, and there is no reason for anybody to be doing filters more complicated than * or maybe *.json... And a fix, if needed, would be simple.

If we felt the UUID naming convention was critical, I would suggest looking for a way to generate the UUID deterministically from the issue's signature instead of using a random UUID.

@rbailey-godaddy rbailey-godaddy added enhancement New feature or request good first issue Good for newcomers Hacktoberfest labels Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant