Skip to content

Commit

Permalink
Merge tag '1.14' into develop
Browse files Browse the repository at this point in the history
1.14
  • Loading branch information
denis-yuen committed May 31, 2023
2 parents 2e84d49 + 3a3bed3 commit c386665
Show file tree
Hide file tree
Showing 62 changed files with 647 additions and 61 deletions.
10 changes: 7 additions & 3 deletions discourse-topic-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ fi

for file in $(git diff --name-only "$baseBranch".. | grep "\.rst$" | grep -Fvxf $DOES_NOT_REQUIRE_DISCOURSE_TOPIC)
do
if ! containsDiscourseTopic "$file"
# The file may be in the base branch but not the current branch. Skip in that case.
if [[ -f "$file" ]]
then
echo "${file} does not have a discourse topic"
RETURN_VALUE=1
if ! containsDiscourseTopic "$file"
then
echo "${file} does not have a discourse topic"
RETURN_VALUE=1
fi
fi
done

Expand Down
9 changes: 8 additions & 1 deletion docs/_static/language-support.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@
<td style="background-color:#dff0d8; padding: 5px;"><a href="../advanced-topics/best-practices/nfl-best-practices.html#best-practices">Yes</a></td>
<td style="background-color:#dff0d8; padding: 5px;">Yes</td>
</tr>
<tr style="border-top: 1px solid #ddd; ">
<td style="padding: 5px;"><a href="../faq.html#what-is-an-open-tool-or-workflow">Open Data</a></td>
<td style="background-color:#dff0d8; padding: 5px;">Yes <sup>[11]</sup></td>
<td style="background-color:#dff0d8; padding: 5px;">Yes<sup>[12]</sup></td>
<td style="background-color:lightgray; padding: 5px;">No</td>
<td style="background-color:lightgray; padding: 5px;">No</td>
</tr>
<tr style="border-top: 1px solid #ddd; ">
<th style="padding: 5px;">Dockstore CLI</th>
<th style="padding: 5px;"></th>
Expand Down Expand Up @@ -192,7 +199,7 @@
<td style="background-color:lightgray; padding: 5px;">No</td>
</tr>
<tr style="border-top: 1px solid #ddd; ">
<td style="padding: 5px;"><a href="../advanced-topics/advanced-features.html#notifications">Notifications</a></td>
<td style="padding: 5px;"><a href="../advanced-topics/dockstore-cli/advanced-features.html#notifications">Notifications</a></td>
<td style="background-color:#dff0d8; padding: 5px;">Yes</td>
<td style="background-color:#dff0d8; padding: 5px;">Yes</td>
<td style="background-color:lightgray; padding: 5px;">No</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-topics/docker-alternatives.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Podman
Podman is a daemon-less alternative of Docker that allows end users to run Docker/Open Container Initiative (OCI) containers without root privileges.

Podman can be installed following the instructions
`here <https://podman.io/getting-started/installation>`__.
`here <https://podman.io/docs/installation>`__.

cwltool
~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-topics/dockstore-cli/advanced-features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ The table below summarizes some of the WES endpoints available:
+-----------+------------------------------------------------------+-----------+


.. note:: WES SUPPORT IS IN BETA AT THIS TIME. RESULTS MAY BE UNPREDICTABLE.
.. note:: WES SUPPORT IS IN PREVIEW MODE AT THIS TIME. RESULTS MAY BE UNPREDICTABLE.

.. discourse::
:topic_identifier: 1274
20 changes: 17 additions & 3 deletions docs/advanced-topics/dockstore-cli/dockstore-cli-faq.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _topCLIFAQ:

Dockstore CLI FAQ
=================

Expand All @@ -17,6 +19,8 @@ FTP, S3, and GCS. As of Release 1.12, the Dockstore CLI has support for running
client <https://docs.icgc.org/download/guide/#score-client-usage>`__. Please see `file provisioning plugins <https://github.com/dockstore/dockstore-cli/tree/master/dockstore-file-plugin-parent>`__
for more information on these two file transfer sources.

