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

[ISSUE] Path (\Repos\Customer) doesn't start with '/' #911

Closed
troyinsight opened this issue Nov 12, 2021 · 6 comments · Fixed by #912
Closed

[ISSUE] Path (\Repos\Customer) doesn't start with '/' #911

troyinsight opened this issue Nov 12, 2021 · 6 comments · Fixed by #912
Assignees
Labels
azure Occurring on Azure cloud

Comments

@troyinsight
Copy link

G'day,

I'm having trouble creating a Repo using v0.3.11. This was working perfectly with v0.3.10. As you can see, I'm using a forward slash in my HCL code, but the error message clearly displays a backslash. The Customer folder already exists within the Repos folder.

Configuration

resource "databricks_repo" "customer_repo" {
  git_provider = "gitHub"
  url = data.github_repository.customer_databricks_repository.http_clone_url
  path = "/Repos/Customer/Notebooks"
}

Expected Behavior

Repo called Notebooks is created under Repos/Customer folder

Actual Behavior

Error: Path (\Repos\Customer) doesn't start with '/'

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Terraform and provider versions

Terraform v1.0.11
on windows_amd64

  • provider registry.terraform.io/databrickslabs/databricks v0.3.11
  • provider registry.terraform.io/hashicorp/azuread v2.9.0
  • provider registry.terraform.io/hashicorp/azurerm v2.85.0
  • provider registry.terraform.io/hashicorp/random v3.1.0
  • provider registry.terraform.io/integrations/github v4.18.0
  • provider registry.terraform.io/microsoft/azuredevops v0.1.7

Important Factoids

I'm using Windows 11

@alexott alexott self-assigned this Nov 12, 2021
alexott added a commit that referenced this issue Nov 12, 2021
@alexott
Copy link
Contributor

alexott commented Nov 12, 2021

it looks like filepath always converts paths into OS-specific variant :-( It wasn't caught because we're not using windows
it's broken by following piece: https://github.com/databrickslabs/terraform-provider-databricks/blob/master/workspace/resource_repo.go#L63

fix is easy, can you try to build with #912 ?

@troyinsight
Copy link
Author

Sure, I can give it a test. How do I point my provider at this particular branch? Sorry, I've never done this for a provider

@alexott
Copy link
Contributor

alexott commented Nov 12, 2021

You need to build from source code. I'm not sure that we have instructions for that for Windows. You'll need install Go language, etc.

Can you run provider from Linux or Mac?

@troyinsight
Copy link
Author

Not a problem, I can give it a go over the weekend. Yes, I've got access to both Linux and Mac.

@alexott
Copy link
Contributor

alexott commented Nov 12, 2021

it works just fine on Mac. Really, I did miss the fact that filepath library converts paths into OS-specific format.

@nfx
Copy link
Contributor

nfx commented Nov 12, 2021

Yep, there was a problem related to local paths with dbfs files or notebooks. Should not be the case for remote paths

@nfx nfx closed this as completed in #912 Nov 12, 2021
@nfx nfx added the azure Occurring on Azure cloud label Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure Occurring on Azure cloud
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants