Skip to content
New issue

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

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

Already on GitHub? # to your account

drop use of unsupported_reason_add #255

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Feb 23, 2024

@agrare I see that we added instantiate_supported? in c7213d3

Do we still need that?
I don't see it defined or extended anywhere.

Alternatively, can we just use instantiate_unsupported_reason and drop the instantiate_supported? ?

ANSWER: punting for now


part of:

Deprecating unsupported_reason_add. Returning the string instead

Note, these are all the same:

unsupported_reason_add(:feature, unsupported_reason(:feature2)) unless supports_feature2?
unsupported_reason_add(:feature, unsupported_reason(:feature2)) unless supports?(:feature2)
unsupported_reason(:feature2) unless supports?(:feature2)
unsupported_reason(:feature2)

@agrare
Copy link
Member

agrare commented Feb 26, 2024

The instantiate_supported code was there to allow us to optionally disable this support, I'm not sure if we still need that @Fryguy ?

Comment on lines 6 to 8
# TODO: are these overridden?
# TODO: can we just focus on the unsupported_reason?
# TODO: can we just use supports_not :instantiate instead of using these methods?
Copy link
Member

Choose a reason for hiding this comment

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

@kbrock I think we should keep this method for now since we override it in some scenarios but we could drop it in the future
Can you drop the TODO comments?

@kbrock kbrock force-pushed the unsupported_supports branch from 78eb2e8 to 0e97a0e Compare February 29, 2024 17:02
@kbrock
Copy link
Member Author

kbrock commented Feb 29, 2024

update:

  • dropped TODO comments

@miq-bot
Copy link
Member

miq-bot commented Feb 29, 2024

Checked commit kbrock@0e97a0e with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. ⭐

@kbrock kbrock changed the title drop use of unsupported_reason_add QUESTIONS drop use of unsupported_reason_add Feb 29, 2024
@agrare agrare merged commit 70db938 into ManageIQ:master Feb 29, 2024
3 of 4 checks passed
@kbrock kbrock deleted the unsupported_supports branch March 1, 2024 00:36
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants