-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable audit logs for Snowflake backend (#11306)
- Loading branch information
Showing
14 changed files
with
165 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
14 changes: 14 additions & 0 deletions
14
distribution/lib/Standard/Database/0.0.0-dev/src/Internal/DB_Data_Link_Helpers.enso
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from Standard.Base import all | ||
|
||
from Standard.Base.Enso_Cloud.Data_Link_Helpers import Data_Link_Source_Metadata | ||
|
||
import project.Connection.Connection_Options.Connection_Options | ||
|
||
## PRIVATE | ||
data_link_connection_parameters (source : Data_Link_Source_Metadata) -> Connection_Options = | ||
related_asset_id = case source of | ||
Data_Link_Source_Metadata.Cloud_Asset id -> id | ||
_ -> Nothing | ||
audit_mode = if Enso_User.is_logged_in then "cloud" else "local" | ||
options_vector = [["enso.internal.audit", audit_mode]] + (if related_asset_id.is_nothing then [] else [["enso.internal.relatedAssetId", related_asset_id]]) | ||
Connection_Options.Value options_vector |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from Standard.Base import all | ||
|
||
from Standard.Test import all | ||
import Standard.Test.Test_Reporter | ||
|
||
add_specs suite_builder = suite_builder.group "Test Reporter running on GitHub" group_builder-> | ||
file = (enso_project.root / "src" / "test-file.enso") . absolute . normalize | ||
file_relative_to_repo_root = (File.new "test") / "Base_Internal_Tests" / "src" / "test-file.enso" | ||
group_builder.specify "should correctly parse error message" <| | ||
message = "[False, False, False, True] did not equal [False, False, True, True]; first difference at index 2 (at "+file.path+":1:13-110)." | ||
line = Test_Reporter.generate_github_error_annotation 'Test, and\n special characters' message | ||
line.should_equal "::error title=Test%2C and%0A special characters,file="+file_relative_to_repo_root.path+",line=1,col=13,endColumn=110::[False, False, False, True] did not equal [False, False, True, True]; first difference at index 2 (at "+file.path+":1:13-110)." | ||
|
||
group_builder.specify "should be able to parse dashes" <| | ||
message = "test failure (at "+file.path+":1-2:3-4)." | ||
line = Test_Reporter.generate_github_error_annotation "Test" message | ||
line.should_equal "::error title=Test,file="+file_relative_to_repo_root.path+",line=1,endLine=2,col=3,endColumn=4::test failure (at "+file.path+":1-2:3-4)." | ||
|
||
message2 = "test failure (at "+file.path+":1234-5678:91011-121314)." | ||
line2 = Test_Reporter.generate_github_error_annotation "Test" message2 | ||
line2.should_equal "::error title=Test,file="+file_relative_to_repo_root.path+",line=1234,endLine=5678,col=91011,endColumn=121314::test failure (at "+file.path+":1234-5678:91011-121314)." | ||
|
||
group_builder.specify "should be able to parse no dashes" <| | ||
message = "test failure (at "+file.path+":1234:7)." | ||
line = Test_Reporter.generate_github_error_annotation "Test" message | ||
line.should_equal "::error title=Test,file="+file_relative_to_repo_root.path+",line=1234,col=7::test failure (at "+file.path+":1234:7)." | ||
|
||
main filter=Nothing = | ||
suite = Test.build suite_builder-> | ||
add_specs suite_builder | ||
suite.run_with_filter filter |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"type": "Snowflake_Connection", | ||
"libraryName": "Standard.Snowflake", | ||
"account": "ACCOUNT", | ||
"database_name": "DBNAME", | ||
"schema": "SCHEMA", | ||
"warehouse": "WAREHOUSE", | ||
"credentials": { | ||
"username": "USERNAME", | ||
"password": "PASSWORD" | ||
} | ||
} |
Oops, something went wrong.