Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
firecloud-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gallant, Jason
firecloud-tools
Commits
6a8dd618
Unverified
Commit
6a8dd618
authored
7 years ago
by
abaumann
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #27 from broadinstitute/ab_fix_bq_script
This script was showing No Calls for everything. Changed call to get …
parents
6daee6b7
36fcbe09
No related branches found
Branches containing commit
Tags
v1.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/bigquery_billing_report/bigquery_billing_report.py
+5
-4
5 additions, 4 deletions
scripts/bigquery_billing_report/bigquery_billing_report.py
with
5 additions
and
4 deletions
scripts/bigquery_billing_report/bigquery_billing_report.py
+
5
−
4
View file @
6a8dd618
...
@@ -77,7 +77,7 @@ def print_submission_pricing(ws_namespace, ws_name, query_sub_id, query_workflow
...
@@ -77,7 +77,7 @@ def print_submission_pricing(ws_namespace, ws_name, query_sub_id, query_workflow
"""
%
(
dataset_project_name
,
dataset_name
,
ws_namespace
,
workflows_subquery
)
"""
%
(
dataset_project_name
,
dataset_name
,
ws_namespace
,
workflows_subquery
)
if
print_queries
:
if
print_queries
:
print
query
print
query
query_results
=
client
.
run_sync_query
(
query
)
query_results
=
client
.
run_sync_query
(
query
)
# Use standard SQL syntax for queries.
# Use standard SQL syntax for queries.
...
@@ -102,7 +102,7 @@ def print_submission_pricing(ws_namespace, ws_name, query_sub_id, query_workflow
...
@@ -102,7 +102,7 @@ def print_submission_pricing(ws_namespace, ws_name, query_sub_id, query_workflow
cost
=
row
[
2
]
cost
=
row
[
2
]
product
=
row
[
3
]
product
=
row
[
3
]
resource_type
=
row
[
4
]
resource_type
=
row
[
4
]
workflow_id
=
labels
[
"
cromwell-workflow-id
"
].
replace
(
"
cromwell-
"
,
""
)
workflow_id
=
labels
[
"
cromwell-workflow-id
"
].
replace
(
"
cromwell-
"
,
""
)
task_name
=
labels
[
"
wdl-task-name
"
]
task_name
=
labels
[
"
wdl-task-name
"
]
...
@@ -118,6 +118,7 @@ def print_submission_pricing(ws_namespace, ws_name, query_sub_id, query_workflow
...
@@ -118,6 +118,7 @@ def print_submission_pricing(ws_namespace, ws_name, query_sub_id, query_workflow
if
not
page_token
:
if
not
page_token
:
break
break
submission_id_to_workflows
=
defaultdict
(
list
)
submission_id_to_workflows
=
defaultdict
(
list
)
for
wf_id
in
workflow_dict
:
for
wf_id
in
workflow_dict
:
workflow
=
workflow_dict
[
wf_id
]
workflow
=
workflow_dict
[
wf_id
]
...
@@ -150,8 +151,8 @@ def print_submission_pricing(ws_namespace, ws_name, query_sub_id, query_workflow
...
@@ -150,8 +151,8 @@ def print_submission_pricing(ws_namespace, ws_name, query_sub_id, query_workflow
print
"
|
\t
.--- Workflow %d of %d: %s (%s)
"
%
(
wf_count
,
wf_total_count
,
wf_id
,
workflow_json
[
"
status
"
])
print
"
|
\t
.--- Workflow %d of %d: %s (%s)
"
%
(
wf_count
,
wf_total_count
,
wf_id
,
workflow_json
[
"
status
"
])
wf_count
+=
1
wf_count
+=
1
workflow_metadata_json
=
get_workflow_metadata
(
ws_namespace
,
ws_name
,
submission_id
,
wf_id
)
workflow_metadata_json
=
firecloud_api
.
get_workflow_metadata
(
ws_namespace
,
ws_name
,
submission_id
,
wf_id
)
.
json
()
if
"
calls
"
not
in
workflow_metadata_json
:
if
"
calls
"
not
in
workflow_metadata_json
:
print
"
\t
No Calls.
"
print
"
\t
No Calls.
"
continue
continue
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment