You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a new project (when there is just one analysis), report generation fails when the arg --quality-gate-status is specified.
When a second analysis has been done, the same report succeeds.
Observed with sonar-report version 3.1.3 and sonarqube docker installation based on sonarqube image sonarqube:10.4.1-community.
The following error occurs:
Error while getting quality gate status : - Cannot read properties of undefined (reading 'date') - - -
file:///mydir/node_modules/.pnpm/[email protected]/node_modules/sonar-report/index.js:405
json.projectStatus.period.date
^
TypeError: Cannot read properties of undefined (reading 'date')
at generateReport (file:mydir/node_modules/.pnpm/[email protected]/node_modules/sonar-report/index.js:405:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
The reason is that the API result does not contain the period entry, in case there is just one analysis.
I know this is a corner case, but I think it is possible to provide meaningful quality gate information (at least in case of overall quality gate definitions), even when no period information is available. WDYT?
The text was updated successfully, but these errors were encountered:
…e analysis exists
- Resolved issue soprasteria#266 where report generation fails due to missing period data in the API result.
- Added fallback mechanism to handle cases where only one analysis exists.
- Ensured that the report still generates with meaningful quality gate information.
…e analysis exists (#272)
- Resolved issue #266 where report generation fails due to missing period data in the API result.
- Added fallback mechanism to handle cases where only one analysis exists.
- Ensured that the report still generates with meaningful quality gate information.
Co-authored-by: chuck-dubya <[email protected]>
For a new project (when there is just one analysis), report generation fails when the arg
--quality-gate-status
is specified.When a second analysis has been done, the same report succeeds.
Observed with sonar-report version 3.1.3 and sonarqube docker installation based on sonarqube image sonarqube:10.4.1-community.
The following error occurs:
The reason is that the API result does not contain the period entry, in case there is just one analysis.
I know this is a corner case, but I think it is possible to provide meaningful quality gate information (at least in case of overall quality gate definitions), even when no period information is available. WDYT?
The text was updated successfully, but these errors were encountered: