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

Drop Supports' unsupports variable #22898

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Feb 14, 2024

Before

  • Determine supports? from the unsupported_reason hash. It will return a true, false, String reason, or block.
  • Call block if necessary and store the result in unsupported hash.
  • We change the unsupported hash every time supports?(:feature) and unsupported_reason(:feature) is called.
  • This is not thread-safe.

After

  • Determine supports? from the unsupported_reason hash.
  • Call block if necessary
  • return the result

Advantages

  • thread safe
  • less code (in the rb file)
  • fewer assignments (less code running and fewer operations)

Requirements

Depends upon:

@kbrock kbrock mentioned this pull request Feb 14, 2024
23 tasks
@miq-bot miq-bot added the wip label Feb 14, 2024
@kbrock kbrock force-pushed the supports_unsupports branch 2 times, most recently from ae70c63 to 8c5f663 Compare February 23, 2024 02:26
@kbrock
Copy link
Member Author

kbrock commented Mar 1, 2024

update:

  • rebased (fixed unmergable)
  • reduced changes in check_supports

@kbrock
Copy link
Member Author

kbrock commented Mar 7, 2024

update:

  • rebase (fix merge conflicts)

@kbrock kbrock removed the unmergeable label Mar 7, 2024
@kbrock kbrock closed this Apr 3, 2024
@kbrock kbrock reopened this Apr 3, 2024
@miq-bot miq-bot removed the wip label Apr 3, 2024
@kbrock
Copy link
Member Author

kbrock commented Apr 3, 2024

@miq-bot cross-repo-test /all

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Apr 3, 2024
@kbrock kbrock changed the title Drop Supports' unsupports array Drop Supports' unsupports variable Apr 3, 2024
@kbrock
Copy link
Member Author

kbrock commented Apr 3, 2024

@Fryguy looks like this passed cross repo tests

@kbrock
Copy link
Member Author

kbrock commented Apr 4, 2024

update:

  • rebased

update:

  • stub_supports is only passed a reason
  • stub_supports feature is required

... kicking cross repo

@kbrock
Copy link
Member Author

kbrock commented Apr 18, 2024

WIP: This is working and green. Just waiting on #22976

@kbrock kbrock removed the wip label Apr 23, 2024
@kbrock kbrock changed the title [WIP] Drop Supports' unsupports variable Drop Supports' unsupports variable Apr 23, 2024
@kbrock
Copy link
Member Author

kbrock commented Apr 23, 2024

up-wip: still waiting on #22976 - just un-WIPing to show this is good to go

kbrock added 2 commits May 8, 2024 13:00
no reason to call into unsupported_reason and supports?
@miq-bot
Copy link
Member

miq-bot commented May 8, 2024

Checked commits kbrock/manageiq@89457da~...f791e24 with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
7 files checked, 0 offenses detected
Everything looks fine. 🍪

@kbrock
Copy link
Member Author

kbrock commented May 23, 2024

@Fryguy anything special to push this forward? let me know if you want me to split into 2 PRs (for each commit)

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.

None yet

3 participants