Skip to content

Commit

Permalink
Update Platform API endpoint (#4855)
Browse files Browse the repository at this point in the history
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Co-authored-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
  • Loading branch information
marcodelapierre and pditommaso committed Mar 27, 2024
1 parent c9c7032 commit 4842423
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 14 deletions.
6 changes: 3 additions & 3 deletions docs/cli.md
Expand Up @@ -1266,8 +1266,8 @@ The `run` command is used to execute a local pipeline script or remote pipeline
`-with-timeline` (`timeline-<timestamp>.html`)
: Create workflow execution timeline.

`-with-tower` (`https://api.tower.nf`)
: Monitor workflow execution with [Seqera Platform](https://cloud.tower.nf/) (formerly Tower Cloud).
`-with-tower` (`https://api.cloud.seqera.io`)
: Monitor workflow execution with [Seqera Platform](https://seqera.io/) (formerly Tower Cloud).

`-with-trace` (`trace-<timestamp>.txt`)
: Create workflow execution trace file.
Expand Down Expand Up @@ -1331,7 +1331,7 @@ The `run` command is used to execute a local pipeline script or remote pipeline
$ nextflow run main.nf -entry workflow_A
```

- Execute a pipeline with integrated monitoring in [Seqera Platform](https://cloud.tower.nf).
- Execute a pipeline with integrated monitoring in [Seqera Platform](https://seqera.io).

```console
$ nextflow run nextflow-io/hello -with-tower
Expand Down
6 changes: 3 additions & 3 deletions docs/config.md
Expand Up @@ -1580,20 +1580,20 @@ The following settings are available:

### Scope `tower`

The `tower` scope controls the settings for the [Seqera Platform](https://tower.nf) (formerly Tower Cloud).
The `tower` scope controls the settings for the [Seqera Platform](https://seqera.io) (formerly Tower Cloud).

The following settings are available:

`tower.accessToken`
: The unique access token specific to your account on an instance of Seqera Platform.

Your `accessToken` can be obtained from your Seqera Platform instance in the [Tokens page](https://tower.nf/tokens).
Your `accessToken` can be obtained from your Seqera Platform instance in the [Tokens page](https://cloud.seqera.io/tokens).

`tower.enabled`
: When `true` Nextflow sends the workflow tracing and execution metrics to Seqera Platform (default: `false`).

`tower.endpoint`
: The endpoint of your Seqera Platform instance (default: `https://tower.nf`).
: The endpoint of your Seqera Platform instance (default: `https://api.cloud.seqera.io`).

`tower.workspaceId`
: The ID of the Seqera Platform workspace where the run should be added (default: the launching user personal workspace).
Expand Down
2 changes: 1 addition & 1 deletion docs/google.md
Expand Up @@ -236,7 +236,7 @@ process.scratch = false
tower.accessToken = '<YOUR ACCESS TOKEN>'
```

The [Seqera Platform](https://cloud.tower.nf) access token is optional, but it enables higher API rate limits for the {ref}`wave-page` service required by Fusion.
The [Seqera Platform](https://seqera.io) access token is optional, but it enables higher API rate limits for the {ref}`wave-page` service required by Fusion.

By default, Fusion mounts a local SSD disk to the VM at `/tmp`, using a machine type that can attach local SSD disks. If you specify your own machine type or machine series, they should be able to attach local SSD disks, otherwise the job scheduling will fail.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins.md
Expand Up @@ -16,7 +16,7 @@ The following functionalities are provided via plugin components, and they make
- `nf-console`: Implement Nextflow [REPL console](https://www.nextflow.io/blog/2015/introducing-nextflow-console.html).
- `nf-ga4gh`: Support [GA4GH APIs](https://www.ga4gh.org/).
- `nf-google`: Support for Google Cloud.
- `nf-tower`: Support for [Seqera Platform](https://tower.nf) (formerly Tower Cloud).
- `nf-tower`: Support for [Seqera Platform](https://seqera.io) (formerly Tower Cloud).
- `nf-wave`: Support for [Wave containers](https://seqera.io/wave/) service.


Expand Down
Expand Up @@ -694,7 +694,7 @@ class ConfigBuilder {
if( cmdRun.withTower != '-' )
config.tower.endpoint = cmdRun.withTower
else if( !config.tower.endpoint )
config.tower.endpoint = 'https://api.tower.nf'
config.tower.endpoint = 'https://api.cloud.seqera.io'
}

// -- set wave options
Expand Down
Expand Up @@ -1110,7 +1110,7 @@ class ConfigBuilderTest extends Specification {
then:
config.tower instanceof Map
config.tower.enabled
config.tower.endpoint == 'https://api.tower.nf'
config.tower.endpoint == 'https://api.cloud.seqera.io'
}

def 'should set wave options' () {
Expand Down
Expand Up @@ -56,7 +56,7 @@ import nextflow.util.Threads
@CompileStatic
class TowerClient implements TraceObserver {

static final public String DEF_ENDPOINT_URL = 'https://api.tower.nf'
static final public String DEF_ENDPOINT_URL = 'https://api.cloud.seqera.io'

static private final int TASKS_PER_REQUEST = 100

Expand Down Expand Up @@ -212,6 +212,10 @@ class TowerClient implements TraceObserver {
* @return The requested url or the default url, if invalid
*/
protected String checkUrl(String url){
// report a warning for legacy endpoint
if( url.contains('https://api.tower.nf') ) {
log.warn "The endpoint `https://api.tower.nf` is deprecated - Please use `https://api.cloud.seqera.io` instead"
}
if( url =~ "^(https|http)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]" ) {
while( url.endsWith('/') )
url = url[0..-2]
Expand Down
Expand Up @@ -50,7 +50,7 @@ class TowerConfig {
private String endpoint0(Map opts, Map<String,String> env) {
def result = opts.endpoint as String
if( !result || result=='-' )
result = env.get('TOWER_API_ENDPOINT') ?: 'https://api.tower.nf'
result = env.get('TOWER_API_ENDPOINT') ?: 'https://api.cloud.seqera.io'
return result.stripEnd('/')
}

Expand Down
Expand Up @@ -118,12 +118,12 @@ class TowerConfigTest extends Specification {
when:
config = new TowerConfig([:], [:])
then:
config.endpoint == 'https://api.tower.nf'
config.endpoint == 'https://api.cloud.seqera.io'

when:
config = new TowerConfig([endpoint:'-'], [:])
then:
config.endpoint == 'https://api.tower.nf'
config.endpoint == 'https://api.cloud.seqera.io'

when:
config = new TowerConfig([endpoint:'http://foo.com'], [:])
Expand Down

0 comments on commit 4842423

Please sign in to comment.