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

Don't unnecessarily load all models in stack check #3941

Merged
merged 6 commits into from
Aug 28, 2024

Conversation

sethboyles
Copy link
Member

@sethboyles sethboyles commented Aug 28, 2024

  • loading all models can cause issues in cases where the table for a model does not yet exist

This will fix an issue affecting the current release; we plan to refactor this further to remove any model logic at all in the future.

  • A short explanation of the proposed change:

  • An explanation of the use cases your change solves

  • Links to any other associated PRs

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@sethboyles sethboyles force-pushed the no-load-models-in-stack-check branch from 95a90ed to a7d8116 Compare August 28, 2024 00:30
@sethboyles sethboyles changed the title Don't unnecessarilys load all models in stack check Don't unnecessarily load all models in stack check Aug 28, 2024
* loading all models can cause issues in cases where the table for a
  model does not yet exist
@sethboyles sethboyles force-pushed the no-load-models-in-stack-check branch from a7d8116 to 523f1de Compare August 28, 2024 18:27
@sethboyles sethboyles requested a review from Samze August 28, 2024 20:04
Samze
Samze previously approved these changes Aug 28, 2024
Copy link
Contributor

@Samze Samze left a comment

Choose a reason for hiding this comment

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

Few nits, rest LGTM

spec/tasks/stack_check_spec.rb Outdated Show resolved Hide resolved
spec/tasks/stack_check_spec.rb Outdated Show resolved Hide resolved
spec/tasks/stack_check_spec.rb Outdated Show resolved Hide resolved
spec/tasks/stack_check_spec.rb Outdated Show resolved Hide resolved
sethboyles and others added 5 commits August 28, 2024 13:14
Co-authored-by: Sam Gunaratne <385176+Samze@users.noreply.github.com>
Co-authored-by: Sam Gunaratne <385176+Samze@users.noreply.github.com>
Co-authored-by: Sam Gunaratne <385176+Samze@users.noreply.github.com>
Co-authored-by: Sam Gunaratne <385176+Samze@users.noreply.github.com>
@sethboyles
Copy link
Member Author

@Samze do you mind giving an official GitHub Approval TM?

@sethboyles sethboyles merged commit 99b4a78 into main Aug 28, 2024
8 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Aug 28, 2024
Changes in cloud_controller_ng:

- Don't unnecessarily load all models in stack check
    PR: cloudfoundry/cloud_controller_ng#3941
    Author: Seth Boyles <seth.boyles@broadcom.com>
    Author: Alex Rocha <alex.rocha@broadcom.com>
@moleske moleske deleted the no-load-models-in-stack-check branch August 29, 2024 01:53
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.

3 participants