-
Notifications
You must be signed in to change notification settings - Fork 570
Support Azure based locks #122
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spartakovic
approved these changes
Apr 13, 2023
Closed
Contributor
|
Great effort @ynden . This looks ready for merge, we just need to do some final testing with an Azure account and then go ahead with the merge |
veziak
approved these changes
Apr 14, 2023
Contributor
veziak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
ben-of-codecraft
pushed a commit
to ben-of-codecraft/digger
that referenced
this pull request
May 21, 2024
* Implement lock & unlock for Azure
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change log
Features
Lock&Unlockthrough Azure Storage Account tablesDigger's format: since Storage Account table doesn't accept#and/charactersTests
AzuriteHow does it work?
There is one mandatory environment variable the user will have to set, in order to use Azure based locks:
DIGGER_AZURE_AUTH_METHOD, which can take one of the three values below:Then, depending on the value of
DIGGER_AZURE_AUTH_METHOD, the user will have to set other environment variables.DIGGER_AZURE_SA_NAME: Storage account nameDIGGER_AZURE_SHARED_KEY: shared key of the storage accountDIGGER_AZURE_CONNECTION_STRING: connection stringDIGGER_AZURE_TENANT_ID: tenant id to useDIGGER_AZURE_CLIENT_ID: client id of the service principalDIGGER_AZURE_CLIENT_SECRET: secret of the service principalDIGGER_AZURE_SA_NAME: storage account nameRunning the tests
Since we need to use a real storage account to test our features, we have two options:
Azurite(that will emulate Azure Storage Account, but locally)The tests have been set so we run tests against
Azuriteby default, unless otherwise specified. The only disadvantage of usingAzurite, is that we cannot perform aCLIENT_SECRETauthentication. This is why we voluntarilySkipclient secret test cases when usingAzurite.To summarize the tests that are run:
DIGGER_TEST_USE_REAL_SAenvironment variable is set to "1":DIGGER_TEST_USE_REAL_SAenvironment variable is not set, or set to "0":* Run Shared Key authentication tests
* Run Connection string authentication tests