Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix k8s deployment marshal error with EMS workers #23208

Merged

Conversation

agrare
Copy link
Member

@agrare agrare commented Sep 25, 2024

The .ems_id_from_queue_name method returns an integer and all env var values have to be strings.

Broken by: https://github.com/ManageIQ/manageiq/pull/23195/files#diff-56487075e313126652963fef186a0e79517048b9f872a77695b35ea3ddbe4a17L8
Fixes #23207

The `.ems_id_from_queue_name` method returns an integer and all env var
values have to be strings.
@miq-bot
Copy link
Member

miq-bot commented Sep 25, 2024

Checked commit agrare@14c3c68 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 👍

@Fryguy Fryguy merged commit a22f04f into ManageIQ:master Sep 25, 2024
8 checks passed
@Fryguy Fryguy self-assigned this Sep 25, 2024
@agrare agrare deleted the fix_k8s_marshal_env_vars_deployment_per_worker branch September 25, 2024 21:35
@Fryguy
Copy link
Member

Fryguy commented Oct 8, 2024

@agrare A conflict occurred during the backport of this pull request to radjabov.

If this pull request is based on another pull request that has not been marked for backport, add the appropriate labels to the other pull request. Otherwise, please create a new pull request direct to the radjabov branch in order to resolve this.

Conflict details:

diff --cc app/models/miq_worker/deployment_per_worker.rb
index 7711a317eb,76928563ce..0000000000
--- a/app/models/miq_worker/deployment_per_worker.rb
+++ b/app/models/miq_worker/deployment_per_worker.rb
@@@ -5,7 -5,7 +5,11 @@@ class MiqWorke
      def create_container_objects
        ContainerOrchestrator.new.create_deployment(worker_deployment_name) do |definition|
          configure_worker_deployment(definition, 1)
++<<<<<<< HEAD
 +        definition[:spec][:template][:spec][:containers].first[:env] << {:name => "EMS_IDS", :value => Array.wrap(self.class.ems_id_from_queue_name(queue_name)).join(",")}
++=======
+         definition[:spec][:template][:spec][:containers].first[:env] << {:name => "EMS_ID", :value => self.class.ems_id_from_queue_name(queue_name).to_s}
++>>>>>>> a22f04f19c (Merge pull request #23208 from agrare/fix_k8s_marshal_env_vars_deployment_per_worker)
        end
      end
  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provider Workers fail to deploy on podified
3 participants