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

Add support for general permissions #132

Merged
merged 47 commits into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e31e1b9
Added databricks_permissions resource
nfx Jun 19, 2020
e38a53f
Minor commenting tweaks
nfx Jun 22, 2020
732aeda
Register permissions api in the client
nfx Jun 22, 2020
cc6727a
Add pkg/errors
nfx Jun 22, 2020
78f8b72
Added real unit tests for resource
nfx Jun 23, 2020
8865b03
trigger build
nfx Jun 23, 2020
391e80f
trigger build
nfx Jun 23, 2020
4f5c730
Merge branch 'master' into permissions-api
stikkireddy Jun 24, 2020
20a38ae
bump aws-sdk-go from 1.32.2 to 1.32.6; bump terraform-plugin-sdk from…
stikkireddy Jun 25, 2020
6f50437
Add more readability for errors (#129)
nfx Jun 25, 2020
c7f2b3d
Added databricks_permissions resource
nfx Jun 19, 2020
686b435
Minor commenting tweaks
nfx Jun 22, 2020
4b15448
Register permissions api in the client
nfx Jun 22, 2020
1ed8448
Add pkg/errors
nfx Jun 22, 2020
57b2267
Added real unit tests for resource
nfx Jun 23, 2020
515d61e
trigger build
nfx Jun 23, 2020
f4a35e0
trigger build
nfx Jun 23, 2020
9b4cdf9
Fix code style violations
nfx Jun 25, 2020
ef4ed40
Added make install
nfx Jun 25, 2020
6656e48
make build will also test now (provider + client)
nfx Jun 25, 2020
7d09b9d
Added more coverage for edge cases on permissions
nfx Jun 25, 2020
b1bc6c3
Merge branch 'permissions-api' of github.com:databrickslabs/terraform…
nfx Jun 25, 2020
e8e85e1
try fixing build
nfx Jun 25, 2020
eeeb779
test linter failing build
nfx Jun 25, 2020
08a8b54
remove fmt from lint
nfx Jun 25, 2020
ecd11ec
format it back
nfx Jun 25, 2020
fe7d72e
Added databricks_permissions resource
nfx Jun 19, 2020
dd79a2d
Minor commenting tweaks
nfx Jun 22, 2020
0088df4
Register permissions api in the client
nfx Jun 22, 2020
259e467
Add pkg/errors
nfx Jun 22, 2020
e7cec50
Added real unit tests for resource
nfx Jun 23, 2020
9c9b589
trigger build
nfx Jun 23, 2020
88da24f
trigger build
nfx Jun 23, 2020
9fd9e38
Fix code style violations
nfx Jun 25, 2020
91d8243
Added make install
nfx Jun 25, 2020
47267fd
make build will also test now (provider + client)
nfx Jun 25, 2020
598f87a
Added more coverage for edge cases on permissions
nfx Jun 25, 2020
54d6893
Added databricks_permissions resource
nfx Jun 19, 2020
1dd443f
Minor commenting tweaks
nfx Jun 22, 2020
83dca55
trigger build
nfx Jun 23, 2020
6e69eb0
try fixing build
nfx Jun 25, 2020
458b2cf
test linter failing build
nfx Jun 25, 2020
70b1935
remove fmt from lint
nfx Jun 25, 2020
239f2a9
format it back
nfx Jun 25, 2020
5adeccc
Merge branch 'permissions-api' of github.com:databrickslabs/terraform…
nfx Jun 25, 2020
3fee89c
trigger build
nfx Jun 25, 2020
ed678fe
remove go get goimports
nfx Jun 25, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ jobs:
script:
- curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v0.4.2/gotestsum_0.4.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.25.0
- time make provider-test
- time make client-test
- time make build
- go: 1.14.x
gemfile: gemfiles/Gemfile.rails-3.0.x
Expand All @@ -21,12 +19,14 @@ jobs:
script:
- curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v0.4.2/gotestsum_0.4.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.25.0
- time make provider-test
- time make client-test
- time make build


after_success:
- echo "travis go version='$TRAVIS_GO_VERSION'"
- bash <(curl -s https://codecov.io/bash) -f client-coverage.txt -F client
- bash <(curl -s https://codecov.io/bash) -f provider-coverage.txt -F provider
- bash <(curl -s https://codecov.io/bash) -f provider-coverage.txt -F provider
- bash <(curl -s https://codecov.io/bash) -f coverage.txt -F repository

notifications:
webhooks: https://www.travisbuddy.com/
56 changes: 32 additions & 24 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch test function",
            "type": "go",
            "request": "launch",
            "mode": "test",
            "program": "${workspaceRoot}/databricks/resource_databricks_azure_adls_gen2_mount_test.go",
            "args": [
                "-test.v",
                "-test.run",
                "TestAccAzureAdlsGen2Mount_capture_error"
            ],
"env": {
"TF_ACC" : "1"
// "TEST_RESOURCE_GROUP" : "${env:TEST_RESOURCE_GROUP}"
},
            "showLog": true
        }
    ]
}
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch test function",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${file}",
"args": [
"-test.v",
"-test.run",
"${selectedText}"
],
"dlvLoadConfig": {
"followPointers": true,
"maxVariableRecurse": 1,
"maxStringLen": 64,
"maxArrayValues": 64,
"maxStructFields": -1
},
"env": {
"TF_ACC": "1",
"DATABRICKS_CONFIG_PROFILE": "sandbox"
// "TEST_RESOURCE_GROUP" : "${env:TEST_RESOURCE_GROUP}"
},
"showLog": true
}
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"go.testFlags": ["-v"],
"go.delveConfig": {
"dlvLoadConfig": {
"followPointers": true,
Expand Down
275 changes: 274 additions & 1 deletion CONTRIBUTING.md

Large diffs are not rendered by default.

52 changes: 25 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
default: build

test: lint
@echo "==> Running tests..."
@gotestsum --format short-verbose --raw-command go test -v -json -short -coverprofile=coverage.txt ./...

client-test:
@echo "==> Running tests..."
@gotestsum --format short-verbose --raw-command go test -v -json -short -coverprofile=client-coverage.txt ./client/...

provider-test:
@echo "==> Running tests..."
@gotestsum --format short-verbose --raw-command go test -v -json -short -coverprofile=provider-coverage.txt ./databricks/...

int:
@echo "==> Running tests..."
@gotestsum --raw-command go test -v -json -coverprofile=coverage.txt ./...
Expand All @@ -26,14 +14,6 @@ coverage-int: int

int-build: int build

build: lint test
@echo "==> Building source code with go build..."
@go build -mod vendor -v -o terraform-provider-databricks

lint:
@echo "==> Linting source code with golangci-lint make sure you run make fmt ..."
@golangci-lint run --skip-dirs-use-default --timeout 5m

fmt:
@echo "==> Formatting source code with gofmt..."
@goimports -w client
Expand All @@ -44,13 +24,35 @@ fmt:
@gofmt -s -w main.go
@go fmt ./...

lint:
@echo "==> Linting source code with golangci-lint make sure you run make fmt ..."
@golangci-lint run --skip-dirs-use-default --timeout 5m

client-test:
@echo "==> Running tests..."
@gotestsum --format short-verbose --raw-command go test -v -json -short -coverprofile=client-coverage.txt ./client/...

provider-test:
@echo "==> Running tests..."
@gotestsum --format short-verbose --raw-command go test -v -json -short -coverprofile=provider-coverage.txt ./databricks/...

test: lint client-test provider-test
@echo "==> Running tests..."
@gotestsum --format short-verbose --raw-command go test -v -json -short -coverprofile=coverage.txt ./...

build: lint test
@echo "==> Building source code with go build..."
@go build -mod vendor -v -o terraform-provider-databricks

install: build
@echo "==> Installing provider into ~/.terraform.d/plugins ..."
@rm ~/.terraform.d/plugins/terraform-provider-databricks*
@mv terraform-provider-databricks ~/.terraform.d/plugins

vendor:
@echo "==> Filling vendor folder with library code..."
@go mod vendor

local-install: build
mv terraform-provider-databricks $(HOME)/.terraform.d/plugins/terraform-provider-databricks_v0.2.0

# INTEGRATION TESTING WITH AZURE
terraform-acc-azure: lint
@echo "==> Running Terraform Acceptance Tests for Azure..."
Expand Down Expand Up @@ -82,8 +84,4 @@ hugo:
@echo "==> Making Docs..."
@cd website && hugo -d ../docs/

internal-docs-sync:
@echo "==> Uploading Website..."
@azcopy login --service-principal --application-id $(AZCOPY_SPA_CLIENT_ID) --tenant-id=$(AZCOPY_SPA_TENANT_ID) && azcopy sync './website/public' '$(AZCOPY_STORAGE_ACCT)' --recursive

.PHONY: build fmt python-setup docs vendor terraform-local build fmt coverage test lint
Loading