Giter Site home page Giter Site logo

helix-dispatch's Introduction

Helix Dispatch

A Helix microservice that retrieves content from multiple sources and delivers the best match

Status

codecov CircleCI GitHub license GitHub issues LGTM Code Quality Grade: JavaScript semantic-release

Installation

Not needed, the service is pre-installed as soon as you run hlx deploy.

Usage

Invoke the action using wsk

wsk action invoke helix-services/dispatch@v2 --result --blocking \
  -p static.owner trieloff \
  -p static.repo helix-demo \
  -p static.ref master \
  -p static.root htdocs \
  -p content.owner trieloff \
  -p content.repo helix-demo \
  -p content.ref master \
  -p content.package b7aa8a6351215b7e12b6d3be242c622410c1eb28 \
  -p path /index.html

Use the web action (replace trieloff with your GitHub user name)

curl "https://adobeioruntime.net/api/v1/web/trieloff/helix-services/dispatch%40v2?static.owner=trieloff&static.repo=trieloff&static.ref=master&static.root=htdocs&content.owner=trieloff&content.repo=helix-demo&content.ref=master&content.package=b7aa8a6351215b7e12b6d3be242c622410c1eb28&path=/index.html"

For a detailed list of all possible request parameters, check out the reference documentation.

Development

Deploying Helix Static

Deploying Helix Service requires the wsk command line client, authenticated to a namespace of your choice. For Project Helix, we use the helix namespace.

All commits to main that pass the testing will be deployed automatically. All commits to branches that will pass the testing will get commited as /helix-services/service@ci<num> and tagged with the CI build number.

helix-dispatch's People

Contributors

adobe-bot avatar dependabot[bot] avatar greenkeeper[bot] avatar kptdobe avatar marquiserosier avatar medusalix avatar renovate-bot avatar renovate[bot] avatar rofe avatar semantic-release-bot avatar snyk-bot avatar stefan-guggisberg avatar trieloff avatar tripodsan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

helix-dispatch's Issues

forward some of the headers to the actions

Description
the VCL used to invoke the actions with some headers:

also, it used to send those headers:

{
  'X-Openwhisk-Activation-Id': this._wskActivationId,
  'X-Request-Id': this._requestId,
  'X-Backend-Name': 'localhost--F_Petridish',
  'X-CDN-Request-ID': this._cdnRequestId,
  'X-Strain': this._strain.name,
  'X-Old-Url': this._url,
  'X-Repo-Root-Path': repoPath,
}

which are now missing....

An in-range update of @adobe/helix-pingdom-status is breaking the build 🚨

The dependency @adobe/helix-pingdom-status was updated from 2.0.0 to 2.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@adobe/helix-pingdom-status is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ ci/circleci: build: Your tests failed on CircleCI (Details).
  • ❌ build: * build - Failed
  • branch-deploy - Blocked

Release Notes for v2.0.1

2.0.1 (2019-07-24)

Bug Fixes

  • package: update snyk to version 2.0.0 (afe472b)
Commits

The new version differs by 7 commits.

  • 5c03bd6 chore(release): 2.0.1 [skip ci]
  • c01dd79 Merge pull request #25 from adobe/greenkeeper/snyk-2.0.0
  • 0619600 chore(package): update lockfile package-lock.json
  • afe472b fix(package): update snyk to version 2.0.0
  • fdf6879 tests(index): adjust to new version
  • dc181db chore(package): update lockfile package-lock.json
  • 389cb31 chore(package): update @adobe/openwhisk-action-builder to version 1.2.1

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Improve error reporting

Description
if a fetcher.resolve throws an exception, it bubles up to openwhisk and returns a single application error with no logs or error message.

Add stale-if-error cache setting

In order to prevent frequently visited pages from becoming unavailable due to errors, I'd like to use the stale-if-error cache directive to all responses as described here: https://www.fastly.com/blog/stale-while-revalidate-stale-if-error-available-today

I'd suggest a value of 43200 (=12 hours), which should give us enough recovery time for intermittent issues.

Question for @kptdobe and @davidnuescheler: should we do the same (or a lower) value for Helix-Pages when the X-Dispatch-NoCache request header is set?

An in-range update of snyk is breaking the build 🚨

The devDependency snyk was updated from 1.184.0 to 1.185.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

snyk is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… ci/circleci: build: Your tests passed on CircleCI! (Details).
  • ❌ ci/circleci: branch-deploy: Your tests failed on CircleCI (Details).
  • ❌ build: * build - Success

