Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
7d027ec
Multiple revisions 1st: AssetManager, Cmd Clone Pull Run
marcodelapierre Jan 15, 2024
106e8df
removed revision paramter from clone pull run
marcodelapierre Jan 16, 2024
0a9e6f8
updated unit tests for AssetManager
marcodelapierre Jan 16, 2024
37d332e
Merge branch 'master' into add/mult_revisions
marcodelapierre Jan 16, 2024
5a9b159
AssetManager provider.revision assigned at AssetManager object creation
marcodelapierre Jan 16, 2024
94d34f3
Codespell typo in changelog
marcodelapierre Jan 16, 2024
4744774
AssetManager: removed checkout method
marcodelapierre Jan 16, 2024
d9e7b2b
Merge branch 'master' into add/mult_revisions
marcodelapierre Jan 17, 2024
08718ef
assetmanager: fixed build signature, and unit tests
marcodelapierre Jan 17, 2024
242a600
assetmanager: one more build signature fix
marcodelapierre Jan 17, 2024
35ad1e9
AssetManager: fix for multi revs in find() method
marcodelapierre Jan 17, 2024
463b6f1
Multiple revisions: added for Cmds Drop, View, Config, Info
marcodelapierre Jan 17, 2024
2d3273e
minor fixes to log outputs in CmdRun
marcodelapierre Jan 17, 2024
d2e5ffe
AssetManager: documented new localPath schema
marcodelapierre Jan 18, 2024
60c3c5e
K8sDriverLauncher : added revision support
marcodelapierre Jan 18, 2024
4bf1e37
updates to AssetManagerTest
marcodelapierre Jan 18, 2024
7e32111
edit to AssetManagerTest, git.pull for TAGS does not output result of…
marcodelapierre Jan 18, 2024
3b2d461
minor fix in GitlabRepositoryProvider: using DEFAULT_BRANCH instead o…
marcodelapierre Jan 18, 2024
2e6461e
Minor edits
bentsherman Jan 23, 2024
a8d2dee
Merge branch 'master' into add/mult_revisions
marcodelapierre Feb 5, 2024
eaf45d8
[ci fast] Merge branch 'master' into add/mult_revisions
pditommaso Feb 10, 2024
ed17284
Merge branch 'master' into add/mult_revisions
marcodelapierre Feb 23, 2024
b3f141d
parametrised revision delimiter
marcodelapierre Feb 28, 2024
6706bd9
nf pull: option to list or not revs for each project
marcodelapierre Feb 28, 2024
e62f543
nicer output for nf list -r
marcodelapierre Feb 28, 2024
bd19877
minor edit to CmdList
marcodelapierre Feb 29, 2024
c0268af
AssetManager: adding listRevisions method (work in progress)
marcodelapierre Feb 29, 2024
aae2afc
small tune to CmdList
marcodelapierre Feb 29, 2024
268ec79
minor tweak to CmdList
marcodelapierre Feb 29, 2024
ac8d755
AssetManager: listRevisions method now working
marcodelapierre Feb 29, 2024
70c8bcc
CmdDrop option to drop all revisions of given project
marcodelapierre Feb 29, 2024
8bcd717
AssetManagerTest: added test for method listRevisions
marcodelapierre Mar 4, 2024
4616e7f
docs - cli: add -a options for list and drop
marcodelapierre Mar 4, 2024
e4b9d78
docs - cli: add/update -r option for relevant commands
marcodelapierre Mar 4, 2024
958955a
CmdInfo: now also prints info on pulled revisions
marcodelapierre Mar 4, 2024
f220e98
CmdInfo made smarter when non only non default revisions pulled
marcodelapierre Mar 4, 2024
2ad9a24
CmdInfoTest updated
marcodelapierre Mar 4, 2024
35ea812
CmdInfoTest fix
marcodelapierre Mar 4, 2024
80ecacd
CmdInfo: added code comment
marcodelapierre Mar 4, 2024
5e4b45f
AssetManager: default revision recognised correctly if specified in m…
marcodelapierre Mar 4, 2024
aa94d7b
small CLI Docs update
marcodelapierre Mar 4, 2024
d965ee5
added a couple of comments
marcodelapierre Mar 6, 2024
f6e6174
Merge branch 'master' into add/mult_revisions
marcodelapierre Mar 11, 2024
ca48a97
Merge branch 'master' into add/mult_revisions
pditommaso Mar 17, 2024
12d31a2
fix merge conflicts
marcodelapierre Mar 21, 2024
9aacb2b
Review: REVISION_DELIM and added comments
marcodelapierre Mar 21, 2024
12718c7
review: added method getProjectWithRevision
marcodelapierre Mar 21, 2024
0b57262
updated method getBaseNameWithRevision
marcodelapierre Mar 21, 2024
17067ea
docs/sharing: added paragraph on multiple revisions, with caveat on r…
marcodelapierre Mar 21, 2024
67dc5d5
cmd info: removed sticky current revision, updated docs
marcodelapierre Mar 21, 2024
7716416
fixed unit tests in CmdInfoTest
marcodelapierre Mar 21, 2024
45be84b
Merge branch 'master' into add/mult_revisions
marcodelapierre Apr 4, 2024
2af4ba7
merged from master
marcodelapierre Apr 8, 2024
afa8a1c
Merge branch 'master' into add/mult_revisions
marcodelapierre Apr 12, 2024
dc4bdee
Merge branch 'master' into add/mult_revisions
marcodelapierre Apr 15, 2024
4c93b3e
Merge branch 'master' into add/mult_revisions_apr_revision_path
marcodelapierre Jun 17, 2024
561a59f
docs update/fix
marcodelapierre Jun 17, 2024
48cf800
multi revs: consistent usage of manager.getProjectWithRevision() in Cmds
marcodelapierre Jun 17, 2024
6070273
AssetManager: undo redirect of default revision to null (circular man…
marcodelapierre Jun 17, 2024
da159d9
AssetManager: removed chicken n egg between hubprovider and localpath
marcodelapierre Jun 17, 2024
1824952
AssetManager: new location for revisions
marcodelapierre Jun 17, 2024
c2db132
Using new Asset location for CmdDrop and CmdList
marcodelapierre Jun 17, 2024
32fe348
Using new Asset location for CmdPull
marcodelapierre Jun 18, 2024
8411c2e
CmdDrop and CmdList: got rid of REVISION_DELIM
marcodelapierre Jun 18, 2024
c190dac
Using new Asset location for CmdInfo
marcodelapierre Jun 18, 2024
55868c7
updated CmdClone
marcodelapierre Jun 18, 2024
05ac8c9
AssetManager: reverted to original find() method
marcodelapierre Jun 18, 2024
0dbc77d
fixed revisionSubdir and unit tests
marcodelapierre Jun 18, 2024
e3cfec4
docs updates
marcodelapierre Jun 18, 2024
b6352c4
AssetManager: REVISION_DELIM not needed any more
marcodelapierre Jun 18, 2024
db4903a
AssetManagerTest: further fixes
marcodelapierre Jun 18, 2024
90f8f1d
AssetManager: revert back to set revision in checkValidRemoteRepo()
marcodelapierre Jun 18, 2024
a3d5557
AssetManager: using existing revision map
marcodelapierre Jun 19, 2024
0f29320
using DEFAULT_REVISION_DIRNAME
marcodelapierre Jun 19, 2024
93db4ee
AssetManager: add checkLocalBarePath
marcodelapierre Jun 19, 2024
71a5b2f
rename checkLocalBarePath to checkBareRepo
marcodelapierre Jun 19, 2024
70847e7
AssetManager: added revisionToCommitWithBareRepo, work in progress
marcodelapierre Jun 19, 2024
9c68166
minor update
marcodelapierre Jun 19, 2024
0a3d4a6
AssetManager: updateRevisionMap ok, overall work in progress
marcodelapierre Jun 20, 2024
920f8aa
final updateProjectDir ; fixed cmddrop
marcodelapierre Jun 20, 2024
be2b84f
in localPath, use commitId, plus related fixes in listRevisions
marcodelapierre Jun 20, 2024
8da7bea
list command can also show commits
marcodelapierre Jun 20, 2024
d7c2f30
updated docs/sharing.md commit in localpath
marcodelapierre Jun 20, 2024
f27b115
remove use of getPulledRevisions
marcodelapierre Jun 20, 2024
3d45ef3
fix for CmdDrop: use of DEFAULT_REVISION_DIRNAME
marcodelapierre Jun 20, 2024
06a2229
CmdList: better output for default revision
marcodelapierre Jun 20, 2024
a77bd59
AssetManager, CmdDrop : some method signature updates
marcodelapierre Jun 20, 2024
28fe569
Merge branch 'master' into add/mult_revisions_jun_revision_map
marcodelapierre Jun 24, 2024
3b9978b
AssetManager.download(): using bareRepo for pulling, plus related cha…
marcodelapierre Jun 24, 2024
20e6edc
CmdList and CmdPull: no need for manager.close()
marcodelapierre Jun 24, 2024
2199974
AssetManagerTest: updated list tests
marcodelapierre Jun 24, 2024
36dab4d
AssetManagerTest: fixed manifest test 1
marcodelapierre Jun 24, 2024
2375bda
AssetManagerTest: fixed all executed tests
marcodelapierre Jun 24, 2024
ae835e8
CmdPullTest fixed
marcodelapierre Jun 24, 2024
6769307
AssetManagerTest: fixed tests that need github token
marcodelapierre Jun 24, 2024
2cf9942
AssetManagerTest: add test for checkBareRepo
marcodelapierre Jun 24, 2024
0c140de
AssetManagerTest: added various tests for revToCommit methods
marcodelapierre Jun 25, 2024
923e200
AssetManagerTest: updated listRevs tests
marcodelapierre Jun 25, 2024
bac8797
AssetManager: update to revisionToCommitWithBareRepo
marcodelapierre Jun 25, 2024
5de01cc
AssetManagerTest: removed unneeded variable
marcodelapierre Jun 25, 2024
b061203
UpdateModuleTest: small makeup
marcodelapierre Jun 25, 2024
5a81758
UpdateModuleTest: fixed all unit tests
marcodelapierre Jun 25, 2024
3052994
UpdateModuleTest: minor edit
marcodelapierre Jun 25, 2024
6d6d7ae
AssetManager: set revision and localPath outside constructor as separ…
marcodelapierre Jun 25, 2024
69416fc
CmdPull: allow -a as equivalent to -all
marcodelapierre Jun 25, 2024
1c920db
Merge branch 'master' into add/mult_revisions_jun_revision_map
jorgee Nov 24, 2025
401fbb2
Merge branch 'master' into add/mult_revisions_jun_revision_map
jorgee Nov 24, 2025
95667ba
fix default branch test and remove replicated test
jorgee Nov 24, 2025
9dfaca0
fix issue pulling an existing commit with tag, drop issues and use ba…
jorgee Nov 27, 2025
171fca7
fix tests
jorgee Nov 27, 2025
e8e7c5b
Add shared minimal clones
jorgee Nov 28, 2025
bbffdb7
replace revision map by bare repo, file mutex to prevent concurrent c…
jorgee Dec 1, 2025
0c546f9
reduce complexity in list and drop commands
jorgee Dec 2, 2025
009426f
refactor to keep AssetManager with minimal changes and make changes i…
jorgee Dec 3, 2025
986df55
fix list and some tests
jorgee Dec 4, 2025
ad363ee
Refactor with Strategy pattern to support backward compatibility
jorgee Dec 9, 2025
c749f81
fix usage of token in github repository provider
jorgee Dec 9, 2025
72cb2e1
Merge branch 'master' into mult_revisions_no_map
jorgee Dec 9, 2025
2198f9b
fix tests
jorgee Dec 10, 2025
bffba57
fix test
jorgee Dec 10, 2025
dc997e2
multi-revision subdir instead of .nextflow
jorgee Dec 10, 2025
a15f150
more fixes
jorgee Dec 11, 2025
d0346ce
fix tests and add modify docs
jorgee Dec 11, 2025
af32c62
fix test
jorgee Dec 11, 2025
c0bb813
Apply suggestions in docs from code review
jorgee Dec 12, 2025
3b332d4
Update docs/cli.md
jorgee Dec 12, 2025
0dfa2f1
Cleanup
jorgee Dec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
262 changes: 262 additions & 0 deletions adr/20251205-multi-revision-asset-management-strategy-pattern.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
# Multi-Revision Asset Management with Strategy Pattern

- Authors: Jorge Ejarque
- Status: Pending
- Deciders: Jorge Ejarque, Ben Sherman, Paolo Di Tommaso
- Date: 2025-12-05
- Tags: scm, asset-management, multi-revision

## Summary

Nextflow's asset management system has been refactored to support multiple revisions of the same pipeline concurrently through a bare repository approach with shared object storage, while maintaining backward compatibility with legacy direct-clone repositories using the Strategy design pattern.

## Problem Statement

The original asset management system (`AssetManager`) cloned each pipeline directly to `~/.nextflow/assets/<org>/<project>/.git`, creating several limitations:

1. **No concurrent multi-revision support**: Only one revision of a pipeline could be checked out at a time, preventing concurrent execution of different versions
2. **Update conflicts**: Pulling updates while a pipeline was running could cause conflicts or corruption
3. **Testing limitations**: Users couldn't easily test different versions of a pipeline side-by-side

The goal was to enable running multiple revisions of the same pipeline concurrently (e.g., production on v1.0, testing on v2.0-dev) while maintaining efficient disk usage through object sharing.

## Goals or Decision Drivers

- **Concurrent multi-revision execution**: Must support running different revisions of the same pipeline simultaneously
- **Efficient disk usage**: Share Git objects between revisions to minimize storage overhead
- **Backward compatibility**: Must not break existing pipelines using the legacy direct-clone approach
- **API stability**: Maintain the existing `AssetManager` API for external consumers (K8s plugin, CLI commands, etc.)
- **Minimal migration impact**: Existing repositories should continue to work without user intervention
- **JGit compatibility**: Solution must work within JGit's capabilities to avoid relying on Git client installations
- **Atomic updates**: Downloading new revisions should not interfere with running pipelines

## Non-goals

- **Migration of existing legacy repositories**: Legacy repos continue to work as-is; no forced migration
- **Native Git worktree support**: Due to JGit limitations, not using Git's worktree feature
- **Revision garbage collection**: No automatic cleanup of old revisions (users can manually drop)
- **Multi-hub support**: Still tied to a single repository provider per pipeline

## Considered Options

### Option 1: Bare Repository with Git Worktrees

Use Git's worktree feature to create multiple working directories from a single bare repository.

**Implementation**:
- One bare repository at `~/.nextflow/assets/<org>/<project>/.git`
- Multiple worktrees at `~/.nextflow/assets/<org>/<project>/<revision>/`

- Good, because it's the native Git solution for multiple checkouts
- Good, because worktrees are space-efficient
- Good, because Git handles all the complexity
- **Bad, because JGit doesn't support worktrees** (deal-breaker)
- Bad, because requires native Git installation

**Decision**: Rejected due to JGit incompatibility

### Option 2: Bare Repository + Clones per Commit + Revision Map File

Use a bare repository for storage and create clones for each commit, tracking them in a separate file.

**Implementation**:
- Bare repository at `~/.nextflow/assets/<org>/<project>/.nextflow/bare_repo/`
- Clones at `~/.nextflow/assets/<org>/<project>/.nextflow/commits/<commit-sha>/`
- Revision map file at `~/.nextflow/assets/<org>/<project>/.nextflow/revisions.json` mapping revision names to commit SHAs

- Good, because it works with JGit
- Good, because bare repo reduces remote repository interactions to checkout commits
- Good, because explicit revision tracking
- Bad, because disk space as git objects replicated in clones
- Bad, because revision map file can become stale
- Bad, because requires file I/O for every revision lookup
- Bad, because potential race conditions on map file updates
- Bad, because adds complexity of maintaining external state

**Decision**: Initially implemented but later refined

### Option 3: Bare Repository + Clones per Commit (Bare as Revision Map)

Similar to Option 2 but create eliminate the separate revision map file by using the bare repository itself as the source of truth.

**Implementation**:
- Bare repository at `~/.nextflow/assets/.repos/<org>/<project>/.nextflow/bare/`
- Shared clones at `~/.nextflow/assets/.repos/<org>/<project>/.nextflow/commits/<commit-sha>/`
- Use bare repository refs to resolve revisions to commit SHAs dynamically
- JGit alternates mechanism for object sharing

- Good, because no external state file to maintain
- Good, because bare repository is always in sync (fetched on updates)
- Good, because simpler and more reliable
- Good, because atomic updates (Git operations are atomic)
- Good, because works entirely within JGit
- Bad, because requires resolution on every access (minimal overhead)

**Decision**: Selected as the multi-revision implementation

### Option 4: Strategy Pattern for Backward Compatibility

Instead of migrating existing repositories, use the Strategy pattern to support both legacy and multi-revision approaches.

**Implementation**:
- `AssetManager` as facade with unchanged public API
- `RepositoryStrategy` interface defining repository operations
- `LegacyRepositoryStrategy` for existing direct-clone behavior
- `MultiRevisionRepositoryStrategy` for new bare-repo approach
- Strategy selection based on environment variable or repository state detection

- Good, because zero migration needed
- Good, because maintains API compatibility
- Good, because allows gradual adoption
- Good, because isolates legacy code
- Good, because makes future strategies easy to add
- Neutral, because adds abstraction layer
- Bad, because increases codebase size initially

**Decision**: Selected for backward compatibility layer

## Solution or decision outcome

Implemented **Option 3 (Bare Repository + Shared Clones per Commit)** for multi-revision support, combined with **Option 4 (Strategy Pattern)** for backward compatibility. Multi-revision is the default for new repositories, while legacy mode is available via `NXF_SCM_LEGACY` environment variable.

## Rationale & discussion

### Multi-Revision Implementation (Option 3)

The bare repository approach provides efficient multi-revision support:

```
~/.nextflow/assets/.repos/nextflow-io/hello/
├── .nextflow/
│ ├── bare_repo/ # Bare repository (shared objects)
│ │ ├── objects/ # All Git objects stored here
│ │ ├── refs/
│ │ │ ├── heads/
│ │ │ └── tags/
│ │ └── config
│ │
│ └── commits/ # Commit-specific clones
│ ├── abc123.../ # Clone for commit abc123
│ │ └── .git/
│ │ ├── objects/ # (uses alternates → bare_repo)
│ │ └── info/
│ │ └── alternates # Points to bare_repo/objects
│ │
│ └── def456.../ # Clone for commit def456
│ └── .git/
└── .git/ # Optional legacy repo (HYBRID state)
```

**Key mechanisms:**

1. **Bare repository as source of truth**: The bare repo is fetched/updated from the remote, keeping refs current
2. **Dynamic resolution**: Revisions (branch/tag names) are resolved to commit SHAs using the bare repo's refs
3. **Object sharing**: Clones use Git alternates to reference the bare repo's objects, avoiding duplication
4. **Atomic operations**: Each clone is independent; downloading a new revision doesn't affect existing ones
5. **Lazy creation**: Clones are created on-demand when a specific revision is requested

**Advantages over revision map file:**
- No external state to maintain or keep in sync
- Bare repo fetch automatically updates all refs
- Resolution is simple: `bareRepo.resolve(revision)` returns commit SHA
- No race conditions on file updates
- Simpler code with fewer failure modes

### Strategy Pattern Implementation (Option 4)

The Strategy pattern provides clean separation and backward compatibility:

```
┌─────────────────────────┐
│ AssetManager │ ← Public API (unchanged)
│ (Facade) │
└───────────┬─────────────┘
│ delegates to
┌─────────────────────────┐
│ RepositoryStrategy │ ← Interface
└───────────┬─────────────┘
│ implements
┌───────┴────────┐
│ │
┌───────────┐ ┌─────────────────┐
│ Legacy │ │ MultiRevision │ ← Concrete strategies
│ Strategy │ │ Strategy │
└───────────┘ └─────────────────┘
```

**Strategy selection logic:**

1. Check `NXF_SCM_LEGACY` environment variable → Use legacy if set
2. Detect repository state:
- `UNINITIALIZED` (no repo) → Use multi-revision (default for new)
- `LEGACY_ONLY` (only `.git/`) → Use legacy (preserve existing)
- `BARE_ONLY` (only bare repo) → Use multi-revision
- `HYBRID` (both exist) → Prefer multi-revision

**Backward compatibility guarantees:**

- Existing repositories continue to work without changes
- `AssetManager` API remains identical
- CLI commands work with both strategies transparently
- Tests pass with minimal modifications
- No forced migration; users opt-in naturally when creating new repos

### Hybrid State Handling

The system gracefully handles hybrid states where both legacy and multi-revision repositories coexist:

- **Detection**: `RepositoryStatus` enum represents all possible states
- **Fallback logic**: Multi-revision strategy can fall back to legacy repo for operations if needed
- **No conflicts**: Strategies are designed to coexist; operations target different directories
- **Explicit control**: Users can force a specific strategy via `setStrategyType()`

### Migration Path

Users naturally migrate as they pull new revisions:

1. **Existing users**: Continue with legacy repos (`LEGACY_ONLY` state detected)
2. **New users**: Get multi-revision by default (`UNINITIALIZED` → multi-revision)
3. **Opt-in migration**: Delete project directory to switch to multi-revision or pull with --migrate
4. **Opt-out**: Set `NXF_SCM_LEGACY=true` to force legacy mode

### Implementation Details

**Key classes:**

- `RepositoryStrategy`: Interface defining repository operations
- `AbstractRepositoryStrategy`: Base class with shared helper methods
- `LegacyRepositoryStrategy`: Direct clone implementation (original behavior)
- `MultiRevisionRepositoryStrategy`: Bare repo + shared clones implementation

**Critical methods:**

- `download()`: Equivalent for both strategies (legacy pulls, multi-revision creates shared clone)
- `getLocalPath()`: Returns appropriate working directory based on strategy
- `getGit()`: Returns appropriate Git instance (legacy git, bare git, or commit git)

### Performance Characteristics

**Disk usage:**
- Legacy: ~100% per repository (full clone with all git objects) + Worktree
- Multi-revision: ~100% for bare + ~100K (.git with alternates) per revision + Worktree per revision

**Operation speed:**
- First download: Similar (both clone from remote)
- Additional revisions: Multi-revision faster (only fetches new objects once, creates cheap clones)
- Switching revisions: Multi-revision instant (different directories), legacy requires checkout

### Known Limitations

- No automatic migration of legacy repositories
- Bare repository overhead even for users who only need one revision
- JGit alternates slightly more complex than worktrees
- Manual cleanup required for old revision clones

## Links
- [GitHub Issue #2870 - Multiple revisions of the same pipeline for concurrent execution](https://github.com/nextflow-io/nextflow/issues/2870)
- [PR #6620 - Implementation of multiple revisions without revisions map](https://github.com/nextflow-io/nextflow/pull/6620)
- Related PRs implementing the multi-revision approach (linked in #6620)

11 changes: 9 additions & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ $ nextflow run nextflow-io/hello -r v1.1
$ nextflow run nextflow-io/hello -r dev-branch
$ nextflow run nextflow-io/hello -r a3f5c8e
```
:::{versionadded} 25.12.0-edge
:::
Nextflow downloads and stores each explicitly requested Git branch, tag, or commit ID in a separate directory path, enabling you to run multiple revisions of the same pipeline simultaneously. Downloaded revisions are stored in a subdirectory of the local project: `$NXF_ASSETS/.repos/<org>/<repo>/.nextflow/commits/<commitId>`.

:::{tip}
Use tags or commit IDs instead of branches for reproducible pipeline runs. Branch references change as development progresses over time.
:::

(cli-params)=

Expand Down Expand Up @@ -176,7 +183,7 @@ main script : main.nf
revisions :
* master (default)
mybranch
v1.1 [t]
* v1.1 [t]
v1.2 [t]
```

Expand All @@ -186,7 +193,7 @@ This shows:
- Where it's cached locally
- Which script runs by default
- Available revisions (branches and tags marked with `[t]`)
- Which revision is currently checked out (marked with `*`)
- Which revisions are currently pulled (marked with `*`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"checked out" still seems appropriate here

Suggested change
- Which revisions are currently pulled (marked with `*`)
- Which revisions are currently checkout out (marked with `*`)


### Pulling or updating projects

Expand Down
55 changes: 52 additions & 3 deletions docs/developer/diagrams/nextflow.scm.mmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,68 @@ classDiagram

class AssetManager {
project : String
localPath : File
mainScript : String
repositoryProvider : RepositoryProvider
provider : RepositoryProvider
strategy : RepositoryStrategy
hub : String
providerConfigs : List~ProviderConfig~
}
AssetManager --* RepositoryProvider
class RepositoryStatus {
<<enumeration>>
UNINITIALIZED
LEGACY_ONLY
BARE_ONLY
HYBRID
}
class RepositoryStrategyType {
<<enumeration>>
LEGACY
MULTI_REVISION
}

AssetManager --> RepositoryStatus
AssetManager --> RepositoryStrategyType
AssetManager "1" --o "1" RepositoryStrategy
AssetManager "1" --o "1" RepositoryProvider
AssetManager "1" --* "*" ProviderConfig

class RepositoryStrategy {
<<interface>>
}
class AbstractRepositoryStrategy {
<<abstract>>
project : String
provider : RepositoryProvider
root : File
}
class LegacyRepositoryStrategy {
localPath : File
}
class MultiRevisionRepositoryStrategy {
revision : String
bareRepo : File
commitPath : File
revisionSubdir : File
}

RepositoryStrategy <|-- AbstractRepositoryStrategy
AbstractRepositoryStrategy <|-- LegacyRepositoryStrategy
AbstractRepositoryStrategy <|-- MultiRevisionRepositoryStrategy

class RepositoryProvider {
<<abstract>>
}

RepositoryStrategy --> RepositoryProvider

RepositoryProvider <|-- AzureRepositoryProvider
RepositoryProvider <|-- BitbucketRepositoryProvider
RepositoryProvider <|-- BitbucketServerRepositoryProvider
RepositoryProvider <|-- GiteaRepositoryProvider
RepositoryProvider <|-- GithubRepositoryProvider
RepositoryProvider <|-- GitlabRepositoryProvider
RepositoryProvider <|-- LocalRepositoryProvider

class FileMutex

MultiRevisionRepositoryStrategy --> FileMutex
Comment on lines +72 to +75
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like unnecessary detail for the dev diagrams

Loading
Loading