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

metadata schema update webhook fails in github #976

Open
amnonkhen opened this issue Aug 17, 2023 · 0 comments
Open

metadata schema update webhook fails in github #976

amnonkhen opened this issue Aug 17, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@amnonkhen
Copy link
Contributor

amnonkhen commented Aug 17, 2023

Overview

The github webhook that pushes changes from metadata schema repo to aws s3 where they are served to schema users is showing a 502 error code.

TLDR

  • This is low priority because it does not impact functionality. The error the webhook sees is merely noise.
  • The webhook successfully updates the schema files in the s3 bucket. the problem is only with the way the lambda function builds the output it returns to the api gateway.

Analysis

Results

From conversations with aws support and careful debugging of the lambda function and api gateway calls, I understand the following:

  1. the webhook hits the api gateway resource
  2. the gateeway resource triggers the lambda function
  3. the lambda functions runs
  4. the lambda function updates ingest with the schema changes.
  5. the lambda function does not update the changes in the bucket for dev. Prod & Staging, however, are ok:
    • This is evident by checking the schema resource. Instead of the json schema, it shows the default page with all the schema files, which does not contain.
    • dev - this happends becuase there is no "develop" branch.
    • staging
    • prod
  6. The lambda function returns output in json format where the body attribute is also json, but should be a json encoded string. This is the reason it fails to be parsed by the api gateway, which results in the 502 status code seen in the github console.
  7. In addition the lambda function runs on an outdated python 3.6

logs and screenshots

see errors and screenshot

See error screenshot and text:
Private Zenhub Image

Response 502

Request

Headers
Content-Length: 36
Content-Type: application/json
Date: Thu, 17 Aug 2023 16:06:54 GMT
Via: 1.1 9546eb427ef2137803aed00cad4fc426.cloudfront.net (CloudFront)
X-Amz-Apigw-Id: Jz_QTE1NoAMFmKA=
X-Amz-Cf-Id: P080rf67bD-gg-8gkAuUAJvZTdtOLBmAR_NBpVquwDEcoftFDV8YRQ==
X-Amz-Cf-Pop: IAD12-P1
X-Amzn-Errortype: InternalServerErrorException
X-Amzn-Requestid: 22eb38e1-85cc-4187-8e8c-30ef3238cf27
X-Cache: Error from cloudfront

Body
{"message": "Internal server error"}
Due to an incident, webhooks were not delivered from 2023-08-15 17:54:00 to 2023-08-15 22:47:00
@amnonkhen amnonkhen added the bug Something isn't working label Aug 17, 2023
@amnonkhen amnonkhen self-assigned this Aug 18, 2023
@amnonkhen amnonkhen changed the title metadata schema changes not updated in prod metadata schema update webhook fails in github Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant