• Stan Hu's avatar
    Fix project imports not working with serialized data · 8aebc174
    Stan Hu authored
    The change in e404c311 broke models that
    relied on single-type inheritance:
    
    ```
    CommitStatus.new(type: 'Ci::Build').class
    => Ci::Build
    
    CommitStatus.new.tap{|c| c.assign_attributes(type: 'Ci::Build')}.class
    => CommitStatus
    ```
    
    As a result, any serialized options would not be properly saved to the
    database, leading to errors expecting a `Hash` vs. a `String`, for
    example.
    
    This affected all pipelines that used shared runners because the build
    would error out due to this serialization error.
    
    Closes https://gitlab.com/gitlab-org/gitlab/issues/34860
    8aebc174
sh-fix-project-import-commit-status.yml 105 Bytes