Skip to content

Do not fail import of merge request when unsupported diff note occurs

What does this MR do?

related to: #285488 (closed)

Some validations doesn't make sense during a project import, since the objects are built in a custom way.

This will fix the https://sentry.gitlab.net/gitlab/gitlabcom/issues/1911386/?query=is%3Aunresolved%20note

ActiveRecord::RecordInvalid: Validation failed: Notes is invalid
from gitlab/import_export/import_failure_service.rb:25:in `with_retry'
  from gitlab/import_export/relation_tree_restorer.rb:80:in `process_relation_item!'
  from gitlab/import_export/relation_tree_restorer.rb:69:in `block in process_relation!'
  from gitlab/import_export/json/ndjson_reader.rb:42:in `<<'
  from gitlab/import_export/json/ndjson_reader.rb:42:in `block (2 levels) in consume_relation'
  from gitlab/import_export/json/ndjson_reader.rb:41:in `foreach'
  from gitlab/import_export/json/ndjson_reader.rb:41:in `with_index'
  from gitlab/import_export/json/ndjson_reader.rb:41:in `block in consume_relation'
  #...

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Kassio Borges

Merge request reports

Loading