Release Notes for v1.185.0

1.185.0 (2019-06-26)

Bug Fixes

  • fix undefined in error for node_modules traversal (2f70dc5)

Features

  • pruning of big-trees if a flag is specified (7d93b5d)
  • remove isOutdated functionality from snyk test (92e95e4)
Commits

The new version differs by 6 commits.

  • 1e7ea3d Merge pull request #604 from snyk/feat/remove-isOutdated-from-snyk-test
  • b913302 Merge pull request #588 from snyk/feat/prune-tree
  • 9298bd8 Merge pull request #602 from snyk/fix/fix-undefined-in-error
  • 92e95e4 feat: remove isOutdated functionality from snyk test
  • 7d93b5d feat: pruning of big-trees if a flag is specified
  • 2f70dc5 fix: fix undefined in error for node_modules traversal

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Fetcher sequence masks pipeline errors in with 404

Description
If a fetcher-action returns 500, e.g. due to an error in a pre.js, or a gatewat timeout, the final response will be the 404 of the error page.

Expected behavior
it would probably be better to treat all non 404 responses as critical and abort the fetcher sequence.

An in-range update of @adobe/helix-pingdom-status is breaking the build 🚨

The dependency @adobe/helix-pingdom-status was updated from 1.4.3 to 1.4.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@adobe/helix-pingdom-status is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ ci/circleci: build: Your tests failed on CircleCI (Details).
  • ❌ build: * build - Failed
  • branch-deploy - Blocked

Release Notes for v1.4.4

1.4.4 (2019-07-12)

Bug Fixes

  • status: add timeout for backend checks (d90e6ff), closes #11
Commits

The new version differs by 2 commits.

  • 1150297 chore(release): 1.4.4 [skip ci]
  • d90e6ff fix(status): add timeout for backend checks

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Vanity URL Resolution

Idea: at the same time as the normal invocations are running, look up lib-aio-state if a vanity URL has been registered. If no (in most cases) just proceed. If yes, restart the resolution with the new path.

As long as lib-aio-state is not slower than a runtime invocation itself, this should have negligible performance impact.

An in-range update of @adobe/openwhisk-action-builder is breaking the build 🚨

The dependency @adobe/openwhisk-action-builder was updated from 1.3.1 to 1.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@adobe/openwhisk-action-builder is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ ci/circleci: build: Your tests failed on CircleCI (Details).
  • βœ… Tidelift: Dependencies checked (Details).
  • ❌ build: * build - Failed
  • branch-deploy - Blocked

Commits

