Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

christosarvanitis
Copy link
Member

Optionally exclude the Disabled pipelines of an application. This can be opt-in by the Orca PR spinnaker/orca#4819

// 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);
Copy link
Member

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 :)

@christosarvanitis christosarvanitis force-pushed the feat/excludeDisabledPipelines branch from f0b9d4c to 6dbf835 Compare December 30, 2024 15:23
@christosarvanitis christosarvanitis marked this pull request as ready for review December 30, 2024 16:33
@@ -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")
Copy link
Contributor

@dbyron-sf dbyron-sf Jan 2, 2025

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.

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Member Author

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

@christosarvanitis christosarvanitis force-pushed the feat/excludeDisabledPipelines branch from 6dbf835 to f69e8b4 Compare January 3, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants