Skip to content

Commit

Permalink
Add filtering so warning is only given for non-default-selection
Browse files Browse the repository at this point in the history
Previously this would also work for pipelines that don't have phases (eg
ramble on). This adds a simple check to only warn if the user requested
a change to the phases away from the default path
  • Loading branch information
rfbgo committed Sep 26, 2024
1 parent a5b2c74 commit 1b79363
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/ramble/ramble/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@

import itertools

ALL_PHASES = ["*"]

class Filters:
"""Object containing filters for limiting various operations in Ramble"""

def __init__(
self,
phase_filters=["*"],
phase_filters=ALL_PHASES,
include_where_filters=None,
exclude_where_filters=None,
tags=None,
Expand Down
2 changes: 1 addition & 1 deletion lib/ramble/ramble/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def _execute(self):

count += 1

if phase_total == 0:
if phase_total == 0 and self.filters.phases != ramble.filters.ALL_PHASES:
logger.warn("No valid phases were selected, please verify requested phases")

def _complete(self):
Expand Down

0 comments on commit 1b79363

Please sign in to comment.