-
Notifications
You must be signed in to change notification settings - Fork 809
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(execution): Exclude execution retrieval for Disabled Front50 pipelines #4819
feat(execution): Exclude execution retrieval for Disabled Front50 pipelines #4819
Conversation
orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/Front50Service.groovy
Outdated
Show resolved
Hide resolved
5c86e68
to
f849250
Compare
f849250
to
086a55d
Compare
...netflix/spinnaker/orca/front50/scheduling/UnusedPipelineDisablePollingNotificationAgent.java
Show resolved
Hide resolved
e5a4857
to
412524c
Compare
...ore/src/main/java/com/netflix/spinnaker/orca/pipeline/persistence/DualExecutionRepository.kt
Show resolved
Hide resolved
...netflix/spinnaker/orca/front50/scheduling/UnusedPipelineDisablePollingNotificationAgent.java
Show resolved
Hide resolved
criteria: ExecutionCriteria | ||
): List<String> { | ||
var baseQueryPredicate = field("application").eq(application) | ||
var table = if (jooq.dialect() == SQLDialect.MYSQL) PIPELINE.tableName.forceIndex("pipeline_application_idx") |
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.
As a rule, try to avoid force indexes - let the database optimize as needed as if new indexes come online or old ones get removed this would require work here.
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.
Following the optimised retrieval from this PR #4804 I can revert to a simple query. What do you think?
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.
Please! Simple == better on these let the DB do it's thing... particularly if in future indexes change.
orca-web/src/test/groovy/com/netflix/spinnaker/orca/controllers/TaskControllerSpec.groovy
Outdated
Show resolved
Hide resolved
1a280e1
to
c3e3f22
Compare
29d8ef1
to
94eb5b8
Compare
Adding an opt-in feature to exclude Execution Retrieval for Disabled Front50 pipelines. This can be configured via:
When enabled Orca calls the Front50 with a query parameter
enabledPipelines=true
. Front50 responds only with the enabled pipelines of the application.This feature aims to ease the load on the execution retrieval for applications that have a lot of pipelines and for historical reasons users dont want to delete the obsolete pipelines that are disabled.
Additionally an agent is implemented to check for unused/unexecuted pipelines per application for the past X days and disable them in Front50. This is only applicable for SQL execution repository and can be configured via:
Related Front50 change spinnaker/front50#1520