:ref:`(back to top) <topCLIFAQ>`

.. _how-do-i-use-the-dockstore-cli-on-a-mac:

How do I use the Dockstore CLI on a Mac?
Expand All @@ -34,6 +38,8 @@ can change what it allocates using the Docker for Mac GUI under

The default allocation can cause workflows or tools to fail without informing the user with a memory or resource related error message. If you find that your workflow or tool is behaving differently on a Mac compared to a similarly resourced Ubuntu environment, you can try increasing the resources allocated to Docker on the Mac to resolve the discrepancy. If you are using WDL, see also our notes on :doc:`local Cromwell configuration files`</advanced-topics/dockstore-cli/local-cromwell-config>`.

:ref:`(back to top) <topCLIFAQ>`

Why am I getting "Mount denied" errors when launching workflows on Mac?
-----------------------------------------------------------------------
Docker behaves a bit differently on a `Mac <https://docs.docker.com/docker-for-mac/osxfs/#/namespaces>`__ than on a typical Ubuntu machine. On a Mac, by default, the only shared volumes Docker can access are /Users, /Volumes, /tmp, and /private. This is problematic because many workflow executors, such as `cwltool`, uses your TMPDIR (the :ref:`dict environment variable`) to set up volumes with Docker. Since `$TMDIR` on a Mac can default to a subdirectory of /var, which Docker usually cannot access, you may run into an error. When using cwltool, the error will look something like this:
Expand Down Expand Up @@ -66,6 +72,7 @@ Depending on the permissions available to your machine, you may be able to give

$TMPDIR might be set to a subfolder of /private/var/folders. If you are still having issues, try adding /var/folders to Docker's list of accessible directories instead.

:ref:`(back to top) <topCLIFAQ>`

How do I launch tools/workflows without internet access on compute nodes?
-------------------------------------------------------------------------
Expand All @@ -82,15 +89,18 @@ follow these steps:
The Dockstore CLI will automatically load all Docker images in the
directory specified prior to a ``launch --local-entry`` command.

:ref:`(back to top) <topCLIFAQ>`

.. _return-code-wdl:

How do I find the return code for a WDL task?
---------------------------------------------

The numeric return code for a WDL task will be in that task's execution folder. It is a single file named `rc` with no extension. Generally speaking, a 0 is a success, and anything else is a failure.

Let's say you are running [this vcf-to-gds file conversion workflow](https://dockstore.org/workflows/github.com/DataBiosphere/analysis_pipeline_WDL/vcf-to-gds-wdl:v7.1.1), which runs the check-gds task as a scattered task on an array of three files. Cromwell will refer to each instance of that scattered task as a "shard" and will name them starting with 0. If you notice that shard 0 seems to have failed, look for `/cromwell-executions/[workflow ID]/call-check_gds/shard-0/execution/rc` keeping in mind that the workflow ID will usually be a long mix of numbers, letters, and dashes such as 18a85cc0-aa59-4749-b1b9-e2580ed5e557.
Let's say you are running [this vcf-to-gds file conversion workflow](https://dockstore.org/workflows/github.com/DataBiosphere/analysis_pipeline_WDL/vcf-to-gds-wdl:v7.1.1), which runs the check-gds task as a scattered task on an array of three files. Cromwell will refer to each instance of that scattered task as a "shard" and will name them starting with 0. If you notice that shard 0 seems to have failed, look for `/cromwell-executions/[workflow ID]/call-check_gds/shard-0/execution/rc` keeping in mind that the workflow ID will usually be a long mix of numbers, letters, and dashes such as 18a85cc0-aa59-4749-b1b9-e2580ed5e557.

:ref:`(back to top) <topCLIFAQ>`

.. _cromwell-docker-lockup:

