question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

context.config() looking in wrong default path

See original GitHub issue

Bug Report

Sometime between v9.4.0 and v9.6.0, using context.config to fetch configuration seems to be looking under the wrong path:

 HttpError: request to https://api.github.com/repos/testOwner/.github/contents/.github/blunderbuss.yml failed, reason: Nock: No match for request {
  "method": "GET",
  "url": "https://api.github.com/repos/testOwner/.github/contents/.github/blunderbuss.yml",
  "headers": {
    "accept": [
      "application/vnd.github.v3+json"
    ],
    "user-agent": [
      "octokit.js/16.33.0 Node.js/11.15.0 (Linux 4.19; x64)"
    ],
    "authorization": [
      "token abc123"
    ],
    "accept-encoding": [
      "gzip,deflate"
    ],
    "connection": [
      "close"
    ]
  }
}

Note that the path is:

.github/contents/.github/blunderbuss.yml

My expectation would be that the path is:

contents/.github/blunderbuss.yml

I have confirmed that the value we are passing to context.config is blunderbuss.yml, here:

      const config = (await context.config(
        CONFIGURATION_FILE_PATH,
        {}
      )) as Configuration;

see: https://github.com/googleapis/repo-automation-bots/pull/132

Current Behavior

Environment

  • Probot version(s): v9.6.0
  • Node/npm version: 11.15.0
  • OS: Debian

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
issue-label-bot[bot]commented, Oct 29, 2019

Issue-Label Bot is automatically applying the label bug 🐞 to this issue, with a confidence of 0.97. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

0reactions
Logerfocommented, Nov 18, 2019

@gr2m your suggestion worked, thanks! But please note this was indeed a breaking change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Boot Change Context Path | Baeldung
Spring Boot, by default, serves content on the root context path (“/”). While it's usually a good idea to prefer convention over configuration, ......
Read more >
Loading property file from system properties with default path ...
I'm using Spring 4.x with xml only configuration. Is it possible to do what I want ? I'm aware of the @Conditional for...
Read more >
Pitfalls and Common Mistakes | NGINX
This page outlines some of the NGINX configuration issues that we see ... Look at the permissions in the whole path and think...
Read more >
Defining Tomcat context paths - Octopus Deploy
Learn how Tomcat defines the context path of your web application. ... The default <Host> element in Tomcat 9.01 looks like this:
Read more >
Kubectl Config Set-Context | Tutorial and Best Practices
There are three ways to do this. One option is to place the kubeconfig file in $HOME/.kube/config, which is the default path kubectl...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found