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

Refactored scheduler out of the service singleton provider #237

Merged
merged 17 commits into from
Apr 27, 2020

Conversation

Skarlso
Copy link
Member

@Skarlso Skarlso commented Feb 23, 2020

No description provided.

@Skarlso Skarlso self-assigned this Feb 23, 2020
@Skarlso
Copy link
Member Author

Skarlso commented Feb 23, 2020

@michelvocks Bask in this beauty! :)) Arguably, the naming could be better, also, I'm thinking of creating some more folders in order to separate the provider and the services better.

However, this works ( I can now see that some of the tests failed, although locally everything ran... grrr. EDIT: Oh right.. The worker tests...:D ). It makes the tests a heck of a lot more stable because you don't have to worry about the fact that something overwrites your mock.

Eventually, if you like this way, I would like to refactor the rest of the singletons as well into services and providers.

@codecov-io
Copy link

codecov-io commented Feb 23, 2020

Codecov Report

Merging #237 into master will increase coverage by 2.18%.
The diff coverage is 82.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #237      +/-   ##
==========================================
+ Coverage   60.64%   62.82%   +2.18%     
==========================================
  Files          49       48       -1     
  Lines        4304     3844     -460     
==========================================
- Hits         2610     2415     -195     
+ Misses       1241     1028     -213     
+ Partials      453      401      -52     
Impacted Files Coverage Δ
services/service_provider.go 72.54% <ø> (-2.06%) ⬇️
workers/scheduler/gaiascheduler/create_cmd.go 60.81% <0.00%> (ø)
workers/scheduler/gaiascheduler/workload.go 100.00% <ø> (ø)
workers/pipeline/ticker.go 47.13% <10.00%> (-1.26%) ⬇️
handlers/handler.go 90.41% <100.00%> (+1.01%) ⬆️
handlers/service.go 100.00% <100.00%> (ø)
workers/agent/agent.go 50.72% <100.00%> (+0.11%) ⬆️
workers/pipeline/create_pipeline.go 42.55% <100.00%> (-0.61%) ⬇️
workers/pipeline/service.go 100.00% <100.00%> (ø)
workers/scheduler/gaiascheduler/scheduler.go 59.77% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8913a7e...02d66b2. Read the comment docs.

@Skarlso
Copy link
Member Author

Skarlso commented Apr 26, 2020

After master merge this isn't scheduling properly... hm 🤔

@Skarlso
Copy link
Member Author

Skarlso commented Apr 26, 2020

This is now working, however I need to do some exhaustive testing around triggering, agent, docker runners and remote workers as well.

@Skarlso
Copy link
Member Author

Skarlso commented Apr 27, 2020

Tested remote worker: ✅
Docker agent: ✅
Multiple workers with different assigned pipelines: ✅
Crontab: ✅

@Skarlso Skarlso merged commit ec28241 into master Apr 27, 2020
@Skarlso Skarlso deleted the singleton_refactor branch July 6, 2020 19:47
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