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 #709 Enable developers to inject non-bolt arguments to listener function args #712

Closed
wants to merge 2 commits into from

Conversation

seratch
Copy link
Member

@seratch seratch commented Aug 25, 2022

This pull request resolves #709

Category (place an x in each of the [ ])

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements (place an x in each [ ])

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

logger.warning(f"Unknown Request object type detected ({type(request)})")

if name not in found_arg_names:
logger.warning(f"{name} is not a valid argument")
kwargs[name] = None
Copy link
Member Author

Choose a reason for hiding this comment

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

To allow developers to inject extra args, we remove this logic

logger.warning(f"Unknown Request object type detected ({type(request)})")

if name not in found_arg_names:
logger.warning(f"{name} is not a valid argument")
kwargs[name] = None
Copy link
Member Author

Choose a reason for hiding this comment

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

To allow developers to inject extra args, we remove this logic

@@ -81,8 +83,9 @@ def __call__(
found_arg_names = kwargs.keys()
for name in self.arg_names:
if name not in found_arg_names:
self.logger.warning(f"{name} is not a valid argument")
kwargs[name] = None
Copy link
Member Author

Choose a reason for hiding this comment

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

To allow developers to inject extra args, we remove this logic

@@ -77,8 +79,9 @@ async def __call__(
found_arg_names = kwargs.keys()
for name in self.arg_names:
if name not in found_arg_names:
self.logger.warning(f"{name} is not a valid argument")
kwargs[name] = None
Copy link
Member Author

Choose a reason for hiding this comment

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

To allow developers to inject extra args, we remove this logic

@seratch
Copy link
Member Author

seratch commented Aug 25, 2022

This pull request is still in progress. Existing tests detected regressions.

@seratch
Copy link
Member Author

seratch commented Aug 25, 2022

After looking into this more deeply, I concluded this enhancement is not feasible. Even if it's feasible in some way, I don't think it's maintainable for us. Let me close this my proposal here.

@seratch seratch closed this Aug 25, 2022
@seratch seratch removed this from the 1.15.0 milestone Sep 1, 2022
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.

Enable developers to inject non-bolt arguments to listener function args
1 participant