Skip to content

PSA-30969 Add correlation filter for performance. #50

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ updates:
go-modules:
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
all-github-actions:
patterns:
- "*"
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Pull Request Template

### Description

Please provide a brief description of the changes made in this pull request.

### Related Issue

If this pull request is related to an existing issue, please mention it here.

### Checklist

Please ensure that the following checklist is completed before submitting the pull request:

- [ ] Code has been tested locally and passes all tests. For more information about local testing, refer to [HowTo - Test locally](/docs/guides/howto-runintegrationtests.md).
- [ ] Documentation has been updated with `make tfdocs-generate`.
70 changes: 35 additions & 35 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name: Release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version-file: "go.mod"
cache: true
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 # v5.2.0
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
22 changes: 11 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- run: go mod download
- run: go build -v .
- name: Run linters
uses: golangci/golangci-lint-action@v3.7.0
uses: golangci/golangci-lint-action@v5
with:
version: latest

generate-documentation:
runs-on: ubuntu-latest
name: "Generate Documentation"
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- run: go generate ./...
- run: make tfdocs-generate
- name: Comparing generated Terraform documentation against main
run: |
git diff --compact-summary --exit-code || \
git diff --exit-code || \
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1)

test:
Expand All @@ -56,12 +56,12 @@ jobs:
- "1.5.*"
- "1.6.*"
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
Expand All @@ -70,5 +70,5 @@ jobs:
TF_ACC: "1"
DG_SERVICEBUS_CLIENTSECRET: ${{ secrets.DG_SERVICEBUS_CLIENTSECRET }}
DG_SERVICEBUS_CLIENTID: ${{ vars.DG_SERVICEBUS_CLIENTID }}
run: go test -v -cover ./internal/provider/
run: make testacc
timeout-minutes: 10
70 changes: 35 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
*.dll
*.exe
.DS_Store
example.tf
terraform.tfplan
terraform.tfstate
bin/
dist/
modules-dev/
/pkg/
website/.vagrant
website/.bundle
website/build
website/node_modules
.vagrant/
*.backup
./*.tfstate
.terraform/
*.log
*.bak
*~
.*.swp
.idea
*.iml
*.test
*.iml

website/vendor

# Test exclusions
!command/test-fixtures/**/*.tfstate
!command/test-fixtures/**/.terraform/

# Keep windows files with windows line endings
*.winfile eol=crlf
*.dll
*.exe
.DS_Store
example.tf
terraform.tfplan
terraform.tfstate
bin/
dist/
modules-dev/
/pkg/
website/.vagrant
website/.bundle
website/build
website/node_modules
.vagrant/
*.backup
./*.tfstate
.terraform/
*.log
*.bak
*~
.*.swp
.idea
*.iml
*.test
*.iml
website/vendor
# Test exclusions
!command/test-fixtures/**/*.tfstate
!command/test-fixtures/**/.terraform/
# Keep windows files with windows line endings
*.winfile eol=crlf
52 changes: 26 additions & 26 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Visit https://golangci-lint.run/ for usage documentation
# and information on other useful linters
issues:
max-per-linter: 0
max-same-issues: 0

linters:
disable-all: true
enable:
- durationcheck
- errcheck
- exportloopref
- forcetypeassert
- godot
- gosimple
- ineffassign
- makezero
- misspell
- nilerr
- predeclared
- staticcheck
- tenv
- unconvert
- unparam
- unused
- vet
# Visit https://golangci-lint.run/ for usage documentation
# and information on other useful linters
issues:
max-per-linter: 0
max-same-issues: 0
linters:
disable-all: true
enable:
- durationcheck
- errcheck
- exportloopref
- forcetypeassert
- godot
- gosimple
- ineffassign
- makezero
- misspell
- nilerr
- predeclared
- staticcheck
- tenv
- unconvert
- unparam
- unused
- vet
44 changes: 22 additions & 22 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
// 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": "Debug tests",
"type": "go",
"request": "launch",
"mode": "auto",
"env": {"PKG_NAME": "${relativeFileDirname}"},
"envFile": "${workspaceFolder}/.vscode/private.env",
"program": "${fileDirname}",
"args": [
"-test.v",
"-test.run",
"^${selectedText}$"
],
}
]
}
{
// 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": "Debug tests",
"type": "go",
"request": "launch",
"mode": "auto",
"env": {"PKG_NAME": "${relativeFileDirname}"},
"envFile": "${workspaceFolder}/.vscode/private.env",
"program": "${fileDirname}",
"args": [
"-test.v",
"-test.run",
"^${selectedText}$"
],
}
]
}
37 changes: 31 additions & 6 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
default: testacc

# Run acceptance tests
.PHONY: testacc
testacc:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m
.DEFAULT_GOAL := build
BIN_FILE=terraform-provider-dg-servicebus.exe

# Build the executable binary
build:
@go build -o "${BIN_FILE}"

# Run the executable binary
run:
./"${BIN_FILE}"

# Clean the project by removing build artifacts
clean:
go clean
rm --force "cp.out"
rm --force nohup.out

# Run linter to analyze the code for potential issues
lint:
golangci-lint run

# Run acceptance tests with Terraform
testacc:
TF_ACC=1 go test -timeout 120m -count=1 -parallel=5 -v -cover ./internal/provider/

# Generate Terraform provider documentation
tfdocs-generate:
export GOBIN=$$PWD/bin && \
export PATH=$$GOBIN:$$PATH && \
go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@latest && \
tfplugindocs generate --provider-name "dgservicebus"
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Terraform Provider DG ServiceBus

This repository contains a Terraform provider for managing NServiceBus Endpoints on Azure Service Bus. It tries to solves a specific issue, currently present when using the official Azure Resource Manager Provider, in conjunction with NServiceBus. The issue is described in detail [in this issue](https://github.com/hashicorp/terraform-provider-azurerm/issues/20718)

For additional information about provider development see the [Plugin Framework documentation](https://developer.hashicorp.com/terraform/plugin).
# Terraform Provider DG ServiceBus

This repository contains a Terraform provider for managing NServiceBus Endpoints on Azure Service Bus. It addresses a specific issue that arises when using the official Azure Resource Manager Provider in conjunction with NServiceBus. You can find more details about this issue [here](https://github.com/hashicorp/terraform-provider-azurerm/issues/20718).

For additional information about provider development, please refer to the [Plugin Framework documentation](https://developer.hashicorp.com/terraform/plugin).

You can find more documentation in the [docs](/docs/) folder. The documentation is structured as described [here](https://developer.hashicorp.com/terraform/registry/providers/docsa).
Loading