From 93a6e0fa5abf03f040fadcdc566d44e4b553261e Mon Sep 17 00:00:00 2001 From: aram price Date: Wed, 20 Nov 2024 15:46:26 -0800 Subject: [PATCH] Un-pin `json` gem and update to latest NOTE: there is a change in the underlying behavior of `JSON.pretty_generate` such that an empty array will now generate `[]` where before there were two newlines (`\n`) between the brackets like ``` [ ] ``` The result of this is that the `RenderedJobInstance#configuration_hash` for jobs which have empty links _will change_ even though there are no changes to these jobs. --- src/Gemfile | 1 - src/Gemfile.lock | 3 +-- src/bosh-director/spec/unit/job_renderer_spec.rb | 2 +- src/vendor/cache/json-2.7.6.gem | 3 --- src/vendor/cache/json-2.8.0.gem | 3 +++ 5 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 src/vendor/cache/json-2.7.6.gem create mode 100644 src/vendor/cache/json-2.8.0.gem diff --git a/src/Gemfile b/src/Gemfile index 4f5cb0cdea..cd8a9408d1 100644 --- a/src/Gemfile +++ b/src/Gemfile @@ -9,7 +9,6 @@ gem 'bosh_common', path: 'bosh_common' gem 'mysql2' gem 'pg' gem 'sequel', '~> 5.29.0' -gem 'json', '~> 2.7.0' # TODO to unpin fix bosh-director: rspec ./spec/unit/job_renderer_spec.rb:84 group :development, :test do gem 'bundle-audit' diff --git a/src/Gemfile.lock b/src/Gemfile.lock index 15f6687618..37936984c1 100644 --- a/src/Gemfile.lock +++ b/src/Gemfile.lock @@ -177,7 +177,7 @@ GEM io-endpoint (0.14.0) io-event (1.7.3) io-stream (0.6.1) - json (2.7.6) + json (2.8.0) language_server-protocol (3.17.0.3) little-plugger (1.1.4) logger (1.6.1) @@ -355,7 +355,6 @@ DEPENDENCIES bundle-audit factory_bot fakefs - json (~> 2.7.0) minitar mysql2 parallel_tests diff --git a/src/bosh-director/spec/unit/job_renderer_spec.rb b/src/bosh-director/spec/unit/job_renderer_spec.rb index 1fd784f0c1..4a1047ed25 100644 --- a/src/bosh-director/spec/unit/job_renderer_spec.rb +++ b/src/bosh-director/spec/unit/job_renderer_spec.rb @@ -79,7 +79,7 @@ module Bosh::Director JobRenderer.render_job_instances_with_cache(per_spec_logger, [instance_plan], cache, encoder, link_provider_intents) expect(instance_plan.rendered_templates.template_hashes.keys).to eq ['dummy'] - expect(instance.configuration_hash).to eq('53b2a7cac279af8bb73885b08a794ab5dd21bb8c') + expect(instance.configuration_hash).to eq('d4712f01af58824081e9d964522782da9889cd1b') expect(instance.template_hashes.keys).to eq(['dummy']) end diff --git a/src/vendor/cache/json-2.7.6.gem b/src/vendor/cache/json-2.7.6.gem deleted file mode 100644 index c92f52ff1b..0000000000 --- a/src/vendor/cache/json-2.7.6.gem +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d9aba03af3167401e8cf8de50daed5b5aec5b5a622f15c4b7ce2fd8d49a070f -size 68096 diff --git a/src/vendor/cache/json-2.8.0.gem b/src/vendor/cache/json-2.8.0.gem new file mode 100644 index 0000000000..4e54d2b630 --- /dev/null +++ b/src/vendor/cache/json-2.8.0.gem @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6503a463d6fffbbaf0138e54c39803bf8298669d316e99af8bbae024c5e0ae3f +size 71680