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

add aopproxyutils dependancy and add handling in scheduledTaskConfig class #218

Merged
merged 11 commits into from
Jul 18, 2024

Conversation

clr182
Copy link
Contributor

@clr182 clr182 commented Jul 2, 2024

Goal

The following warning appears when starting the SpringBootWeb application.
“com.bugsnag.ScheduledTaskConfiguration : Bugsnag scheduled task exception handler could not be configured”.
This happens when adding the @EnableScheduling annotation

Design

Checked the ScheduledTaskRegister to determine whether it is a proxy of the original object, then get the target class of the original object if it is and cast it as the taskSchedular before configuring the existing taskScheduler.

Changeset

Added new AoP springboot dependencies for accessing the original ScheduledTaskSchedular object.

Added checking to the ConfigureTasks method in ScheduledTaskConfiguration.java to determine whether the passed object is a proxy or not.

Handle cases where this is or isn't a proxy within the configureTasks method

Testing

Added two tests to determine if the taskScheduler object is a proxy.

@clr182 clr182 marked this pull request as draft July 2, 2024 10:14
@clr182 clr182 marked this pull request as ready for review July 2, 2024 15:24
@clr182 clr182 self-assigned this Jul 4, 2024
Copy link
Contributor

@lemnik lemnik left a comment

Choose a reason for hiding this comment

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

LGTM

@clr182 clr182 merged commit 41f41da into next Jul 18, 2024
1 check passed
@clr182 clr182 deleted the PLAT-12380-SchedulingTaskConfigurationWarning branch July 18, 2024 07:46
@lemnik lemnik mentioned this pull request Aug 29, 2024
clr182 added a commit that referenced this pull request Aug 29, 2024
* (docs): update docs references from `master` to `main`

* (docs): switch build status badge to buildkite

* Update selector to accept only the major version

* Update Changelog

* update linting

* Added severity check (#214)

* added severity check

* fixed linting

* fixed linting v2

* added changelog entry

* Reverting changes

* update notify override with null check

* Update changelog

* Update Bugsnag.java

call notify override method on null severity

* add aopproxyutils dependancy and add handling in scheduledTaskConfig class (#218)

* add aopproxyutils dependancy and add handling in scheduledTaskConfig class

* fixed comment typo

* fixed import of aoputils

* added proxy testing

* fixed linting

* Updated tests

* updated tests

* update changelog

* moving createProxy method to util class

* update variable name

* reverting

* Update Serializer object to be an interface (#219)

* Adding non serializable metadata handling

* removed an unused import

* update feature

* update changelog

* Add serializeObject public method

* Fixed linting

* fixed tests

* Implemented Serializer interface

* update scenarios

* update changelog

* Changes based on feedback

* update tests

* updates based on reviews

* Update bugsnag/src/main/java/com/bugsnag/Configuration.java

Co-authored-by: Tom Longridge <tom@bugsnag.com>

* update config

---------

Co-authored-by: Tom Longridge <tom@bugsnag.com>

* v3.7.2

---------

Co-authored-by: Yousif Ahmed <yousif@bugsnag.com>
Co-authored-by: Yousif <74918474+yousif-bugsnag@users.noreply.github.com>
Co-authored-by: Tom Longridge <tom@bugsnag.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants