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

consistently use context instead of payload. #743

Closed
tripodsan opened this issue Apr 9, 2019 · 6 comments
Closed

consistently use context instead of payload. #743

tripodsan opened this issue Apr 9, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request released

Comments

@tripodsan
Copy link
Contributor

we should use context consistently throughout all code, code examples and documentation and not mention payload anymore.

@tripodsan tripodsan added bug Something isn't working help wanted Extra attention is needed and removed bug Something isn't working labels Apr 9, 2019
@filmaj
Copy link
Contributor

filmaj commented Apr 10, 2019

So based on this, I tried updating all references to payload in devsite over to context. However, the build for that PR failed: https://github.com/adobe/developer.adobe.com/pull/74 with the error:

[hlx] error: tapping failed: ReferenceError: context is not defined
    at /home/circleci/project/.hlx/build/html.js:53:28
    at Generator.next (<anonymous>)
    at onFulfilled (/home/circleci/project/node_modules/co/index.js:65:19)
    at /home/circleci/project/node_modules/co/index.js:54:5
    at new Promise (<anonymous>)
    at co (/home/circleci/project/node_modules/co/index.js:50:10)
    at Runtime.run (/home/circleci/project/node_modules/@adobe/htlengine/src/runtime/Runtime.js:47:12)
    at run (/home/circleci/project/.hlx/build/html.js:45:18)
    at main (/home/circleci/project/.hlx/build/html.js:73:9)
    at invoker (/home/circleci/project/.hlx/build/html.js:103:32)

Looks like the hlx-built html.js uses hard-coded reference to payload, so I think that means at least the .htl files must continue to use payload for now.

@tripodsan
Copy link
Contributor Author

@rofe
Copy link
Contributor

rofe commented Apr 10, 2019

What's wrong with payload?

@tripodsan
Copy link
Contributor Author

What's wrong with payload?

well... I can't remember the exact argument, but from the pov of the pipeline, it looks a bit weird to have a payload shoved around, since it doesn't really contain any load from the original request.

so it was renamed to context and now documented as such:
https://github.com/adobe/helix-pipeline/blob/master/docs/context.schema.md

@rofe
Copy link
Contributor

rofe commented Apr 10, 2019

Gotcha, thanks!

@tripodsan tripodsan added enhancement New feature or request and removed help wanted Extra attention is needed labels May 13, 2019
@tripodsan tripodsan self-assigned this May 13, 2019
trieloff pushed a commit that referenced this issue May 13, 2019
# [2.3.0](v2.2.5...v2.3.0) (2019-05-13)

### Bug Fixes

* **package:** update @adobe/parcel-plugin-htl to version 2.1.9 ([9f326f7](9f326f7))

### Features

* **pipeline:** consistently use `context` instead of payload. ([4faf4de](4faf4de)), closes [#743](#743)
@adobe-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

No branches or pull requests

4 participants