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

Initial end-to-end pipeline for deployer #193

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

dhruvsgarg
Copy link
Contributor

This PR implements the eventroute and triggerroute code for notifier to receive and send deployment events. The controller triggers an add resource event while allocating computes and this event is received at the deployer.

@dhruvsgarg dhruvsgarg requested a review from myungjin July 20, 2022 01:18
@codecov-commenter
Copy link

codecov-commenter commented Jul 20, 2022

Codecov Report

Merging #193 (814fe16) into main (0188fb9) will decrease coverage by 0.53%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #193      +/-   ##
==========================================
- Coverage   21.79%   21.26%   -0.54%     
==========================================
  Files          35       35              
  Lines        1592     1632      +40     
==========================================
  Hits          347      347              
- Misses       1235     1275      +40     
  Partials       10       10              
Impacted Files Coverage Δ
cmd/controller/app/job/default_handler.go 0.00% <0.00%> (ø)
cmd/controller/app/job/job_state.go 0.00% <0.00%> (ø)
cmd/controller/app/job/notify.go 0.00% <0.00%> (ø)

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 0188fb9...814fe16. Read the comment docs.

Copy link
Contributor

@myungjin myungjin left a comment

Choose a reason for hiding this comment

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

thanks. left two comments.

func (s *notificationServer) getDeployEventChannel(computeId string) chan *pbNotify.DeployEvent {
var eventCh chan *pbNotify.DeployEvent

s.mutex.Lock()
Copy link
Contributor

Choose a reason for hiding this comment

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

you are using this mutex for both deploy event as well as job event. Is this fine? do we need separate mutexes for each of the event? can you explain your logic?

ComputeIds: computeIds,
}

for _, taskInfo := range h.tasksInfo {
Copy link
Contributor

Choose a reason for hiding this comment

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

defaulthandler object has jobId field; no need to go through tasksInfo.

Copy link
Contributor

@myungjin myungjin left a comment

Choose a reason for hiding this comment

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

left comments.

s.mutex.Lock()
delete(s.eventQueues, taskId)
s.mutex.Unlock()
s.mutex_job.Lock()
Copy link
Contributor

Choose a reason for hiding this comment

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

Use camelCase style.

Suggested change
s.mutex_job.Lock()
s.mutexJob.Lock()

jobEventQueues map[string]chan *pbNotify.JobEvent
deployEventQueues map[string]chan *pbNotify.DeployEvent
mutex_job sync.Mutex
mutex_deploy sync.Mutex
Copy link
Contributor

Choose a reason for hiding this comment

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

This PR implements the eventroute and triggerroute code for notifier to receive and send deployment events. The controller triggers an add resource event while allocating computes and this event is received at the deployer.
Copy link
Contributor

@myungjin myungjin left a comment

Choose a reason for hiding this comment

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

lgtm

@myungjin myungjin merged commit 0d0ac61 into cisco-open:main Jul 20, 2022
@dhruvsgarg dhruvsgarg deleted the deployer_pipeline_simple branch July 27, 2022 13:46
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