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(core): Add endpoint to get current pipeline definition #644

Merged
merged 2 commits into from
Dec 5, 2019
Merged

feat(core): Add endpoint to get current pipeline definition #644

merged 2 commits into from
Dec 5, 2019

Conversation

ezimanyi
Copy link
Contributor

@ezimanyi ezimanyi commented Dec 5, 2019

There's currently no endpoint in front50 to get the current pipeline definition; consumers need to call the history endpoint with a limit of 1 and take the single returned element.

Let's make the API simpler for consumers who just want the current definition by giving them an endpoint to return it.

Forcing consumers to call the /history endpoint has led to performance issues, as that endpoint is often much slower than a call to get the current definition. Some backing stores have optimized to short-circuit the limit=1 case (s3 in #316), but others (including GCS) are still very slow even in the limit=1 case.

We could (and potentially should) make the same optimization to other backing stores. But I think the fundamental issue here is that we have rare, slow history-type requests and frequent (ideally) fast
current-state requests going to the same endpoint. This PR creates that distinction, and consumers can elect to use the new endpoint going forward.

There's currently no endpoint in front50 to get the current
pipeline definition; consumers need to call the history endpoint
with a limit of 1 and take the single returned element.

Let's make the API simpler for consumers who just want the current
definition by giving them an endpoint to return it.

Forcing consumers to call the /history endpoint has led to performance
issues, as that endpoint is often much slower than a call to get the
current definition. Some backing stores have optimized to short-circuit
the limit=1 case (s3 in #316), but others (including GCS) are still very
slow even in the limit=1 case.

We could (and potentially should) make the same optimization to other
backing stores. But I think the fundamental issue here is that we
have rare, slow history-type requests and frequent (ideally) fast
current-state requests going to the same endpoint. This PR creates
that distinction, and consumers can elect to use the new endpoint
going forward.
@ezimanyi
Copy link
Contributor Author

ezimanyi commented Dec 5, 2019

This is a first step in solving the general performance problem noted in this comment. Once this is in place, calls to front50 that don't need history can use this new endpoint.

Copy link
Contributor

@maggieneterval maggieneterval left a comment

Choose a reason for hiding this comment

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

➕ 🔚 👉 ⏲️ 📜 🎉

Copy link
Member

@plumpy plumpy left a comment

Choose a reason for hiding this comment

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

coooooooooooooooooooooooooooooooooooool

@ezimanyi ezimanyi added the ready to merge Approved and ready for merge label Dec 5, 2019
@mergify mergify bot added the auto merged label Dec 5, 2019
@mergify mergify bot merged commit 444366b into spinnaker:master Dec 5, 2019
@ezimanyi ezimanyi deleted the add-get-pipeline-endpoint branch December 5, 2019 21:46
@dreynaud
Copy link
Contributor

Thanks @ezimanyi, I ❤️ this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants