Commit 0d8fdfa
refactoring: update the task response data in the
* checking the result task status to return an ERRORED state in case of a error, false status
* implementing a default value to avoid Exception
* adding compability with issue 351 from worker
* adding more tests to cover an empty result
* * removing message in test_task from details
This commit aims to adjust the tests of the get status feature aiming for compatibility with issue #351 from Worker.
This issue aims to refactor the task result to facilitate the visualization of the message and error fields,
moving from the details field to the data.
* * Refactor: add compability with new TaskResult refactored in Worker
In discussion with @kairoaraujo, we identified an opportunity to
enhance the consistency of Task Results in our codebase.
To address this, we open pull request #439 in the Worker repository.
This commit introduces these changes to ensure a consistent data
structure and aligns with the specified API documentation.
---------
Co-authored-by: Kairo Araujo <[email protected]>/api/v1/tasks (#518)1 parent e5747ff commit 0d8fdfa
File tree
3 files changed
+157
-16
lines changed- docs
- repository_service_tuf_api
- tests/unit/api
3 files changed
+157
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1528 | 1528 | | |
1529 | 1529 | | |
1530 | 1530 | | |
1531 | | - | |
1532 | | - | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
1533 | 1534 | | |
1534 | 1535 | | |
1535 | 1536 | | |
| |||
1606 | 1607 | | |
1607 | 1608 | | |
1608 | 1609 | | |
| 1610 | + | |
1609 | 1611 | | |
1610 | 1612 | | |
1611 | 1613 | | |
| |||
1624 | 1626 | | |
1625 | 1627 | | |
1626 | 1628 | | |
1627 | | - | |
| 1629 | + | |
1628 | 1630 | | |
1629 | 1631 | | |
1630 | 1632 | | |
| |||
1836 | 1838 | | |
1837 | 1839 | | |
1838 | 1840 | | |
1839 | | - | |
1840 | 1841 | | |
| 1842 | + | |
1841 | 1843 | | |
| 1844 | + | |
1842 | 1845 | | |
1843 | | - | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
1844 | 1852 | | |
1845 | 1853 | | |
1846 | 1854 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| 78 | + | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
| |||
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | | - | |
97 | 101 | | |
| 102 | + | |
98 | 103 | | |
99 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
100 | 109 | | |
101 | 110 | | |
102 | 111 | | |
| |||
120 | 129 | | |
121 | 130 | | |
122 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
123 | 136 | | |
124 | | - | |
125 | | - | |
126 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
127 | 142 | | |
128 | 143 | | |
129 | | - | |
| 144 | + | |
130 | 145 | | |
131 | 146 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| |||
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
41 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
42 | 59 | | |
43 | 60 | | |
44 | 61 | | |
| |||
65 | 82 | | |
66 | 83 | | |
67 | 84 | | |
68 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
69 | 187 | | |
70 | 188 | | |
71 | 189 | | |
| |||
0 commit comments