The new version differs by 7 commits.

  • 1e3a6e7 chore(release): 1.4.0 [skip ci]
  • 293ff57 feat(builder): trigger release
  • b89a261 test(unzip): replace unzip2 with yauzl due to security fixes (#61)
  • b752f94 refactor(lib): extract helper to own package (#60)
  • b544def chore(lint): use airbnb-base and update deps (#58)
  • c02a494 chore(tidelift): adding list of forbidden licenses
  • 8c915f1 chore(docs): update readme

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

simple memory cache to dispatch for resolve-ref and the 404 statics

also, there are a lot of unnecessary invocations, like requesting 404.html for the gazillions of time.
also note, that the actual action invocation might not be a problem, but for example executing the static concurrently, each activation still makes tcp requests (github, epsagon, coralogix) which are by default keep-alive and produce probably lingering sockets. especially, since the processes are long-lived. also, the ssh handshake is not for free, either.

  • maybe adding a simple memory cache to dispatch for resolve-ref and the 404 statics could also remove some of the load.

Originally posted by @tripodsan in adobe/helix-home#87 (comment)

Rename to helix-dispatch

The repo name change should be quite simple, but I'd also change the package name (and thus the URL)

An in-range update of @semantic-release/exec is breaking the build 🚨

The devDependency @semantic-release/exec was updated from 3.3.4 to 3.3.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@semantic-release/exec is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… ci/circleci: build: Your tests passed on CircleCI! (Details).
  • ❌ ci/circleci: branch-deploy: Your tests failed on CircleCI (Details).
  • ❌ build: * build - Success

Release Notes for v3.3.5

3.3.5 (2019-06-26)

Bug Fixes

Commits

The new version differs by 1 commits.

  • e7614fa fix: revert to execa ^1.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Params not supported

The params parameter with URL-encoded filtered list of parameters isn't supported.

Cannot read property '_logImpl' of undefined

{
   "level"  :  "error" ,
   "ow"  : {
     "actionName"  :  "/helix/helix-services-private/dispatch@ci1051" ,
    (...)
   },
   "message"  :  "Cannot read property '_logImpl' of undefined" ,
   "timestamp"  :  "2019-12-04T11:15:59.165319743Z" 
},
{
   "level"  :  "error" ,
   "ow"  : {
     "actionName"  :  "/helix/helix-services-private/dispatch@ci1051" ,
    (...)
    },
   "message"  :  "error while invoking fetchers: TypeError: Cannot read property '_logImpl' of undefined" ,
   "timestamp"  :  "2019-12-04T12:10:34.351011366Z" 
}

Maybe these are limited to CI builds, but I think it would still be good to find out why they are happening.

regression: html action in default package is invoked

probably introduced with #59:

the backend request is:

/api/v1/web/helix-pages/helix-services/experimental-dispatch@v1?static.owner=adobe&static.repo=project-helix.io&static.ref=master&static.root=/htdocs&content.owner=adobe&content.repo=project-helix.io&content.ref=master&content.root=&content.package=bf8c6033dbc9a3581d5588e0e87a548be8fef7dd&content.index=index.html&path=/index.html&strain=default&params=

but it tries to invoke the html in the default action:

2019-07-31T01:18:38.185Z       stdout: ERROR - POST https://runtime.adobe.io:443/api/v1/namespaces/helix-pages/actions/default/html?blocking=true Returned HTTP 404 (Not Found) --> "The requested resource does not exist."

Add request header to disable the cache in response

As defined in adobe/helix-pages#17, we need at the project level a way to control the cache headers from response of the dispatch method. This would allow a project to define the cache strategy if the default one is not satisfying.

I initially though that adding a request header to define the Cache-Control response would be a good strategy. But I spent half a day testing many combinations of the Cache-Control and Surrogate-Control and it turns out that both are needed and some cases do not work as expected:

Works and tells the browser that he can keep the file for a while:

resp.headers['Cache-Control'] = 'max-age=604800, private';
resp.headers['Surrogate-Control'] = 'max-age=0';

Works but browser will request the files each time:

resp.headers['Cache-Control'] = 'no-cache';
resp.headers['Surrogate-Control'] = 'max-age=0';

Followings do not work, Fastly still caches the response (based on the spec, I would assume this should work):

resp.headers['Cache-Control'] = 'no-store';
resp.headers['Surrogate-Control'] = 'max-age=0';
resp.headers['Cache-Control'] = 'no-cache';

Based on the complexity of this, I suggest to simply implement an on/off flag: if you add the X-Dispatch-NoCache request header (value does not matter), the response will set the appropriate headers so that it does not get cached by Fastly. Gives less control but at least it is easy to enable.

Process ESI

Process ESI here instead of Fastly, so that we can make use of compression (and advanced ESI features like fallbacks)

no valid response could be fetched

{
   "level"  :  "error" ,
   "ow"  : {
     "actionName"  :  "/helix/helix-services-private/[email protected]" ,
    (...)
  },
   "message"  :  "no valid response could be fetched: Error: Error invoking b698135bbce5397e27ee1766ad6ab789d295b26b/html(org/repo/5a16d09996358f059a79bd0dd03712ccd1a76aed/posts/2019/foo.md): 502" ,
   "timestamp"  :  "2019-12-03T15:32:03.579018220Z" 
}

This looks like a bubble up of https://github.com/adobe/helix-word2md/issues/72 i.e. a 404 - in which case it should not produce an ERROR in the log either.

Refactor: rename race

In order to avoid naming confusion with Promise.race, rename race into … @koraa, what was your suggestion?

An in-range update of @semantic-release/git is breaking the build 🚨

The devDependency @semantic-release/git was updated from 7.0.13 to 7.0.14.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@semantic-release/git is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… ci/circleci: build: Your tests passed on CircleCI! (Details).
  • ❌ ci/circleci: branch-deploy: Your tests failed on CircleCI (Details).
  • ❌ build: * build - Success

Release Notes for v7.0.14

7.0.14 (2019-06-26)

Bug Fixes

Commits

The new version differs by 1 commits.

  • 184f7b3 fix: revert to execa ^1.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Support default.md fallback

When requesting /authors/lars.html, dispatch should not just request /authors/lars.md, but also /authors/default.md, so that we can create a page that says "this author does not exist".

An in-range update of @semantic-release/github is breaking the build 🚨

The devDependency @semantic-release/github was updated from 5.4.1 to 5.4.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@semantic-release/github is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ ci/circleci: build: Your tests failed on CircleCI (Details).
  • ❌ build: * build - Failed
  • branch-deploy - Blocked

Release Notes for v5.4.2

5.4.2 (2019-06-30)

Bug Fixes

  • package: update globby to version 10.0.0 (0231e7b)
Commits

The new version differs by 1 commits.

  • 0231e7b fix(package): update globby to version 10.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Weird behaviour

  1. request to deployed site:
$ curl -D- https://www.99productrules.com/index.html
HTTP/2 404
x-backend-url: /api/v1/web/tripod/helix-services/dispatch@v2?static.owner=tripodsan&static.repo=hlxtest&static.ref=master&static.root=/htdocs&content.owner=tripodsan&content.repo=hlxtest&content.ref=master&content.root=&content.package=github-com--tripodsan--hlxtest--master-dirty&content.index=index.html&path=/index.html&strain=default&rootPath=&params=
  1. logs of dispatch:
$ wsk activation logs 3fc1764942dd417d81764942ddd17d1a | sort
2019-10-03T01:48:56.499Z       stdout: configured coralogix logger.
2019-10-03T01:48:56.528Z       stdout: [INFO] instrumenting epsagon.
2019-10-03T01:48:57.476Z       stdout: [INFO] [0] Action: github-com--tripodsan--hlxtest--master-dirty/hlx--static
2019-10-03T01:48:57.478Z       stdout: [INFO] [1] Action: github-com--tripodsan--hlxtest--master-dirty/html
2019-10-03T01:48:57.479Z       stdout: [INFO] [3] Action: github-com--tripodsan--hlxtest--master-dirty/hlx--static
2019-10-03T01:48:57.480Z       stdout: [INFO] [2] Action: github-com--tripodsan--hlxtest--master-dirty/hlx--static
2019-10-03T01:48:57.481Z       stdout: [INFO] [4] Action: github-com--tripodsan--hlxtest--master-dirty/hlx--static
2019-10-03T01:48:58.659Z       stdout: [INFO] [4] 149e3a36337144f29e3a36337134f21c 404
2019-10-03T01:48:58.801Z       stdout: [INFO] [2] eee80e98f8284baaa80e98f8286baa31 404
2019-10-03T01:48:58.803Z       stdout: [INFO] [3] c5d1bd1802cb431691bd1802cb2316c0 404
2019-10-03T01:48:58.820Z       stdout: [INFO] [0] 08c3805636c6435683805636c6735664 404
2019-10-03T01:49:00.381Z       stdout: [INFO] [1] 96545de800524286945de80052f286e7 404 StatusCodeError: 404 - "404: Not Found\n"
2019-10-03T01:49:00.383Z       stdout: [ERROR] no valid response could be fetched
2019-10-03T01:49:00.384Z       stdout: [ERROR] Error invoking github-com--tripodsan--hlxtest--master-dirty/hlx--static(tripodsan/hlxtest/undefined/index.html): 404
2019-10-03T01:49:00.385Z       stdout: [ERROR] Error invoking github-com--tripodsan--hlxtest--master-dirty/hlx--static(tripodsan/hlxtest/undefined/index.html): 404
2019-10-03T01:49:00.385Z       stdout: [ERROR] Error invoking github-com--tripodsan--hlxtest--master-dirty/html(tripodsan/hlxtest/undefined/index.md): 404
2019-10-03T01:49:00.386Z       stdout: [ERROR] Error invoking github-com--tripodsan--hlxtest--master-dirty/hlx--static(tripodsan/hlxtest/undefined/404.html): 404
2019-10-03T01:49:00.387Z       stdout: [ERROR] Error invoking github-com--tripodsan--hlxtest--master-dirty/hlx--static(tripodsan/hlxtest/undefined/404.html): 404
  1. request to resolve-ref:
$ wsk activation get 87fd19b8ff964a37bd19b8ff968a370c
ok: got activation 87fd19b8ff964a37bd19b8ff968a370c
{
    "response": {
        "status": "success",
        "statusCode": 0,
        "success": true,
        "result": {
            "body": "failed to fetch git repo info (statusCode: 401, statusMessage: Authorization Required)",
            "statusCode": 404
        }
    },
}
  1. logs html action:
$ wsk activation logs 96545de800524286945de80052f286e7 | sort
2019-10-03T01:48:59.762Z       stdout: warn: Recoverable error: no ref given for hlxtest/tripodsan, falling back to master
2019-10-03T01:49:00.214Z       stdout: debug: resolved github-ref 'master' to 'd1143383eb41d12a883e404422dac47e26fbe0db'
2019-10-03T01:49:00.215Z       stdout: debug: fetching Markdown from https://raw.githubusercontent.com/tripodsan/hlxtest/d1143383eb41d12a883e404422dac47e26fbe0db/index.md
2019-10-03T01:49:00.381Z       stdout: error: Could not find Markdown at https://raw.githubusercontent.com/tripodsan/hlxtest/d1143383eb41d12a883e404422dac47e26fbe0db/index.md
  1. activation of subsequence resolve-ref:
$ wsk activation get b2c9a2b1b7c94b6989a2b1b7c91b6927
ok: got activation b2c9a2b1b7c94b6989a2b1b7c91b6927
    "response": {
        "status": "success",
        "statusCode": 0,
        "success": true,
        "result": {
            "body": {
                "fqRef": "refs/heads/master",
                "sha": "d1143383eb41d12a883e404422dac47e26fbe0db"
            },

An in-range update of @adobe/helix-shared is breaking the build 🚨

The devDependency @adobe/helix-shared was updated from 2.0.0 to 2.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@adobe/helix-shared is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ ci/circleci: build: Your tests failed on CircleCI (Details).
  • ❌ build: * build - Failed
  • branch-deploy - Blocked

Release Notes for v2.1.0

2.1.0 (2019-07-23)

Features

  • logging: Simplify the logger interface (b1b4ac2)
Commits

The new version differs by 2 commits.

  • 75396c4 chore(release): 2.1.0 [skip ci]
  • b1b4ac2 feat(logging): Simplify the logger interface

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of semantic-release is breaking the build 🚨

The devDependency semantic-release was updated from 15.13.17 to 15.13.18.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… ci/circleci: build: Your tests passed on CircleCI! (Details).
  • ❌ ci/circleci: branch-deploy: Your tests failed on CircleCI (Details).
  • ❌ build: * build - Success

Release Notes for v15.13.18

15.13.18 (2019-06-26)

Bug Fixes

Commits

The new version differs by 2 commits.

  • 6b3adf6 fix: revert to execa ^1.0.0
  • 228fed7 docs: document that plugins config is an override (#1216)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @semantic-release/npm is breaking the build 🚨

The devDependency @semantic-release/npm was updated from 5.1.12 to 5.1.13.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@semantic-release/npm is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… ci/circleci: build: Your tests passed on CircleCI! (Details).
  • ❌ ci/circleci: branch-deploy: Your tests failed on CircleCI (Details).
  • ❌ build: * build - Success

Release Notes for v5.1.13

5.1.13 (2019-06-26)

Bug Fixes

Commits

The new version differs by 1 commits.

  • 6f40669 fix: revert to execa ^1.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of snyk is breaking the build 🚨

The dependency snyk was updated from 1.192.0 to 1.192.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

snyk is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • βœ… ci/circleci: build: Your tests passed on CircleCI! (Details).
  • ❌ ci/circleci: branch-deploy: Your tests failed on CircleCI (Details).
  • ❌ build: * build - Success

Release Notes for v1.192.1

1.192.1 (2019-07-05)

Bug Fixes

  • reinstate missing tests (c28d85e)
Commits

The new version differs by 2 commits.

  • efc7923 Merge pull request #636 from snyk/fix/reinstate-missing-tests
  • c28d85e fix: reinstate missing tests

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of epsagon is breaking the build 🚨

The dependency epsagon was updated from 1.28.0 to 1.29.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

epsagon is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • βœ… ci/circleci: build: Your tests passed on CircleCI! (Details).
  • ❌ ci/circleci: branch-deploy: Your tests failed on CircleCI (Details).
  • ❌ build: * build - Success

Release Notes for v1.29.0

1.29.0 (2019-07-07)

Features

Commits

The new version differs by 1 commits.

  • 950e38b feat(utils): ignore fields in metadata (#131)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

requests to selector resources fail

Description
Requests with selectors are delegated wrongly to the action.

eg:

https://www.project-helix.io/SUMMARY.summary.html

invokes the action with:

{
  "name": "bf8c6033dbc9a3581d5588e0e87a548be8fef7dd/summary_html",
  "blocking": true,
  "result": true,
  "params": {
    "path": "/SUMMARY.summary.md",
    "owner": "adobe",
    "repo": "project-helix.io",
    "ref": "master",
    "package": "bf8c6033dbc9a3581d5588e0e87a548be8fef7dd",
    "params": ""
  }
}

the path is wrong, and should only be /SUMMARY.md

Dispatch is not able to invoke resolve-git-ref

Description
since the recent changes in openwhisk package layout, the invocation of resolve-git-ref gives an authentication error:

 OpenWhiskError: POST https://runtime.adobe.io:443/api/v1/namespaces/helix-pages/actions/helix-services/resolve-git-ref@v1?blocking=true Returned HTTP 403 (Forbidden) --> "The supplied authentication is not authorized to access 'helix/helix-services-private'.

It seems that the sequence invoker tries to load the component from /helix/helix-services/resolve-git-ref@v1 with the namespace credentials of the client. note, that invoking the action via curl works (even on the helix-pages namespace):

$ curl -sD- https://adobeioruntime.net/api/v1/web/helix-pages/helix-services/resolve-git-ref@v1/_status_check/healthcheck.json
HTTP/1.1 200 OK

but not via action invoke:

$ wsk action invoke -b helix-services/resolve-git-ref@v1
error: Unable to invoke action 'helix-services/resolve-git-ref@v1': The supplied authentication is not authorized to access 'helix/helix-services-private'. (code tPuUbpppmmTQ773H0ErtMonQDY0aeLsn)

Solutions

use http in dispatch

A simple solution would be to just use the http request via gateway to invoke the resolve-ref.

drawback:

  • major rewrite of the code to work with non-action-invoke tasks
  • probably extra latency to do the extra resolution

use 2nd sequence

It shows, that using a 2nd sequence will cause the invoker to use the helix namespace for authentication:

@helix
$ wsk action create --sequence /helix/helix-services/resolve-git-ref@v1_link /helix/helix-services/resolve-git-ref@v1
ok: created action helix-services/resolve-git-ref@v1_link

@helix-pages
$ wsk action invoke -b /helix-pages/helix-services/resolve-git-ref@v1_link
ok: invoked /helix-pages/helix-services/resolve-git-ref@v1_link with id 3c5ce8a0555c4a579ce8a0555cea5738

this seems imo best solution, as it doesn't require any major code change.

drawback:

  • the extra sequence step is probably a bit slower

Extension points

While thinking about the new architecture, I realised that the new dispatch function could be opened to extension points: the really cool thing could be that we could offer the exact same type of extensions points than for the pipeline (before, after) for each of the dispatching fetcher and a pre like function where you could do whatever you want there to completely take control of the dispatching. The first step of the dispatching function would then need to be to check if there is some extensions in the code repo.
This is just the start point of an idea, we definitively need use cases to validate that this is needed.

403 error status from html action is not considered

While working on adobe/helix-publish#378, I found out that the 403 error status reported by the html action (my example of https://alex.helix-demo.xyz/e.403.html) "does not win the fetcher race" and the static action will report a 404 which will be the one reported. I did not try with other error status but the same should certainly apply for all 400+ error messages.
The use case can be: for a specific path / file, you want to report a 403 in your pre.js. In that case, dispatch will always respond 404.

404 ref not found errors should not be logged at error level

Description
If helix-dispatch is called with an non-existing branch/ref name, it will log an error level log message upon getting a 404 from helix-services/resolve-git-ref:

https://github.com/adobe/helix-dispatch/blob/master/src/fetchers.js#L307

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://unknown--myrepo--myuser.project-helix.page/'
  2. Log into Coralogix and observe error:
{
  "level": " error", 
  "message": "Unable to resolve branch name 404 ref not found", 
  "ow": {
    "actionName": " /helix/helix-services-private/[email protected]", 
    (...)
  }, 
  "timestamp": " 2020-02-12T00:29:02.168896173Z"
}

Expected behavior
An info level log message would be more appropriate for errors with status codes below 500.

Additional context
Other Helix services have been changed to behave this way, see e.g.
https://github.com/adobe/helix-word2md/commit/6a0001ed42c781c0fe305698416662c8b4b9e81e

Support authenticated GitHub access

Currently content is fetched via unauthenticated GitHub raw requests. As a result private GitHub repos are not accessible. Furthermore unauthenticated GitHub raw requests might become subject to potential rate limiting/throttling.

This issue covers making Github requests using the provided GITHUB_TOKEN.

Related issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.