loki icon indicating copy to clipboard operation
loki copied to clipboard

Serverless method is not up to date

Open richie-tt opened this issue 2 years ago • 3 comments

In the beginning, I need to say you doing a great job !!!

With the docker approach o the local machine, everything is working correctly. Now I need to implement CI/CD for Loki.JS and ideally would be to use Amazon Elastic Container Service (Amazon ECS) but I was don't able to find any example of such implementation. So I wanted to use the Lambda approach, but here I was not able to create a role according to the instruction.

aws iam create-role \
  --role-name lambda-role.loki \
  --assume-role-policy-document "arn:aws:iam::aws:policy/AWSDenyAll"

An error occurred (MalformedPolicyDocument) when calling the CreateRole operation: This policy contains invalid Json

I will be very thankful for any advice

richie-tt avatar Jun 29 '22 18:06 richie-tt

so I managed to solve it, but when I want to start testing it return error with connections refuse to localhost

❯ ❯ AWS_SDK_LOAD_CONFIG=true yarn loki  test --reactUri 'https://mydaomin.com/storybook' --chromeAwsLambdaFunctionName=loki
yarn run v1.22.19
loki test v0.30.3
 FAIL  chrome.aws-lambda
       Fetching stories
       connect ECONNREFUSED 127.0.0.1:46293
Some visual tests failed to run
error Command failed with exit code 1.

{
  "loki": {
    "configurations": {
      "chrome.iphone7": {
        "target": "chrome.aws-lambda",
        "preset": "iPhone 7"
      }
    }
  }
}

richie-tt avatar Jun 30 '22 10:06 richie-tt

Any updates here?

I have the same issue with the ECONNREFUSED

maniator avatar Aug 11 '22 03:08 maniator

Setup with Loki & Lambda doesn't work at all. Instead of a simple solution, I built an infrastructure in AWS which on request from GitHub creates a dedicated Ec2 machine just for Loki test regression.

richie-tt avatar Aug 11 '22 09:08 richie-tt