bigeye-cli 0.3.67__tar.gz → 0.3.69__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/PKG-INFO +16 -14
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/CLI_DOCS.md +11 -11
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/bigconfig/bigconfig_commands.py +2 -1
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/configure/configure_commands.py +4 -4
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/model/github_report.py +19 -7
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/model/vendor_report.py +2 -1
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/workspace/workspace_commands.py +18 -23
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/pyproject.toml +1 -1
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/LICENSE +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/__init__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/__main__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/__version__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/bigconfig/__init__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/bigconfig/bigconfig_options.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/catalog/__init__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/catalog/catalog_commands.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/collections/__init__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/collections/collection_commands.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/configure/__init__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/deltas/__init__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/deltas/deltas_commands.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/enums.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/exceptions/__init__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/exceptions/exceptions.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/functions.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/global_options.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/issues/__init__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/issues/issue_commands.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/lineage/__init__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/lineage/lineage_commands.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/metric/__init__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/metric/metric_commands.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/model/__init__.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/model/cicd_conf.py +0 -0
- {bigeye_cli-0.3.67 → bigeye_cli-0.3.69}/bigeye_cli/workspace/__init__.py +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: bigeye-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.69
|
|
4
4
|
Summary: Bigeye CLI offers developer tools for maintaining your developer workspace.
|
|
5
|
-
Home-page: https://docs.bigeye.com/docs
|
|
6
5
|
License: Proprietary
|
|
7
6
|
Author: Bigeye
|
|
8
7
|
Author-email: support@bigeye.com
|
|
@@ -12,14 +11,17 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.9
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
16
|
Requires-Dist: PyGithub (>=1.57,<2.0)
|
|
16
17
|
Requires-Dist: bigeye-sdk (>=0.4.84,<0.5.0)
|
|
17
18
|
Requires-Dist: click (>=8.0.4,<9.0.0)
|
|
18
19
|
Requires-Dist: rich (>=12.4.4,<13.0.0)
|
|
20
|
+
Project-URL: Homepage, https://docs.bigeye.com/docs
|
|
19
21
|
Description-Content-Type: text/markdown
|
|
20
22
|
|
|
21
23
|
# **Bigeye CLI**
|
|
22
|
-
Version: 0.3.
|
|
24
|
+
Version: 0.3.69
|
|
23
25
|
## Installation
|
|
24
26
|
|
|
25
27
|
**Setting up your local/build environment**
|
|
@@ -218,7 +220,7 @@ $ bigeye configure [OPTIONS] COMMAND [ARGS]...
|
|
|
218
220
|
|
|
219
221
|
## `bigeye configure set`
|
|
220
222
|
|
|
221
|
-
Set any specific configuration settings.
|
|
223
|
+
Set any specific configuration settings.
|
|
222
224
|
|
|
223
225
|
**Usage**:
|
|
224
226
|
|
|
@@ -239,7 +241,7 @@ $ bigeye configure set [OPTIONS] [SETTING_KEY] [SETTING_VALUE]
|
|
|
239
241
|
|
|
240
242
|
## `bigeye configure get`
|
|
241
243
|
|
|
242
|
-
Get any specific configuration settings.
|
|
244
|
+
Get any specific configuration settings.
|
|
243
245
|
|
|
244
246
|
**Usage**:
|
|
245
247
|
|
|
@@ -259,7 +261,7 @@ $ bigeye configure get [OPTIONS] [SETTING_KEY]
|
|
|
259
261
|
|
|
260
262
|
## `bigeye configure list`
|
|
261
263
|
|
|
262
|
-
List all configured workspaces.
|
|
264
|
+
List all configured workspaces.
|
|
263
265
|
|
|
264
266
|
**Usage**:
|
|
265
267
|
|
|
@@ -298,7 +300,7 @@ $ bigeye workspace [OPTIONS] COMMAND [ARGS]...
|
|
|
298
300
|
* `delete-named-schedule`: Delete a named schedule.
|
|
299
301
|
* `export-named-schedule`: Export cron schedule to yaml file
|
|
300
302
|
* `invite-user`: Invite a user to a workspace.
|
|
301
|
-
* `edit-user`: Edit an existing user
|
|
303
|
+
* `edit-user`: Edit an existing user's access to groups.
|
|
302
304
|
* `delete-user`: Deletes a users account.
|
|
303
305
|
* `upsert-workspace`: Create or update a workspace.
|
|
304
306
|
* `delete-workspace`: Delete a workspace.
|
|
@@ -448,7 +450,7 @@ $ bigeye workspace invite-user [OPTIONS]
|
|
|
448
450
|
|
|
449
451
|
## `bigeye workspace edit-user`
|
|
450
452
|
|
|
451
|
-
Edit an existing user
|
|
453
|
+
Edit an existing user's access to groups.
|
|
452
454
|
|
|
453
455
|
**Usage**:
|
|
454
456
|
|
|
@@ -563,7 +565,7 @@ $ bigeye workspace edit-group-access [OPTIONS]
|
|
|
563
565
|
* `-name, --group-name TEXT`: Group name. [required]
|
|
564
566
|
* `-id, --group-id INTEGER`: Group ID.
|
|
565
567
|
* `-wn, --workspace-name TEXT`: List of workspace names to edit access. E.g. -wn workspace1 -wn workspace2 [required]
|
|
566
|
-
* `-access, --access-level TEXT`: The access this group should have to the workspaces provided. Must be
|
|
568
|
+
* `-access, --access-level TEXT`: The access this group should have to the workspaces provided. Must be `View`, `Edit`, or `Manage` [default: Edit]
|
|
567
569
|
* `-op, --operation INTEGER`: Operation type.
|
|
568
570
|
ROLE_OPERATION_UNSPECIFIED:0
|
|
569
571
|
ROLE_OPERATION_GRANT:1
|
|
@@ -630,7 +632,7 @@ $ bigeye bigconfig plan [OPTIONS]
|
|
|
630
632
|
* `-op, --output_path TEXT`: Output path where reports and fixme files will be saved. If no output path is defined then current working directory will be used.
|
|
631
633
|
* `-psn, --purge_source_name TEXT`: List of source names to purge E.g. -psn source_1 -psn source_2.
|
|
632
634
|
* `-purge_all, --purge_all_sources`: Purge all sources: True or False.
|
|
633
|
-
* `-nq, --no_queue`: Don
|
|
635
|
+
* `-nq, --no_queue`: Don't submit to queue: True or False.
|
|
634
636
|
* `-r, --recursive`: Search all input directories recursively.
|
|
635
637
|
* `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
|
|
636
638
|
* `-cicd, --cicd_report`: Add the report to a pull request. (Github only)
|
|
@@ -656,7 +658,7 @@ $ bigeye bigconfig apply [OPTIONS]
|
|
|
656
658
|
* `-op, --output_path TEXT`: Output path where reports and fixme files will be saved. If no output path is defined then current working directory will be used.
|
|
657
659
|
* `-psn, --purge_source_name TEXT`: List of source names to purge E.g. -psn source_1 -psn source_2.
|
|
658
660
|
* `-purge_all, --purge_all_sources`: Purge all sources: True or False.
|
|
659
|
-
* `-nq, --no_queue`: Don
|
|
661
|
+
* `-nq, --no_queue`: Don't submit to queue: True or False.
|
|
660
662
|
* `-r, --recursive`: Search all input directories recursively.
|
|
661
663
|
* `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
|
|
662
664
|
* `-auto_approve, --auto_approve`: Explicit plan approval is not needed prior to execution.
|
|
@@ -1404,7 +1406,7 @@ $ bigeye metric dbt-tests-to-metrics [OPTIONS]
|
|
|
1404
1406
|
* `-sf, --schema_file TEXT`: The path to the dbt schema file [required]
|
|
1405
1407
|
* `-auto, --use_auto`: Use autothresholds over default constant
|
|
1406
1408
|
* `-bigconfig, --to_bigconfig`: Convert the dbt tests to bigconfig.
|
|
1407
|
-
* `-op, --output_path TEXT`: Output path where bigconfig file will be saved. If no output path is defined then current working directory will be used. Requires --to_bigconfig to be true. [default: /
|
|
1409
|
+
* `-op, --output_path TEXT`: Output path where bigconfig file will be saved. If no output path is defined then current working directory will be used. Requires --to_bigconfig to be true. [default: /Users/christian/Projects/semantic-data-platform/bigeye-integrations/bigeye-cli]
|
|
1408
1410
|
* `--help`: Show this message and exit.
|
|
1409
1411
|
|
|
1410
1412
|
# `bigeye issues`
|
|
@@ -1536,7 +1538,7 @@ $ bigeye deltas create-delta [OPTIONS]
|
|
|
1536
1538
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1537
1539
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1538
1540
|
* `-dc, --delta_conf TEXT`: Simple Delta configuration file. [required]
|
|
1539
|
-
* `-ul, --update_lineage`: Should lineage between source and target be checked/created if doesn
|
|
1541
|
+
* `-ul, --update_lineage`: Should lineage between source and target be checked/created if doesn't exist.
|
|
1540
1542
|
* `--help`: Show this message and exit.
|
|
1541
1543
|
|
|
1542
1544
|
## `bigeye deltas run-delta`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# **Bigeye CLI**
|
|
2
|
-
Version: 0.3.
|
|
2
|
+
Version: 0.3.69
|
|
3
3
|
## Installation
|
|
4
4
|
|
|
5
5
|
**Setting up your local/build environment**
|
|
@@ -198,7 +198,7 @@ $ bigeye configure [OPTIONS] COMMAND [ARGS]...
|
|
|
198
198
|
|
|
199
199
|
## `bigeye configure set`
|
|
200
200
|
|
|
201
|
-
Set any specific configuration settings.
|
|
201
|
+
Set any specific configuration settings.
|
|
202
202
|
|
|
203
203
|
**Usage**:
|
|
204
204
|
|
|
@@ -219,7 +219,7 @@ $ bigeye configure set [OPTIONS] [SETTING_KEY] [SETTING_VALUE]
|
|
|
219
219
|
|
|
220
220
|
## `bigeye configure get`
|
|
221
221
|
|
|
222
|
-
Get any specific configuration settings.
|
|
222
|
+
Get any specific configuration settings.
|
|
223
223
|
|
|
224
224
|
**Usage**:
|
|
225
225
|
|
|
@@ -239,7 +239,7 @@ $ bigeye configure get [OPTIONS] [SETTING_KEY]
|
|
|
239
239
|
|
|
240
240
|
## `bigeye configure list`
|
|
241
241
|
|
|
242
|
-
List all configured workspaces.
|
|
242
|
+
List all configured workspaces.
|
|
243
243
|
|
|
244
244
|
**Usage**:
|
|
245
245
|
|
|
@@ -278,7 +278,7 @@ $ bigeye workspace [OPTIONS] COMMAND [ARGS]...
|
|
|
278
278
|
* `delete-named-schedule`: Delete a named schedule.
|
|
279
279
|
* `export-named-schedule`: Export cron schedule to yaml file
|
|
280
280
|
* `invite-user`: Invite a user to a workspace.
|
|
281
|
-
* `edit-user`: Edit an existing user
|
|
281
|
+
* `edit-user`: Edit an existing user's access to groups.
|
|
282
282
|
* `delete-user`: Deletes a users account.
|
|
283
283
|
* `upsert-workspace`: Create or update a workspace.
|
|
284
284
|
* `delete-workspace`: Delete a workspace.
|
|
@@ -428,7 +428,7 @@ $ bigeye workspace invite-user [OPTIONS]
|
|
|
428
428
|
|
|
429
429
|
## `bigeye workspace edit-user`
|
|
430
430
|
|
|
431
|
-
Edit an existing user
|
|
431
|
+
Edit an existing user's access to groups.
|
|
432
432
|
|
|
433
433
|
**Usage**:
|
|
434
434
|
|
|
@@ -543,7 +543,7 @@ $ bigeye workspace edit-group-access [OPTIONS]
|
|
|
543
543
|
* `-name, --group-name TEXT`: Group name. [required]
|
|
544
544
|
* `-id, --group-id INTEGER`: Group ID.
|
|
545
545
|
* `-wn, --workspace-name TEXT`: List of workspace names to edit access. E.g. -wn workspace1 -wn workspace2 [required]
|
|
546
|
-
* `-access, --access-level TEXT`: The access this group should have to the workspaces provided. Must be
|
|
546
|
+
* `-access, --access-level TEXT`: The access this group should have to the workspaces provided. Must be `View`, `Edit`, or `Manage` [default: Edit]
|
|
547
547
|
* `-op, --operation INTEGER`: Operation type.
|
|
548
548
|
ROLE_OPERATION_UNSPECIFIED:0
|
|
549
549
|
ROLE_OPERATION_GRANT:1
|
|
@@ -610,7 +610,7 @@ $ bigeye bigconfig plan [OPTIONS]
|
|
|
610
610
|
* `-op, --output_path TEXT`: Output path where reports and fixme files will be saved. If no output path is defined then current working directory will be used.
|
|
611
611
|
* `-psn, --purge_source_name TEXT`: List of source names to purge E.g. -psn source_1 -psn source_2.
|
|
612
612
|
* `-purge_all, --purge_all_sources`: Purge all sources: True or False.
|
|
613
|
-
* `-nq, --no_queue`: Don
|
|
613
|
+
* `-nq, --no_queue`: Don't submit to queue: True or False.
|
|
614
614
|
* `-r, --recursive`: Search all input directories recursively.
|
|
615
615
|
* `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
|
|
616
616
|
* `-cicd, --cicd_report`: Add the report to a pull request. (Github only)
|
|
@@ -636,7 +636,7 @@ $ bigeye bigconfig apply [OPTIONS]
|
|
|
636
636
|
* `-op, --output_path TEXT`: Output path where reports and fixme files will be saved. If no output path is defined then current working directory will be used.
|
|
637
637
|
* `-psn, --purge_source_name TEXT`: List of source names to purge E.g. -psn source_1 -psn source_2.
|
|
638
638
|
* `-purge_all, --purge_all_sources`: Purge all sources: True or False.
|
|
639
|
-
* `-nq, --no_queue`: Don
|
|
639
|
+
* `-nq, --no_queue`: Don't submit to queue: True or False.
|
|
640
640
|
* `-r, --recursive`: Search all input directories recursively.
|
|
641
641
|
* `-strict, --strict_mode`: API errors cause an exception if True. (Validation errors still cause an exception)
|
|
642
642
|
* `-auto_approve, --auto_approve`: Explicit plan approval is not needed prior to execution.
|
|
@@ -1384,7 +1384,7 @@ $ bigeye metric dbt-tests-to-metrics [OPTIONS]
|
|
|
1384
1384
|
* `-sf, --schema_file TEXT`: The path to the dbt schema file [required]
|
|
1385
1385
|
* `-auto, --use_auto`: Use autothresholds over default constant
|
|
1386
1386
|
* `-bigconfig, --to_bigconfig`: Convert the dbt tests to bigconfig.
|
|
1387
|
-
* `-op, --output_path TEXT`: Output path where bigconfig file will be saved. If no output path is defined then current working directory will be used. Requires --to_bigconfig to be true. [default: /
|
|
1387
|
+
* `-op, --output_path TEXT`: Output path where bigconfig file will be saved. If no output path is defined then current working directory will be used. Requires --to_bigconfig to be true. [default: /Users/christian/Projects/semantic-data-platform/bigeye-integrations/bigeye-cli]
|
|
1388
1388
|
* `--help`: Show this message and exit.
|
|
1389
1389
|
|
|
1390
1390
|
# `bigeye issues`
|
|
@@ -1516,7 +1516,7 @@ $ bigeye deltas create-delta [OPTIONS]
|
|
|
1516
1516
|
* `-c, --config_file TEXT`: Bigeye CLI Configuration File Path [env var: BIGEYE_API_CONFIG_FILE]
|
|
1517
1517
|
* `-w, --workspace TEXT`: Name of the workspace configuration. [env var: BIGEYE_WORKSPACE; default: DEFAULT]
|
|
1518
1518
|
* `-dc, --delta_conf TEXT`: Simple Delta configuration file. [required]
|
|
1519
|
-
* `-ul, --update_lineage`: Should lineage between source and target be checked/created if doesn
|
|
1519
|
+
* `-ul, --update_lineage`: Should lineage between source and target be checked/created if doesn't exist.
|
|
1520
1520
|
* `--help`: Show this message and exit.
|
|
1521
1521
|
|
|
1522
1522
|
## `bigeye deltas run-delta`
|
|
@@ -8,6 +8,7 @@ from bigeye_cli.functions import cli_client_factory
|
|
|
8
8
|
from bigeye_cli import global_options
|
|
9
9
|
from bigeye_cli.bigconfig import bigconfig_options
|
|
10
10
|
from bigeye_cli.model.github_report import GitHubReport
|
|
11
|
+
from bigeye_sdk.bigconfig_validation.big_config_reports import all_reports
|
|
11
12
|
from bigeye_sdk.controller.metric_controller import MetricController
|
|
12
13
|
from bigeye_sdk.controller.metric_suite_controller import MetricSuiteController
|
|
13
14
|
from bigeye_sdk.generated.com.bigeye.models.generated import MetricInfoList
|
|
@@ -73,7 +74,7 @@ def plan(
|
|
|
73
74
|
)
|
|
74
75
|
if cicd:
|
|
75
76
|
gh_report = GitHubReport(github_token=os.environ["GITHUB_TOKEN"])
|
|
76
|
-
gh_report.
|
|
77
|
+
gh_report.publish_bigconfig(console_report=report, file_reports=all_reports())
|
|
77
78
|
|
|
78
79
|
|
|
79
80
|
@app.command()
|
|
@@ -61,7 +61,7 @@ def configure(
|
|
|
61
61
|
uses_sso = Confirm.ask("Do you use SSO to access the Bigeye UI?")
|
|
62
62
|
if not uses_sso:
|
|
63
63
|
print(Text(text='\n** Please login to continue **', style='bold green'))
|
|
64
|
-
password = Prompt.ask("Enter Bigeye password for username above"
|
|
64
|
+
password = Prompt.ask("Enter Bigeye password for username above")
|
|
65
65
|
create_key = Confirm.ask("Would you like to create an API Key?")
|
|
66
66
|
basic_cred = BasicAPIAuth(base_url=base_url,
|
|
67
67
|
user=username,
|
|
@@ -73,14 +73,14 @@ def configure(
|
|
|
73
73
|
cred=basic_cred, name=key_name, description=key_description
|
|
74
74
|
)
|
|
75
75
|
else:
|
|
76
|
-
api_key = Prompt.ask("Enter the API Key"
|
|
76
|
+
api_key = Prompt.ask("Enter the API Key")
|
|
77
77
|
|
|
78
78
|
required_config = get_workspaces_for_user(
|
|
79
79
|
cred=basic_cred, workspace=workspace, use_default_credential=use_default_credential
|
|
80
80
|
)
|
|
81
81
|
else:
|
|
82
82
|
print(Text(text='\n** Make sure you have created an API key in the UI **', style='bold green'))
|
|
83
|
-
api_key = Prompt.ask("Enter the API Key"
|
|
83
|
+
api_key = Prompt.ask("Enter the API Key")
|
|
84
84
|
api_auth = APIKeyAuth(base_url=base_url, api_key=api_key)
|
|
85
85
|
required_config = get_workspace_id_for_user(cred=api_auth,
|
|
86
86
|
workspace=workspace,
|
|
@@ -93,7 +93,7 @@ def configure(
|
|
|
93
93
|
else:
|
|
94
94
|
base_url = Prompt.ask("Enter the Bigeye URL", default="https://app.bigeye.com")
|
|
95
95
|
username = Prompt.ask("Enter the username")
|
|
96
|
-
password = Prompt.ask("Enter the password"
|
|
96
|
+
password = Prompt.ask("Enter the password")
|
|
97
97
|
cred = BasicAPIAuth(base_url=base_url,
|
|
98
98
|
user=username,
|
|
99
99
|
password=password)
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from dataclasses import dataclass
|
|
3
|
+
from typing import List
|
|
3
4
|
|
|
4
5
|
from github import Github
|
|
5
6
|
from github.Issue import Issue
|
|
6
7
|
from github.PullRequest import PullRequest
|
|
7
8
|
from github.Repository import Repository
|
|
8
9
|
|
|
10
|
+
from bigeye_sdk.bigconfig_validation.big_config_reports import BIGCONFIG_REPORT
|
|
9
11
|
from bigeye_sdk.log import get_logger
|
|
10
12
|
from bigeye_sdk.generated.com.bigeye.models.generated import DeltaInfo
|
|
11
13
|
from bigeye_cli.model.vendor_report import (
|
|
@@ -31,7 +33,7 @@ class GitHubReport(VendorReport):
|
|
|
31
33
|
self.pr = self.repo.get_pull(int(os.environ["PR_NUMBER"]))
|
|
32
34
|
|
|
33
35
|
def publish(
|
|
34
|
-
|
|
36
|
+
self, base_url: str, source_table_name: str, target_table_name: str, di: DeltaInfo
|
|
35
37
|
) -> int:
|
|
36
38
|
|
|
37
39
|
dti = di.comparison_target_infos[0]
|
|
@@ -43,9 +45,6 @@ class GitHubReport(VendorReport):
|
|
|
43
45
|
log.error("The process will exit as failed.")
|
|
44
46
|
report = _format_report(url, source_table_name, target_table_name, dti)
|
|
45
47
|
body = f"Bigeye Delta failure for PR: {self.pr.title}\n\n{report}"
|
|
46
|
-
# self.issue = self.repo.create_issue(
|
|
47
|
-
# title=failure_title, body=report, assignee=self.pr.user, labels=["bug"]
|
|
48
|
-
# )
|
|
49
48
|
self.pr.create_issue_comment(body=body)
|
|
50
49
|
return 1
|
|
51
50
|
elif dti.schema_match is False:
|
|
@@ -62,7 +61,7 @@ class GitHubReport(VendorReport):
|
|
|
62
61
|
return 0
|
|
63
62
|
|
|
64
63
|
def publish_group_bys(
|
|
65
|
-
|
|
64
|
+
self, base_url: str, source_table_name: str, target_table_name: str, di: DeltaInfo
|
|
66
65
|
):
|
|
67
66
|
dti = di.comparison_target_infos[0]
|
|
68
67
|
group_bys = di.delta.comparison_table_configurations[0].group_bys
|
|
@@ -70,5 +69,18 @@ class GitHubReport(VendorReport):
|
|
|
70
69
|
report = _format_group_report(url, source_table_name, target_table_name, dti, group_bys)
|
|
71
70
|
self.pr.create_issue_comment(body=report)
|
|
72
71
|
|
|
73
|
-
def
|
|
74
|
-
self.pr.create_issue_comment(body=
|
|
72
|
+
def publish_bigconfig(self, console_report: str, file_reports: List[BIGCONFIG_REPORT]):
|
|
73
|
+
self.pr.create_issue_comment(body=console_report)
|
|
74
|
+
full_report = []
|
|
75
|
+
for report in file_reports:
|
|
76
|
+
cleansed_source_name = report.source_name.replace("/", "").replace(" ", "_")
|
|
77
|
+
title = f"{cleansed_source_name}"
|
|
78
|
+
source_report = (f"<details>"
|
|
79
|
+
f" <summary><b>Full Plan: {title}</b></summary>"
|
|
80
|
+
f"\n\n"
|
|
81
|
+
f"```yaml\n"
|
|
82
|
+
f"{report}\n"
|
|
83
|
+
f"```\n"
|
|
84
|
+
f"</details>")
|
|
85
|
+
full_report.append(source_report)
|
|
86
|
+
self.pr.create_issue_comment(body="\n".join(full_report))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import abc
|
|
2
2
|
from typing import List
|
|
3
3
|
|
|
4
|
+
from bigeye_sdk.bigconfig_validation.big_config_reports import BIGCONFIG_REPORT
|
|
4
5
|
from bigeye_sdk.generated.com.bigeye.models.generated import ComparisonMetricInfo, ComparisonMetricStatus, \
|
|
5
6
|
PredefinedMetricName, DeltaTargetInfo, ColumnNamePair, Delta, DeltaInfo
|
|
6
7
|
|
|
@@ -103,7 +104,7 @@ class VendorReport(abc.ABC):
|
|
|
103
104
|
pass
|
|
104
105
|
|
|
105
106
|
@abc.abstractmethod
|
|
106
|
-
def
|
|
107
|
+
def publish_bigconfig(self, console_report: str, file_reports: List[BIGCONFIG_REPORT]):
|
|
107
108
|
pass
|
|
108
109
|
|
|
109
110
|
# This generated Markdown tables similar to the dimensional view in Bigeye.
|
|
@@ -20,7 +20,7 @@ from bigeye_sdk.generated.com.bigeye.models.generated import (
|
|
|
20
20
|
Workspace,
|
|
21
21
|
Group,
|
|
22
22
|
RoleOperation,
|
|
23
|
-
Group,
|
|
23
|
+
Group, BulkChangeGroupGrantsResponse,
|
|
24
24
|
)
|
|
25
25
|
|
|
26
26
|
log = get_logger(__file__)
|
|
@@ -486,7 +486,7 @@ def edit_group_access(
|
|
|
486
486
|
"Edit",
|
|
487
487
|
"--access-level",
|
|
488
488
|
"-access",
|
|
489
|
-
help="The access this group should have to the workspaces provided. Must be
|
|
489
|
+
help="The access this group should have to the workspaces provided. Must be `View`, `Edit`, or `Manage`",
|
|
490
490
|
),
|
|
491
491
|
operation: int = typer.Option(
|
|
492
492
|
RoleOperation.ROLE_OPERATION_GRANT.value,
|
|
@@ -498,9 +498,9 @@ def edit_group_access(
|
|
|
498
498
|
"""Edit the workspaces that a group can access."""
|
|
499
499
|
client = cli_client_factory(bigeye_conf, config_file, workspace)
|
|
500
500
|
|
|
501
|
-
if access_level.lower() not in ["edit", "manage"]:
|
|
501
|
+
if access_level.lower() not in ["view", "edit", "manage"]:
|
|
502
502
|
raise typer.BadParameter(
|
|
503
|
-
f"Invalid access level provided. Must be
|
|
503
|
+
f"Invalid access level provided. Must be `View`, `Edit`, or `Manage`"
|
|
504
504
|
)
|
|
505
505
|
|
|
506
506
|
if group_id:
|
|
@@ -530,43 +530,38 @@ def edit_group_access(
|
|
|
530
530
|
workspaces: List[Workspace] = [
|
|
531
531
|
w for w in client.get_workspaces().workspaces if w.name in workspace_names
|
|
532
532
|
]
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
for r in client.get_roles().roles
|
|
537
|
-
if r.workspace_id in workspace_ids and r.name.lower() == access_level.lower()
|
|
538
|
-
]
|
|
533
|
+
role = next(r for r in client.get_roles().roles
|
|
534
|
+
if r.name.lower() == access_level.lower())
|
|
535
|
+
workspace_ids = [w.id for w in workspaces]
|
|
539
536
|
|
|
540
537
|
# warn user of workspace names not found
|
|
541
538
|
valid_workspace_names = [w.name.lower() for w in workspaces]
|
|
542
539
|
for w in workspace_names:
|
|
543
|
-
if w not in valid_workspace_names:
|
|
540
|
+
if w.lower() not in valid_workspace_names:
|
|
544
541
|
log.warning(
|
|
545
542
|
f"Workspace name `{w}` could not be found and will not be added to {group_name} access."
|
|
546
543
|
)
|
|
547
544
|
|
|
548
|
-
response = client.edit_group_roles(
|
|
549
|
-
|
|
550
|
-
|
|
545
|
+
response: BulkChangeGroupGrantsResponse = client.edit_group_roles(
|
|
546
|
+
group=group,
|
|
547
|
+
role=role,
|
|
548
|
+
workspace_ids=workspace_ids,
|
|
551
549
|
operation=RoleOperation(operation),
|
|
552
550
|
)
|
|
553
551
|
|
|
554
552
|
# warn user that some group/role pairs may have failed to update
|
|
555
553
|
for failed_update in response.failed_updates:
|
|
556
|
-
failed_role = next(filter(lambda r: r.id == failed_update.id, roles), None)
|
|
557
554
|
log.warning(
|
|
558
|
-
f"Group role failed to be updated. Group = {group.
|
|
555
|
+
f"Group role failed to be updated. Group = {failed_update.request.group.display_name}, "
|
|
556
|
+
f"Role = {failed_update.request.role.name}, "
|
|
557
|
+
f"Workspace = {failed_update.request.workspace.display_name}"
|
|
559
558
|
)
|
|
560
559
|
|
|
561
560
|
# validate all successful updates
|
|
562
|
-
for
|
|
563
|
-
succeeded_role = next(filter(lambda r: r.id == succeeded_id, roles), None)
|
|
564
|
-
succeeded_workspace = next(
|
|
565
|
-
filter(lambda w: w.id == succeeded_role.workspace_id, workspaces), None
|
|
566
|
-
)
|
|
561
|
+
for successful_update in response.successful_requests:
|
|
567
562
|
log.info(
|
|
568
|
-
f"Group {group.
|
|
569
|
-
f"in the {
|
|
563
|
+
f"Group {successful_update.group.display_name} has been updated for the {successful_update.role.name} role "
|
|
564
|
+
f"in the {successful_update.workspace.display_name} workspace."
|
|
570
565
|
)
|
|
571
566
|
|
|
572
567
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|