Database column missing - reported as failure on scan

  • SQ Community 7.9.1
  • SQ Scanner 4.2.0.1873

/setup indicated "Database is up to date?

Note the Postgresql database was recently updated using /setup on an upgrade from 7.6 to 7.9.1

Error observed

### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: column fs.data_type does not exist
  Position: 209
### The error may exist in org.sonar.db.component.ComponentMapper
### The error may involve org.sonar.db.component.ComponentMapper.scrollAllFilesForFileMove-Inline
### The error occurred while setting parameters
### SQL: select       p.id,       p.uuid as uuid,       p.kee as kee,       p.path as path,       fs.line_count as lineCount     from projects p     inner join file_sources fs on       fs.file_uuid = p.uuid       and fs.data_type = 'SOURCE'     where       p.project_uuid = ?       and p.enabled = true       and p.scope = 'FIL'       and p.qualifier in ('FIL', 'UTS')       and p.path is not null
### Cause: org.postgresql.util.PSQLException: ERROR: column fs.data_type does not exist
  Position: 209, startedAt:2019-11-25T12:13:49+0000, type:REPORT, submitterLogin:scanner, hasScannerContext:true, organization:default-organization, componentQualifier:TRK, id:AW6ie3CsHF7_D4f9dnno, componentName:fabdm, warningCount:0, submittedAt:2019-11-25T12:13:49+0000, componentKey:fabrication-fabdm, logs:false, status:FAILED]]```

Hello!

That data column, fs.data_type, was dropped in SonarQube v7.7, so it’s pretty weird that there would be a request trying to use it.

  • Is this happening for many background tasks / many projects, or just one?
  • Can you share the System Information file (you can find it at the global Administration > System page) for your instance (feel free to redact sensitive information)

Best regards,

Colin

sonarqube-support-info-972D0E06-AWpM5QmDohvYy4VSoscO-2019-11-25-9-24.json.txt (18.6 KB)

Big red flag starting here:

{
  "Health" : "RED",
  "Health Causes" : [
    "Compute Engine is not operational"
  ],

Anything interesting in your SonarQube instance’s ce.log file (in the logs directory)?

Oops :slight_smile: Caused by: org.sonar.updatecenter.common.exception.IncompatiblePluginVersionException: The plugin 'typescript' is in version 1.9.0.3766 whereas the plugin 'javascript' requires a least a version 2.1.0. at org.sonar.updatecenter.common.PluginReferential.addOutgoingDependency(PluginReferential.java:135) at org.sonar.updatecenter.common.PluginReferentialManifestConverter.lambda$fromPluginManifests$0(PluginReferentialManifestConverter.java:60) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at org.sonar.updatecenter.common.PluginReferentialManifestConverter.fromPluginManifests(PluginReferentialManifestConverter.java:56) at org.sonar.server.plugins.PluginReferentialMetadataConverter.getInstalledPluginReferential(PluginReferentialMetadataConverter.java:45) at org.sonar.server.plugins.InstalledPluginReferentialFactory.init(InstalledPluginReferentialFactory.java:54) at org.sonar.server.plugins.InstalledPluginReferentialFactory.start(InstalledPluginReferentialFactory.java:38) ... 14 common frames omitted

Killing the typescript plugin now