Expand All @@ -103,7 +113,9 @@ If a Docker lockup happens, you will notice in-progress WDL tasks do not progres

The other issue we often see is some instances of scattered tasks getting `sigkilled <https://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html>`__ by the operating system. You will know when this happens because the `rc` (return code) file will read 137. If it reads anything except 137, then you can assume that it wasn't actually a resource management error and look in stderr or stdout for the true culprit. For more on return codes, see :ref:`this FAQ <return-code-wdl>` entry.

To prevent these issues from happening, we recommend setting up your Cromwell configuration file to limit how many scattered tasks run at once, and then setting up the Dockstore CLI to make use of that Cromwell configuration file. :doc:`A step-by-step tutorial is available here. </advanced-topics/dockstore-cli/local-cromwell-config>`
To prevent these issues from happening, we recommend setting up your Cromwell configuration file to limit how many scattered tasks run at once, and then setting up the Dockstore CLI to make use of that Cromwell configuration file. :doc:`A step-by-step tutorial is available here. </advanced-topics/dockstore-cli/local-cromwell-config>`

:ref:`(back to top) <topCLIFAQ>`

The CLI is failing with Java 8 or 11
------------------------------------
Expand All @@ -121,7 +133,9 @@ The Dockstore CLI as of 1.7.0 is compiled and tested using Java 11 due
to the Java 8 EOL. You will need to upgrade from Java 8 to use CLI versions betweenn 1.7 and 1.13.

The Dockstore CLI as of 1.14.0 is compiled and tested using Java 17 due
to the approaching Java 11 EOL. You will need to update to Java 17 to use the CLI version 1.14.0+.
to the approaching Java 11 EOL. You will need to update to Java 17 to use the CLI version 1.14.0+.

:ref:`(back to top) <topCLIFAQ>`

.. discourse::
:topic_identifier: 6481
2 changes: 2 additions & 0 deletions docs/advanced-topics/dockstore-tools-overhaul.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ At a Glance
.. include:: /advanced-topics/legacy/table--legtool-vs-ghatool.rst


.. _legacy_tools:

Dockstore Tools Prior to 1.12 (Legacy Tools)
--------------------------------------------

Expand Down
154 changes: 154 additions & 0 deletions docs/advanced-topics/metrics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
Workflow Metrics
================

.. note:: Dockstore Workflow Metrics is currently in preview mode. Also note that the screenshots below were taken on our staging site.

What are workflow metrics?
------------------------------------
Workflow metrics are metrics of workflow executions on a platform. Metrics include things like the resources used during the execution, and how often workflow executions succeeded or failed.

Users are able to execute workflows on various platforms using Dockstore's Launch With feature, shown on the right side in the screenshot below.

.. figure:: /assets/images/docs/submit-metrics/workflow-launch-with.png
:alt: Launch With Partners

Platforms are able to submit metrics of workflows executed on their platform to Dockstore and we aggregate the metrics and display them in the UI to the users in the :ref:`Metrics tab <How to view metrics>`.

Why would I want to submit workflow metrics?
--------------------------------------------
As a platform owner, workflow metrics indicate to others that your platform is compatible with many workflows on Dockstore. Workflow metrics provide valuable information to users, including information about the resources and time needed to run the workflow. It helps the user determine if the workflow is high quality and is very likely to work for others.

.. _How to view metrics:

How do I view workflow metrics?
-------------------------------

To view workflow metrics for a workflow on Dockstore, you will need to use the ``metrics`` feature flag.

To use the ``metrics`` feature flag, append ``metrics`` to the Dockstore URL as a query parameter. You only need to do this once, unless you refresh/close your browser.

For example, if you're on the https://dockstore.org page, append ``metrics`` such that it looks like this: https://dockstore.org?metrics.

