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

fix: do not send setStatut + add memory cache on commit status list #5059

Merged
merged 4 commits into from
Mar 18, 2020

Conversation

sguiheux
Copy link
Collaborator

  1. Description
  2. Related issues
  3. About tests
  4. Mentions

@ovh/cds

if !sdk.StatusIsTerminated(nodeRun.Status) {
continue
var err error
commitsMap, err = SendVCSEvent(ctx, db, store, proj, *wr, nodeRun, commitsMap)
Copy link
Member

Choose a reason for hiding this comment

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

I understand the commitsMap thing, but i think it could be nice to instanciate an object (VCSEventMessenger ?) that holds and hides this commitsMap + the vcsClient and then put the SendVCSEvent function as a method of this object

if err := sendVCSEventStatus(ctx, db, store, proj, wr, &nodeRun, notif); err != nil {
log.Error(ctx, "resyncCommitStatus> Error sending status %s %s err:%v", statusFound.State, details, err)
if err := sendVCSEventStatus(ctx, db, store, proj.Key, wr, &nodeRun, notif, vcsServer.Name, client); err != nil {
return commitsStatusMap, sdk.WrapError(err, "resyncCommitStatus> Error sending status %s %s err:%v", statusFound.State, details, err)
Copy link
Member

Choose a reason for hiding this comment

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

no need to display the error in the wrap

@ovh-cds
Copy link
Collaborator

ovh-cds commented Mar 18, 2020

CDS Report build-all-cds#12761.0 ✘

  • Build
    • Build and Package All ✔
    • Build Debpacker ✔
    • Build OS-Ansible-Inventory ✔
    • Build SMTPMock ✔
    • Lint UI Translate ✔
    • Test CLI ✔
    • Test Engine ✘
    • Test SDK ✔
    • Test SDK Rust ✔
    • Test UI ✔

@sguiheux sguiheux requested review from fsamin and richardlt March 18, 2020 10:01
@sguiheux sguiheux merged commit 06bdf35 into master Mar 18, 2020
@sguiheux sguiheux deleted the cleanNodeRunNotifVCS branch April 10, 2020 12:58
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.

5 participants