Skip to content

Give better errors when fetching config.yml for repo fails #47

@tallysmartins

Description

@tallysmartins
Member

{:error, :bad_request} is not a clear message. Should return detailed error in config.yml... not found, malformed or something.

Activity

denys-medynskyi

denys-medynskyi commented on Oct 8, 2018

@denys-medynskyi

👋 can I take this one?

denys-medynskyi

denys-medynskyi commented on Oct 8, 2018

@denys-medynskyi

Can you give step by step instructions:

  • which button to click
  • what to download
  • what is expected message
tallysmartins

tallysmartins commented on Oct 8, 2018

@tallysmartins
MemberAuthor

For this we don't need to click any button. We have a webhooks_controller that receive all events from Github repository in order to trigger the benchmark jobs. This requires a few interactions, I will try to explain and show where exactly the problem is placed:

  1. First we register a repository in our backend so its allowed to use our service
  2. Then the repository register webhooks for pull requests and push events to be sent to our handlers
  3. When an event occurs, our webhook handler extract the type of event (PR or push) and do some logic in order to create a job

In the process of creating a job, we try to connect to the github repository to find and download a specific file in the folder benchee/config.yml any failure on this process should be explicit. Nowadays the only failure is {:error, :bad_request} and we need to know where the error came from. Was it due to internet connection? Was it due to file not found? Or some missing configurations in the file?

To address this, we can rely on writing more tests scenarios for our webhooks_controller and responding correctly to this errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @tallysmartins@denys-medynskyi

        Issue actions

          Give better errors when fetching config.yml for repo fails · Issue #47 · elixir-bench/elixir-bench-api