If you're on a page that already contains query parameters, indicated by the presence of a question mark, append ``metrics`` to the URL using an ampersand. For example, if you're on the https://dockstore.org/workflows/github.com/gatk-workflows/seq-format-conversion/BAM-to-Unmapped-BAM:3.0.0?tab=info page, append ``metrics`` such that it looks like https://dockstore.org/workflows/github.com/gatk-workflows/seq-format-conversion/BAM-to-Unmapped-BAM:3.0.0?tab=info&metrics.

After applying the ``metrics`` feature flag, a Metrics tab will appear when viewing a workflow on Dockstore. Click on the Metrics tab and you will see workflow metrics if they are available.

.. figure:: /assets/images/docs/submit-metrics/metrics-tab.png
:alt: Metrics tab

How do I submit workflow metrics?
---------------------------------

.. note:: Submitting workflow metrics is only available for admins, curators, and platform partners. If you're a platform owner and you don't have a platform partner user, please contact us via our `GitHub <https://github.com/dockstore/dockstore/issues>`_ issues or open a helpdesk ticket on `Discourse <https://discuss.dockstore.org/>`_ and we will help you get set up.

Go to https://dockstore.org/api/static/swagger-ui/index.html#/extendedGA4GH/executionMetricsPost. This is the endpoint used to submit metrics to Dockstore. Click the "Try it out” button.

First, fill out the query parameters. This is where you'll input information about which workflow was executed and what platform it was executed on.

For the ``id`` parameter, provide the TRS ID of the workflow that you want to submit metrics for. For example, the `dockstore-tool-bamstats <https://dockstore.org/workflows/github.com/dockstore/dockstore-tool-bamstats/wdl:1.25-9?tab=info>`__ workflow has the TRS ID ``#workflow/github.com/dockstore/dockstore-tool-bamstats/wdl`` as shown in the “Info” tab with the label “TRS".

For the ``version_id`` parameter, provide the name of the workflow version that was executed. It can be any version listed in the "Versions" tab of the workflow. For example, `dockstore-tool-bamstats <https://dockstore.org/workflows/github.com/dockstore/dockstore-tool-bamstats/wdl:1.25-9?tab=versions>`__ has the following versions currently: 1.25-9 and develop. It is recommended to submit execution metrics for versions that are unlikely to change, like tags.

Select the ``platform`` that the workflow was executed on from the available values.

For the ``description``, you may provide an optional description about the metrics you're submitting.

.. figure:: /assets/images/docs/submit-metrics/query-parameters.png
:alt: Query parameters for submitting metrics

In the request body, provide the workflow execution metrics that you want to submit. Click on Schema to view the schema of the request body.

.. figure:: /assets/images/docs/submit-metrics/request-body-schema.png
:alt: Request body schema for submitting metrics

You can provide a individual executions through ``runExecutions`` and ``validationExecutions``.

A run execution is an execution that runs the workflow. The only required metric for run executions is ``executionStatus``. If you want to provide additional metrics that are not defined in the schema, use the ``additionalProperties`` key to provide your metric.

.. figure:: /assets/images/docs/submit-metrics/run-executions-schema.png
:alt: Schema for run executions

A validation execution is an execution of a validator tool, like miniwdl, on the workflow. The following are required for a validation execution:

- ``validatorTool``
- ``validatorToolVersion``
- ``isValid``
- ``dateExecuted``

If you want to provide additional metrics that are not defined in the schema, use the ``additionalProperties`` key to provide your metric.

.. figure:: /assets/images/docs/submit-metrics/validation-executions-schema.png
:alt: Schema for validation executions

Instead of providing individual executions, you may also provide aggregated metrics that summarize data for multiple executions through ``aggregatedExecutions``. There are no required fields, but you must provide at least one metric. If you want to provide aggregated metrics that are not defined in the schema, use the ``additionalAggregatedMetrics`` key to provide your metric.

.. figure:: /assets/images/docs/submit-metrics/aggregated-metrics-schema.png
:alt: Schema for aggregated metrics

