This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 327
feature: Queue status reports on continuous interval for applications #1801
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mitchellh
suggested changes
Jul 7, 2021
briancain
force-pushed
the
feat/app-poll-handler
branch
from
July 8, 2021 20:32
c1db61c
to
87328df
Compare
briancain
force-pushed
the
feat/app-poll-handler
branch
from
July 13, 2021 23:45
87328df
to
6e213e6
Compare
briancain
force-pushed
the
feat/app-poll-handler
branch
from
July 15, 2021 21:48
6e213e6
to
0257a2a
Compare
briancain
force-pushed
the
feat/app-poll-handler
branch
from
July 15, 2021 23:50
0257a2a
to
6392bdd
Compare
briancain
force-pushed
the
feat/app-poll-handler
branch
2 times, most recently
from
July 19, 2021 20:37
a9ef3f2
to
e5a3ee4
Compare
These settings are about polling on application statuses, so be more specific as to what the settings are for
briancain
force-pushed
the
feat/app-poll-handler
branch
from
July 26, 2021 21:29
1551e28
to
f47c186
Compare
Auto-enable polling if a project has a data source that is backed by git and has polling enabled. This changes the previous behavior of app status polling being enabled after the _first_ status report was generated
If we're polling and a deployment gets deleted for an app, rather than returning an error and failing the entire poll queue handler, just log a warning so other apps can be queued against
mitchellh
approved these changes
Jul 28, 2021
izaaklauer
approved these changes
Jul 28, 2021
@@ -119,7 +119,7 @@ func (s *service) queueJobReqToJob( | |||
project, err := s.state.ProjectGet(&pb.Ref_Project{Project: job.Application.Project}) | |||
if status.Code(err) == codes.NotFound { | |||
return nil, status.Errorf(codes.NotFound, | |||
"Project %s was not found! Please ensure that 'waypoint init' was run with this project.", | |||
"Project %q was not found! Please ensure that 'waypoint init' was run with this project.", |
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.
TIL about %q! very nice.
Co-authored-by: Izaak Lauer <8404559+izaaklauer@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a queued poll handler for applications which queues a status report job every 5 minutes by default after the initial deployment or release of an application. It includes a peek and complete function for applications that behaves similar to ProjectPeek and ProjectComplete. It includes its own index table to keep track of the applications poll times and intervals. Initially, each projects applications poll handler is turned off until a user does a deployment or release. This saves us cycles in the server where there are no applications to generate a status for. The status report operation is in charge of updating the apps poll status once a status report has been initially generated.
This feature also allows users to turn off the application poll queuer or adjust the interval, given that it's likely with enough applications users could run into rate limits on their accounts for platforms such as AWS.
Fixes #1612
Note: Currently this will only poll if the project is backed by a remote data source with git.