-
Notifications
You must be signed in to change notification settings - Fork 899
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
[WIP] Virtual attributes for Containers and friends (performance changes) #22575
base: master
Are you sure you want to change the base?
Conversation
@kbrock it definitely defaults to the EMS I don't know if that is the only possible option but it does appear like it based on the kubernetes parser |
df5e3a2
to
bbe966b
Compare
bbe966b
to
ad7f6db
Compare
update:
|
be59dd4
to
0d00279
Compare
update:
The savings are very good, but I am not ready to put my foot down on that one. UN-WIP: concerning commit around container volume and ems relationships update:
|
WIP: confusing CI values I'm very confused by the failure. This works locally and I can't imagine where this could be going wrong. All test failures are the same. (I wrote the specs at the same time) The spec(s) only shows partial SQL, but it looks like
Again, the sql generated locally is working fine. Also interesting: subj = described_class.where(:id => container_group.id)
expect(subj.first.ready_condition_status).to eq("None") # works
expect(subj.select(:ready_condition_status).first.ready_condition_status).to eq("None") # failure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file was accidentally committed to this PR.
similar to 773fea3 already introduced indexes, so this is just ruby changes | ms |query | qry ms | rows |` comments` | ---:| ---:| ---:| ---:| --- | 347.2 | 32 | 53.2 | 128 |` /container_node/report_data#node-index` | 308.8 | 11 | 10.3 | 28 |` /container_node/report_data#node-after` | 11.1% | 66% | 80.6% | 78% | diff | ms |query | qry ms | rows |` comments` | ---:| ---:| ---:| ---:| --- | 428.0 | 32 | 123.2 | 88 |` /container_group/report_data#group-index` | 336.5 | 11 | 65.5 | 28 |` /container_group/report_data#group-after` | 21.4% | 66% | 46.8% | 68% | diff
add ContainerImage#display_registry delegate to the full_name | ms |query | qry ms | rows |` comments` | ---:| ---:| ---:| ---:| --- | 424.3 | 51 | 98.7 | 48 |` /container_image/report_data` | 345.1 | 11 | 34.4 | 28 |` /container_image/report_data` | 18.7%| 78%| 65.1%| 42%| diff Localization of "Unknown image source" has been removed and moved into the UI layer
0d00279
to
4cb708a
Compare
update:
|
Checked commits kbrock/manageiq@53e9556~...4cb708a with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint |
@@ -46,7 +46,7 @@ class ContainerImage < ApplicationRecord | |||
serialize :exposed_ports, Hash | |||
serialize :environment_variables, Hash | |||
|
|||
virtual_column :display_registry, :type => :string | |||
virtual_delegate :display_registry, :to => "container_image_registry.full_name", :allow_nil => true, :type => :string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when this returns nil? Is there a presentation-side change where it will say "Unknown image source", or does it leave it blank?
reg = ContainerImageRegistry.new(:name => "docker.io", :host => "docker.io") | ||
expect(reg.full_name).to eq("docker.io") | ||
describe "#full_name" do | ||
it "works with no port" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a spec where the port is ""
since there's a case for that?
Overall LGTM - one real question, and some specs are failing, but maybe they go away with a rebase since Ruby 2.7 is gone now. |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
This pull request is not mergeable. Please rebase and repush. |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
1 similar comment
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
depends upon:
[WIP] Supports ruby code for default value activerecord-virtual_attributes#127@agrare Can we outright claim that
PersistentVolume#parent
is always anEms
?I get that a
ContainerVolume#parent
is polymorphic, but curious about the child class (i.e.:PersistentVolume
). If not, may need to drop that change.Numbers
comments
/container_node/report_data#node-index
/container_node/report_data#node-after
comments
/container_group/report_data#group-index
/container_group/report_data#group-after
comments
/container_image/report_data
/container_image/report_data
no longer:
comments
/persistent_volume/report_data#before
/persistent_volume/report_data#after