Lastly, provide your Dockstore token using the lock icon at the top right of the endpoint.

Below is an example of what a request for submitting individual execution metrics looks like. The request is for a workflow that was executed on Terra. The request body submits one run execution that was successful and took 30 seconds to execute, and one validation execution of miniwdl version 1.9.1 which validated the workflow successfully.

.. figure:: /assets/images/docs/submit-metrics/individual-executions-example.png
:alt: Example request for submitting individual run executions and validation executions


The curl command results in something like:

.. code:: bash
curl -X 'POST' \
'https://dockstore.org/api/api/ga4gh/v2/extended/%23workflow%2Fgithub.com%2Fdockstore%2Fdockstore-tool-bamstats%2Fwdl/versions/1.25-9/executions?platform=TERRA' \
-H 'accept: */*' \
-H 'Authorization: Bearer iamafakebearertoken' \
-H 'Content-Type: application/json' \
-d '{
"runExecutions": [
{
"executionStatus": "SUCCESSFUL",
"executionTime": "PT30S"
}
],
"validationExecutions": [
{
"validatorTool": "miniwdl",
"validatorToolVersion": "1.9.1",
"isValid": true,
"dateExecuted": "2023-03-31T15:06:49.888745366Z"
}
]
}'
If it was submitted successfully, you should receive a ``204`` response code.

Below is an example of what a request for submitting aggregated execution metrics looks like. The request body submits an aggregated execution status metric, indicating that the workflow was successfully executed 5 times, and it failed twice, once because it was run time invalid and once because it was semantically invalid.

.. figure:: /assets/images/docs/submit-metrics/aggregated-executions-example.png
:alt: Example request for submitting aggregated metrics

The curl command results in something like:

.. code:: bash
curl -X 'POST' \
'https://dockstore.org/api/api/ga4gh/v2/extended/%23workflow%2Fgithub.com%2Fdockstore%2Fdockstore-tool-bamstats%2Fwdl/versions/1.25-9/executions?platform=TERRA' \
-H 'accept: */*' \
-H 'Authorization: Bearer iamafakebearertoken' \
-H 'Content-Type: application/json' \
-d '{
"aggregatedExecutions": [
{
"executionStatusCount": {
"count": {
"SUCCESSFUL": 5,
"FAILED_RUNTIME_INVALID": 1,
"FAILED_SEMANTIC_INVALID": 1
},
"numberOfSuccessfulExecutions": 5,
"numberOfFailedExecutions": 2
}
}
]
}'
If it was submitted successfully, you should receive a ``204`` response code.
21 changes: 20 additions & 1 deletion docs/advanced-topics/organizations-and-collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,30 @@ Creating an organization
To create an organization request, go to the
`organizations <https://dockstore.org/organizations>`__ page and select
``Create Organization Request``. Any user can request to create an
organization by filling out the following form. For now, the request
organization by filling out the following form. The request
must be approved by a Dockstore curator in order to be public. Until it
is approved, you are still able to edit it, add collections, add
members, etc.

To create an organization request, you must have at least 2 external accounts
linked to your Dockstore account. Linked accounts help the Dockstore curators
verify that a legitimate user is creating the request.

When you click the ``Create Organization Request`` button, you are prompted with
a dialog that shows the number of external accounts you have linked. If you have
at least 2 accounts linked, you can create an organization request. If
you have fewer than two accounts linked, you cannot create an
organization request. In both cases, the dialog has a ``Link Accounts`` button
that takes you to the Accounts page, where you can link additional accounts.

.. figure:: /assets/images/docs/UserVerification.png
:alt: User Verification

User Verification

If you have at least 2 accounts linked, clicking the ``Next`` button brings up the
Create Organization Request dialog.

.. figure:: /assets/images/docs/CreateOrganizationRequest.png
:alt: Create Organization Request

Expand Down
Loading

0 comments on commit c386665

Please sign in to comment.