Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

feature: Queue status reports on continuous interval for applications #1801

Merged
merged 65 commits into from
Jul 28, 2021
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
6a62b78
state/application: Add Peek and Complete wrapper funcs for polling
briancain Jun 15, 2021
f7bdbd9
Add poll application func
briancain Jun 15, 2021
87727d5
Add application poll index to project state
briancain Jun 15, 2021
f03d6fd
Fix linter
briancain Jun 17, 2021
46621c1
Add application level Peek and Complete funcs for polling
briancain Jun 17, 2021
d8831d2
Add poll to application proto
briancain Jun 17, 2021
8fe60e1
Add note about simplifying projectIndexRecord on Poll
briancain Jun 17, 2021
f201e50
proto gen
briancain Jun 17, 2021
a413cba
Add initial unit tests for Application PollPeek and PollComplete
briancain Jun 17, 2021
4e267cb
Write out appl poll record
briancain Jun 17, 2021
d8488e3
Add tests for application peek and complete funcs
briancain Jun 18, 2021
73cdcce
Turn on application poll handler
briancain Jun 21, 2021
18396d3
Add more logging in peek func
briancain Jun 21, 2021
a3c8c5f
Add debug message for outcome 2
briancain Jun 22, 2021
96e603a
Add more comments for appl polling when inserting project record
briancain Jun 23, 2021
41fa2de
Enable status report polling after a status report is first generated
briancain Jun 23, 2021
f8f7ebe
proto gen
briancain Jun 23, 2021
1da60d4
Add logger to status report operation
briancain Jun 23, 2021
d5e08f2
Move DataSource set from queue job into project poll handler
briancain Jun 24, 2021
e12fcb2
Update status report poll singleton id name
briancain Jun 24, 2021
11eb912
Add more debug logging
briancain Jun 25, 2021
7a2d1ad
Get last poll from app not project
briancain Jun 25, 2021
7184ea0
Log next poll time
briancain Jun 25, 2021
f2f60ed
Update comments
briancain Jun 25, 2021
8768555
Add test for project polling
briancain Jun 25, 2021
d0b7961
Add application poll handling test
briancain Jun 25, 2021
73f0636
Add more comments
briancain Jun 26, 2021
d47d7f6
Add more logging for debug
briancain Jul 7, 2021
1b535e3
Add changelog
briancain Jul 7, 2021
0bdf28c
Remove stale comment
briancain Jul 7, 2021
4d902d1
Remove unused and commented out pkg import
briancain Jul 7, 2021
ae50cf8
Rename 'Appl' to 'App'
briancain Jul 7, 2021
9731e93
Update var comments to reflect appl to app name change
briancain Jul 7, 2021
b17b4ed
Put back datasource error for jobs
briancain Jul 13, 2021
43289cc
Log exactly what kind of job is about to be executed
briancain Jul 13, 2021
11b5f02
Include a data source for a status report job
briancain Jul 13, 2021
91ec6ed
Do not enable app polling if its project does not have a data source
briancain Jul 13, 2021
8f22c4e
Add more logging, add note about latestRelease bug
briancain Jul 15, 2021
7e693e8
Only target a release for a status report if implemented
briancain Jul 15, 2021
99562f6
Fix typo in app release
briancain Jul 19, 2021
65a33f1
Clarify release note
briancain Jul 19, 2021
81a1abb
Update TODO comment
briancain Jul 19, 2021
f31cb09
Separate project and app poll default intervals
briancain Jul 20, 2021
d25aa4e
Move app poll settings into project
briancain Jul 21, 2021
fcb0c94
proto gen
briancain Jul 21, 2021
5fef5c1
Fix app poll test and turn on app poll in project settings
briancain Jul 21, 2021
09e7d59
Introduce GeneratePollJobs
briancain Jul 21, 2021
1deecf4
Update App Poll Peek functions to operate at the project level
briancain Jul 21, 2021
f7897e3
Fix mocks for poll handler generic tests
briancain Jul 21, 2021
4a55b21
Add more func docs
briancain Jul 21, 2021
6d666b0
Update stale comments about poll enablement for apps
briancain Jul 21, 2021
5d04def
Add more doc comments for app poll handler
briancain Jul 21, 2021
75dd620
cli/project_apply: Enable or disable app polling per project
briancain Jul 21, 2021
495b0ee
Add test for turning off app polling through project upsert
briancain Jul 22, 2021
e30ebfd
Set top-level app poll switch to off by default
briancain Jul 26, 2021
6d9bca5
Clarify failed downstream job warning
briancain Jul 26, 2021
eedfc12
Fix typos
briancain Jul 26, 2021
7988992
Rename AppPoll vars to AppStatusPoll
briancain Jul 26, 2021
d92bf03
proto gen
briancain Jul 26, 2021
40f9ba8
Update project_apply website docs
briancain Jul 26, 2021
f47c186
Update poll queuer to use new queueJobMulti func
briancain Jul 26, 2021
9e95932
Enable app status polling based on project poll
briancain Jul 26, 2021
0634f40
Don't return error building poll job if no deploy or release
briancain Jul 26, 2021
0f084bd
Fix doc comments in app poller
briancain Jul 27, 2021
3ef4b05
Update internal/server/singleprocess/poll_application.go
briancain Jul 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix mocks for poll handler generic tests
  • Loading branch information
briancain committed Jul 26, 2021
commit f7897e38355c92303456a473e25887edeb9b47eb
15 changes: 14 additions & 1 deletion internal/server/singleprocess/poll_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ func TestPollQueuer_queue(t *testing.T) {
Run(func(args mock.Arguments) {
atomic.AddUint32(&peekCounter, 1)
})
mockH.On("GeneratePollJobs", mock.Anything, 42).
Return(nil, errors.New("oh no")).
Run(func(args mock.Arguments) {
atomic.AddUint32(&pollCounter, 1)
})
mockH.On("PollJob", mock.Anything, 42).
Return(nil, errors.New("oh no")).
Run(func(args mock.Arguments) {
Expand Down Expand Up @@ -290,10 +295,18 @@ func TestPollQueuer_queue(t *testing.T) {
Run(func(args mock.Arguments) {
atomic.AddUint32(&peekCounter, 1)
})
mockH.On("GeneratePollJobs", mock.Anything, 42).
Return(nil, errors.New("oh no")).
Run(func(args mock.Arguments) {
atomic.AddUint32(&pollCounter, 1)
})
mockH.On("PollJob", mock.Anything, 42).
Return(&pb.QueueJobRequest{}, nil).
Run(func(args mock.Arguments) {
atomic.AddUint32(&pollCounter, 1)
})
mockH.On("Complete", mock.Anything, 42).
Return(nil, nil).
Run(func(args mock.Arguments) {
})

// Start
Expand Down