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

Removes static assignment of tracker script variations #786

Merged

Conversation

Vigasaurus
Copy link
Contributor

@Vigasaurus Vigasaurus commented Mar 3, 2021

Changes

  • Cuts down on the need for manual combinatoric generation for script variant names and aliases
  • Changes manual process for adding script types to just appending string to an array (in two places)
  • Assigns standard format for variant variable names (variant name, with - replaced with _)

Notes:

  • The file name generation grows at 2^n, so it could potentially be manageable without this
  • The alias generation grows at n! which is certainly unmanageable manually
  • From some quick and dirty tests, up to at least 9 variants are handled somewhat gracefully and in appropriate time with this system (this is 500+ tracker files, so hopefully if there are really more than 9 distinct variants of the script down the line, a better system can be created then) - and this process only happens on image creation

Tests

  • This PR does not require tests

Changelog

  • This PR does not make a user-facing change

Documentation

  • This change does not need a documentation update

@Vigasaurus Vigasaurus marked this pull request as ready for review March 21, 2021 15:31
@Vigasaurus
Copy link
Contributor Author

I've done pretty significant testing and have verified this to work how it should. (And didn't see much code cleanup opportunity without adding unnecessary complexity).

I considered adding tests originally, but the only way I could see them being maintainable was if they checked for the primary files, and some random subset of variations - but that felt a bit whacky. Let me know if you have any ideas on tests/similar.

@ukutaht
Copy link
Contributor

ukutaht commented May 18, 2021

Sorry for the long delay, looks good!

@ukutaht ukutaht merged commit 7f3e554 into plausible:master May 18, 2021
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.

2 participants