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

providers/redfish/tasks: returns TaskNotFound on 404 #352

Merged
merged 3 commits into from
Sep 23, 2023

Conversation

ofaurax
Copy link
Collaborator

@ofaurax ofaurax commented Sep 20, 2023

What does this PR implement/change/remove?

Checklist

  • Tests added
  • Similar commits squashed

The HW vendor this change applies to (if applicable)

The HW model number, product name this change applies to (if applicable)

The BMC firmware and/or BIOS versions that this change applies to (if applicable)

What version of tooling - vendor specific or opensource does this change depend on (if applicable)

Description for changelog/release notes

@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Patch coverage: 71.42% and project coverage change: +0.12% 🎉

Comparison is base (1f97b35) 44.53% compared to head (e478fd0) 44.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #352      +/-   ##
==========================================
+ Coverage   44.53%   44.65%   +0.12%     
==========================================
  Files          51       51              
  Lines        4116     4116              
==========================================
+ Hits         1833     1838       +5     
+ Misses       2073     2069       -4     
+ Partials      210      209       -1     
Files Changed Coverage Δ
providers/redfish/tasks.go 38.82% <71.42%> (+5.88%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ofaurax ofaurax force-pushed the fs-931-return-not-found-on-404 branch from b0d7f45 to ce8aca3 Compare September 20, 2023 13:03
@ofaurax ofaurax changed the title providers/redfish/tasks: returns TaksNotFound on 404 providers/redfish/tasks: returns TaskNotFound on 404 Sep 20, 2023
@ofaurax ofaurax force-pushed the fs-931-return-not-found-on-404 branch from ce8aca3 to ffe4861 Compare September 20, 2023 13:04
@ofaurax ofaurax enabled auto-merge September 20, 2023 17:18
@ofaurax ofaurax force-pushed the fs-931-return-not-found-on-404 branch from 8416822 to 4f017f8 Compare September 20, 2023 17:18
@ofaurax ofaurax requested a review from joelrebel September 20, 2023 17:18
providers/redfish/tasks.go Outdated Show resolved Hide resolved
@joelrebel
Copy link
Member

joelrebel commented Sep 22, 2023

@ofaurax can you also include a few more fixes - I missed this in the previous PR,
create another PR if necessary,

  • return error instead of fmt.Println,

fmt.Println(err)

fmt.Println(err)

err = json.Unmarshal(data, &status)
if err != nil {
	return nil, err
}
	
task = &gofishrf.Task{
	TaskState:  gofishrf.TaskState(status.TaskState),
	TaskStatus: gofishcommon.Health(status.TaskStatus),
}

return task, err

@ofaurax ofaurax force-pushed the fs-931-return-not-found-on-404 branch from 7e85d8f to 13a2260 Compare September 22, 2023 08:18
@ofaurax ofaurax force-pushed the fs-931-return-not-found-on-404 branch from 13a2260 to e478fd0 Compare September 22, 2023 08:19
@ofaurax ofaurax requested a review from joelrebel September 22, 2023 08:23
@ofaurax ofaurax merged commit 426d0de into main Sep 23, 2023
7 checks passed
@ofaurax ofaurax deleted the fs-931-return-not-found-on-404 branch September 23, 2023 13:53
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.

2 participants