Skip to content

Fix: Remove event validation#318

Closed
localheinz wants to merge 1 commit intoactions:masterfrom
localheinz:fix/validation
Closed

Fix: Remove event validation#318
localheinz wants to merge 1 commit intoactions:masterfrom
localheinz:fix/validation

Conversation

@localheinz
Copy link
Copy Markdown

This PR

  • removes the event validation entirely

💁‍♂️ This is an alternative to #317 - I have tried using this action with the deployment event, and as far as I understand, the event validation currently serves no real purpose. The action currently verifies that the GITHUB_REF environment variable is set, but never uses its value.

@joshmgross
Copy link
Copy Markdown
Contributor

👋 Hey @localheinz, thanks for your contribution and feedback.

I have tried using this action with the deployment event, and as far as I understand, the event validation currently serves no real purpose.

The event validation mirrors the validation done on the server when creating and restoring caches. Every cache is associated with a scope, which is equivalent to the branch it is created on. These scopes are stored on the JWT token used to authenticate with the backing cache service. The reason we do this validation in the cache action is to provide a better error message to users and save time from creating a cache that will not be saved by the server. See #68

We'd need to do some more work on the backend cache service to support caching for events without a scope/ref attached to them. Please file an issue in this repository explaining your use-case and workflow.

@localheinz
Copy link
Copy Markdown
Author

Thank you, @joshmgross!

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