Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

surrogate-key computation needs to use base ref instead of commit sha #430

Closed
tripodsan opened this issue Jul 30, 2019 · 1 comment · Fixed by #431
Closed

surrogate-key computation needs to use base ref instead of commit sha #430

tripodsan opened this issue Jul 30, 2019 · 1 comment · Fixed by #431
Assignees
Labels

Comments

@tripodsan
Copy link
Contributor

The surrogate-key computation uses the context.content.sources, which specifies the entire, original url where the markdown content was fetched. for example:

https://raw.githubusercontent.com/tripodsan/hlxtest/bb8fc39dc3e01021bf1d30ac1ed4d0de04cbf5bc/index.md

The problem is, that in order to (soft) purge the fastly cache, when the index.md is modified, the bot doesn't know exactly which SHA was used to compute the .html.

the surrogate key should be computed using the original ref. e.g. master. suggest to include an additional parameter branch to the action.request.params.

the surrogate key will then be computed using:

https://raw.githubusercontent.com/${owner}/${repo}/${branch}${path}

@trieloff helix-dispatch also needs to include the new branch param.

@tripodsan tripodsan self-assigned this Jul 30, 2019
adobe-bot pushed a commit that referenced this issue Jul 30, 2019
## [4.0.6](v4.0.5...v4.0.6) (2019-07-30)

### Bug Fixes

* **cache:** compute surrogate-key based on branch ([61712c5](61712c5)), closes [#430](#430)
@adobe-bot
Copy link

🎉 This issue has been resolved in version 4.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants