语境 :
迁移 sonarQube 后:3.73 -> 4.5.5
漏洞 :
当我使用声纳顶部的链接咨询一些规则时,描述不会出现,而是出现一个 javascript:
Uncaught TypeError: Cannot read property 'parentKey' of undefined
of undefinedCodingRulesDetailQualityProfileView.getParent @ app.js:11149
CodingRulesDetailQualityProfileView.serializeData @ app.js:11187
Marionette.ItemView.Marionette.View.extend.render @ app.js:3073
Marionette.CollectionView.Marionette.View.extend.renderItemView @ app.js:3342
Marionette.CollectionView.Marionette.View.extend.addItemView @ app.js:3293
(anonymous function) @ app.js:3225_.each._.forEach @ sonar.js:27333
_.each.Collection.(anonymous function) @ app.js:956
Marionette.CollectionView.Marionette.View.extend.showCollection @ app.js:3223
Marionette.CollectionView.Marionette.View.extend._renderChildren @ app.js:3211
Marionette.CollectionView.Marionette.View.extend.render @ app.js:3196
_.extend.show @ app.js:2483CodingRulesDetailView.onRender @ app.js:11589
Marionette.triggerMethod.triggerMethod @ app.js:2134
Marionette.ItemView.Marionette.View.extend.render @ app.js:3082
Marionette.Layout.Marionette.ItemView.extend.render @ app.js:3647
_.extend.show @ app.js:2483(anonymous function) @ app.js:13862
jQuery.Callbacks.fire @ sonar.js:3200jQuery.Callbacks.self.fireWith @ sonar.js:3312
调查
当我们看到 javascript 时:
myProfile = _.findWhere(this.options.app.qualityProfiles, {
key: this.model.get('qProfile')
});
parentKey = myProfile.parentKey; // this line bug because myProfile is undefined
this.options.app.qualityProfiles -> 包含声纳的所有质量配置文件
键:this.model.get('qProfile') -> 获取到规则的质量配置文件链接的键
经过一些调查,我发现在数据库中找不到此规则的精确质量配置文件链接。所以我认为这是一个旧的和已删除的质量配置文件。
这可以解释为什么不存在于所有质量配置文件中的特定质量配置文件
问题
你见过这种虫子吗?
声纳如何复活这些旧的和删除的 qualityProfiles ?
我能做些什么 ?