-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(web): Exclude Disabled pipelines query parameter #1520
base: master
Are you sure you want to change the base?
feat(web): Exclude Disabled pipelines query parameter #1520
Conversation
// pipeline.getDisabled may be null, so check that before comparing. If | ||
// pipeline.getDisabled is null, the pipeline is enabled. | ||
boolean pipelineEnabled = | ||
(pipeline.getDisabled() == null) || (pipeline.getDisabled() == false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: MIght use the Optional stuff here :)
front50-web/src/main/java/com/netflix/spinnaker/front50/controllers/PipelineController.java
Outdated
Show resolved
Hide resolved
f0b9d4c
to
6dbf835
Compare
@@ -202,11 +202,45 @@ public Collection<Pipeline> getTriggeredPipelines( | |||
public List<Pipeline> listByApplication( | |||
@PathVariable(value = "application") String application, | |||
@RequestParam(value = "pipelineNameFilter", required = false) String pipelineNameFilter, | |||
@RequestParam(required = false, value = "refresh", defaultValue = "true") boolean refresh) { | |||
@RequestParam(required = false, value = "refresh", defaultValue = "true") boolean refresh, | |||
@RequestParam(required = false, value = "pipelineStateFilter", defaultValue = "all") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the other possible values for pipelineStateFilter? Unless there's something super obvious coming down the road soon, I'd rather use a Boolean
. Plus also, even though refresh
does it, I don't think we need/want to specify value if it's the same as the argument name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is all
,enabled
,disabled
. The reason i switched from boolean is that i can see a useful predefined filter in Deck -> Gate for getting only the enabled or the disabled pipelines.
But we can always leave this as a future improvement if it is preferred to keep it cleaner for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if this info comes from gate (which would mean a change to spinnaker/orca#4819 right?), if those are the values, then a Boolean is enough, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gate directly calls Front50 for the pipelineConfigIds and then calls Orca to fetch the executions for those pipelineConfigIds.So both changes are needed.
Yes,sure i can change to Boolean with null fetching everything and true|false for the enabled|disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed the Boolean change here and in the orca PR
6dbf835
to
f69e8b4
Compare
Optionally exclude the Disabled pipelines of an application. This can be opt-in by the Orca PR spinnaker/orca#4819