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: invalid objects don't stop the reconciliation #551

Merged
merged 5 commits into from
Oct 24, 2024

Conversation

razvan
Copy link
Member

@razvan razvan commented Oct 23, 2024

Description

Part of: stackabletech/issues#211

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

Preview Give feedback

Reviewer

Preview Give feedback

Acceptance

Preview Give feedback

rust/operator-binary/src/main.rs Outdated Show resolved Hide resolved
rust/operator-binary/src/main.rs Outdated Show resolved Hide resolved
rust/operator-binary/src/main.rs Outdated Show resolved Hide resolved
rust/operator-binary/src/main.rs Outdated Show resolved Hide resolved
razvan and others added 4 commits October 24, 2024 14:59
Co-authored-by: Natalie Klestrup Röijezon <teo@nullable.se>
Co-authored-by: Natalie Klestrup Röijezon <teo@nullable.se>
Co-authored-by: Natalie Klestrup Röijezon <teo@nullable.se>
Co-authored-by: Natalie Klestrup Röijezon <teo@nullable.se>
@razvan razvan requested a review from nightkr October 24, 2024 12:00
let Ok(druid_connection) = &druid_connection.0 else {
return false;
};
druid_connection.druid_namespace().ok() == config_map.meta().namespace

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [clippy] reported by reviewdog 🐶

error[E0599]: no method named `meta` found for reference `&stackable_operator::kube::kube_core::DeserializeGuard` in the current scope
   --> rust/operator-binary/src/main.rs:238:59
    |
238 |     druid_connection.druid_namespace().ok() == config_map.meta().namespace
    |                                                           ^^^^
    |
    = help: items from traits can only be used if the trait is in scope
help: trait `Resource` which provides `meta` is implemented but not in scope; perhaps you want to import it
    |
1   + use stackable_operator::kube::Resource;
    |
help: there is a method `meta_mut` with a similar name
    |
238 |     druid_connection.druid_namespace().ok() == config_map.meta_mut().namespace
    |                                                           ~~~~~~~~

let Ok(druid_connection) = &druid_connection.0 else {
return false;
};
druid_connection.druid_namespace().ok() == config_map.meta().namespace

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [clippy] reported by reviewdog 🐶

error[E0599]: no method named `meta` found for reference `&stackable_operator::kube::kube_core::DeserializeGuard` in the current scope
   --> rust/operator-binary/src/main.rs:238:59
    |
238 |     druid_connection.druid_namespace().ok() == config_map.meta().namespace
    |                                                           ^^^^
    |
    = help: items from traits can only be used if the trait is in scope
help: trait `Resource` which provides `meta` is implemented but not in scope; perhaps you want to import it
    |
1   + use stackable_operator::kube::Resource;
    |
help: there is a method `meta_mut` with a similar name
    |
238 |     druid_connection.druid_namespace().ok() == config_map.meta_mut().namespace
    |                                                           ~~~~~~~~

return false;
};
druid_connection.druid_namespace().ok() == config_map.meta().namespace
&& Some(druid_connection.druid_name()) == config_map.meta().name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [clippy] reported by reviewdog 🐶

error[E0599]: no method named `meta` found for reference `&stackable_operator::kube::kube_core::DeserializeGuard` in the current scope
   --> rust/operator-binary/src/main.rs:239:62
    |
239 |         && Some(druid_connection.druid_name()) == config_map.meta().name
    |                                                              ^^^^
    |
    = help: items from traits can only be used if the trait is in scope
help: trait `Resource` which provides `meta` is implemented but not in scope; perhaps you want to import it
    |
1   + use stackable_operator::kube::Resource;
    |
help: there is a method `meta_mut` with a similar name
    |
239 |         && Some(druid_connection.druid_name()) == config_map.meta_mut().name
    |                                                              ~~~~~~~~

return false;
};
druid_connection.druid_namespace().ok() == config_map.meta().namespace
&& Some(druid_connection.druid_name()) == config_map.meta().name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [clippy] reported by reviewdog 🐶

error[E0599]: no method named `meta` found for reference `&stackable_operator::kube::kube_core::DeserializeGuard` in the current scope
   --> rust/operator-binary/src/main.rs:239:62
    |
