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

generate a single caching hash #60

Merged
merged 10 commits into from
Jul 30, 2024
Merged

generate a single caching hash #60

merged 10 commits into from
Jul 30, 2024

Conversation

rarmatei
Copy link
Contributor

@rarmatei rarmatei commented Jul 30, 2024

if (hashCollections.length > 1) {
return hash(hashCollections.join(' | '));
}
return hashCollections.join(' | ');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could've just always returned

return hash(hashCollections.join(' | '));

but I kept the old way of hashing when it's a single-key for backward compatibility purposes - so we don't bust everyone's cache when this gets merged in

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave that in a comment in the code?

@rarmatei rarmatei merged commit 536c838 into main Jul 30, 2024
1 check passed
@rarmatei rarmatei deleted the hash-multiple-inputs branch July 30, 2024 18:41
@rarmatei rarmatei restored the hash-multiple-inputs branch July 30, 2024 18:41
@rarmatei rarmatei deleted the hash-multiple-inputs branch July 30, 2024 18:49
github-actions bot pushed a commit that referenced this pull request Aug 2, 2024
* generate a single caching hash

* add backwards compatibility

* print out key info

* add cache step test setup

* add cache step test setup

* add tests for caching step

* build source files

* improve messaging

* commit changed source files

* add comment
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