Skip to content

Use strings as properties key in kubernetes service spec.

Jasper Maes requested to merge jlemaes/gitlab-ce:rails5-fix-46230 into master

What does this MR do?

The specs for rails 4 already worked with wrong properties value e.g. from line 108:

kubernetes_service.properties => {"api_url"=>"https://kubernetes.example.com", "token"=>"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "namespace"=>nil, :namespace=>"foo"}

A save does not deletes the keys from the object in Rails 4(both "namespace" and :namespace are in the properties hash). Rails 5 deletes the properties that it can't save, so the spec fails(only "namespace" is kept). I changed the spec to using a string instead of a symbol, just like it is everywhere that a service properties hash is used.

Are there points in the code the reviewer needs to double check?

I changed all wrong usages of properties with a symbol, not only the ones that fail in the Rails5 specs.

Why was this MR needed?

rails5 upgrade

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Fix for #46230 (closed).

Merge request reports

Loading