239 |         && Some(druid_connection.druid_name()) == config_map.meta().name
    |                                                              ^^^^
    |
    = help: items from traits can only be used if the trait is in scope
help: trait `Resource` which provides `meta` is implemented but not in scope; perhaps you want to import it
    |
1   + use stackable_operator::kube::Resource;
    |
help: there is a method `meta_mut` with a similar name
    |
239 |         && Some(druid_connection.druid_name()) == config_map.meta_mut().name
    |                                                              ~~~~~~~~

let Ok(druid_connection) = &druid_connection.0 else {
return false;
};
druid_connection.metadata.namespace == job.meta().namespace

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [clippy] reported by reviewdog 🐶

error[E0599]: no method named `meta` found for reference `&stackable_operator::kube::kube_core::DeserializeGuard` in the current scope
   --> rust/operator-binary/src/main.rs:249:48
    |
249 |     druid_connection.metadata.namespace == job.meta().namespace
    |                                                ^^^^
    |
    = help: items from traits can only be used if the trait is in scope
help: trait `Resource` which provides `meta` is implemented but not in scope; perhaps you want to import it
    |
1   + use stackable_operator::kube::Resource;
    |
help: there is a method `meta_mut` with a similar name
    |
249 |     druid_connection.metadata.namespace == job.meta_mut().namespace
    |                                                ~~~~~~~~

let Ok(druid_connection) = &druid_connection.0 else {
return false;
};
druid_connection.metadata.namespace == job.meta().namespace

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [clippy] reported by reviewdog 🐶

error[E0599]: no method named `meta` found for reference `&stackable_operator::kube::kube_core::DeserializeGuard` in the current scope
   --> rust/operator-binary/src/main.rs:249:48
    |
249 |     druid_connection.metadata.namespace == job.meta().namespace
    |                                                ^^^^
    |
    = help: items from traits can only be used if the trait is in scope
help: trait `Resource` which provides `meta` is implemented but not in scope; perhaps you want to import it
    |
1   + use stackable_operator::kube::Resource;
    |
help: there is a method `meta_mut` with a similar name
    |
249 |     druid_connection.metadata.namespace == job.meta_mut().namespace
    |                                                ~~~~~~~~

return false;
};
druid_connection.metadata.namespace == job.meta().namespace
&& Some(druid_connection.job_name()) == job.meta().name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [clippy] reported by reviewdog 🐶

error[E0599]: no method named `meta` found for reference `&stackable_operator::kube::kube_core::DeserializeGuard` in the current scope
   --> rust/operator-binary/src/main.rs:250:53
    |
250 |         && Some(druid_connection.job_name()) == job.meta().name
    |                                                     ^^^^
    |
    = help: items from traits can only be used if the trait is in scope
help: trait `Resource` which provides `meta` is implemented but not in scope; perhaps you want to import it
    |
1   + use stackable_operator::kube::Resource;
    |
help: there is a method `meta_mut` with a similar name
    |
250 |         && Some(druid_connection.job_name()) == job.meta_mut().name
    |                                                     ~~~~~~~~

return false;
};
druid_connection.metadata.namespace == job.meta().namespace
&& Some(druid_connection.job_name()) == job.meta().name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [clippy] reported by reviewdog 🐶

error[E0599]: no method named `meta` found for reference `&stackable_operator::kube::kube_core::DeserializeGuard` in the current scope
   --> rust/operator-binary/src/main.rs:250:53
    |
250 |         && Some(druid_connection.job_name()) == job.meta().name
    |                                                     ^^^^
    |
    = help: items from traits can only be used if the trait is in scope
help: trait `Resource` which provides `meta` is implemented but not in scope; perhaps you want to import it
    |
1   + use stackable_operator::kube::Resource;
    |
help: there is a method `meta_mut` with a similar name
    |
250 |         && Some(druid_connection.job_name()) == job.meta_mut().name
    |                                                     ~~~~~~~~

@razvan razvan added this pull request to the merge queue Oct 24, 2024
Merged via the queue into main with commit 04a3046 Oct 24, 2024
26 of 30 checks passed
@razvan razvan deleted the feature/deserializeguard branch October 24, 2024 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants