-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1/n] Add should persist column to artf table (#1390)
- Loading branch information
Showing
58 changed files
with
626 additions
and
276 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
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
50 changes: 50 additions & 0 deletions
50
manual_qa_tests/workflows/succeed_with_snapshots_disabled.py
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,50 @@ | ||
import aqueduct as aq | ||
|
||
NAME = "succeed_with_snapshots_disabled" | ||
DESCRIPTION = """* Workflows Page: should succeed. | ||
* Workflow Details Page: | ||
* There artifacts are shown deleted: op_disabled artf, Demo query artf | ||
* Both checks should show 'passed'. | ||
""" | ||
|
||
|
||
@aq.op(requirements=[]) | ||
def op_disabled(df): | ||
return df | ||
|
||
|
||
@aq.metric(requirements=[]) | ||
def metric(df): | ||
return df.shape[0] | ||
|
||
|
||
@aq.check(requirements=[]) | ||
def check(count): | ||
return count > 10 | ||
|
||
|
||
@aq.check(requirements=[]) | ||
def check_disabled(count): | ||
return count > 10 | ||
|
||
|
||
def deploy(client, resource_name): | ||
resource = client.resource(resource_name) | ||
reviews = resource.sql("SELECT * FROM hotel_reviews") | ||
op_artf = op_disabled(reviews) | ||
metric_artf = metric(op_artf) | ||
check(metric_artf) | ||
check_disabled_artf = check_disabled(metric_artf) | ||
|
||
op_artf.enable_snapshot() | ||
check_disabled_artf.disable_snapshot() | ||
|
||
resource.save(op_artf, "succeed_with_snapshots_disabled_tmp", aq.LoadUpdateMode.REPLACE) | ||
|
||
client.publish_flow( | ||
artifacts=[op_artf], | ||
name=NAME, | ||
description=DESCRIPTION, | ||
schedule="", | ||
disable_snapshots=True, | ||
) |
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
Oops, something went wrong.