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

[CDAP-21061] wrap all plugin methods to throw WrappedStageException #15690

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

itsankit-google
Copy link
Member

@itsankit-google itsankit-google commented Aug 27, 2024

JIRA: CDAP-21061

Refactoring so that any known plugin type instantiated by the pipeline is wrapped so that it throws wrapped stage exception which will be later on used by LogAppender to add MDC tags.

Tested in CDAP Sandbox:

Caused by: io.cdap.cdap.api.exception.WrappedStageException: Stage 'NYT Best Sellers Raw Data' encountered : java.lang.IllegalArgumentException: Invalid bucket name in path 'top_rated_$inexpensive'. Bucket name should only contain lower case alphanumeric, '-'. '_' and '.'. Please follow GCS naming convention: https://cloud.google.com/storage/docs/naming-buckets
	at io.cdap.cdap.etl.common.plugin.ExceptionWrappingCaller.call(ExceptionWrappingCaller.java:64)
	at io.cdap.cdap.etl.common.plugin.StageLoggingCaller.call(StageLoggingCaller.java:40)
	at io.cdap.cdap.etl.common.plugin.WrappedBatchSource.prepareRun(WrappedBatchSource.java:52)
	at io.cdap.cdap.etl.common.plugin.WrappedBatchSource.prepareRun(WrappedBatchSource.java:35)
	at io.cdap.cdap.etl.common.submit.SubmitterPlugin.lambda$prepareRun$2(SubmitterPlugin.java:74)
	at io.cdap.cdap.internal.app.runtime.AbstractContext.lambda$execute$5(AbstractContext.java:558)
	at io.cdap.cdap.data2.transaction.Transactions$CacheBasedTransactional.finishExecute(Transactions.java:234)
	... 21 common frames omitted

@itsankit-google itsankit-google added the build Triggers github actions build label Aug 27, 2024
@itsankit-google itsankit-google self-assigned this Aug 28, 2024
@itsankit-google itsankit-google force-pushed the CDAP-21061-wrap-plugin-methods branch 4 times, most recently from 20c34d5 to 3ec6133 Compare August 29, 2024 10:07
Copy link

sonarcloud bot commented Aug 29, 2024

@itsankit-google itsankit-google merged commit bb8fc4b into develop Aug 30, 2024
11 of 13 checks passed
@itsankit-google itsankit-google deleted the CDAP-21061-wrap-plugin-methods branch August 30, 2024 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Triggers github actions build error-management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants