Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
202 commits
Select commit Hold shift + click to select a range
1eaf40c
Updating gitmodules
masivesky Jan 15, 2025
a035128
Merge pull request #15802 from cdapio/gitmodule-update
itsankit-google Jan 15, 2025
7951e8a
Add optional USER_AGENT header to OAuthHandler requests
Awk34 Oct 25, 2024
04bca88
Merge pull request #15803 from cdapio/cherry-pick-oauth-handler
itsankit-google Jan 16, 2025
cc98fce
Implement FailureDetailsProvider in DataprocRuntimeException to cover…
itsankit-google Jan 9, 2025
8bae823
Merge pull request #15807 from cdapio/cherrypick-CDAP-21110
itsankit-google Jan 16, 2025
09ca7b4
[CDAP-21117] Binding correct MessagingService implementation for a Di…
sahusanket Jan 21, 2025
fa7c007
Merge pull request #15813 from cdapio/cherry_CDAP-21117_add_correct_m…
sahusanket Jan 21, 2025
ea3a890
Add metrics for error classification
itsankit-google Jan 21, 2025
35c0617
Merge pull request #15819 from cdapio/CDAP-21119-cherrypick
itsankit-google Jan 23, 2025
1f10486
[CDAP-21075] Support DP 2.2(spark 3.5.1) by checking if the new metho…
sahusanket Jan 20, 2025
fd956f4
Retain user details in the processing of subsequent chunks
itsankit-google Jan 24, 2025
b40e5ce
Merge pull request #15820 from cdapio/cherry_CDAP-21075_spark351_dp22
itsankit-google Jan 27, 2025
5376a1e
Merge pull request #15823 from cdapio/CDAP-21069-cherrypick
itsankit-google Jan 27, 2025
508b732
Validate workflow token on program status trigger.
ritwiksahani Jan 16, 2025
28d5eca
fix metric tags to handle null values and remove stageName from category
itsankit-google Jan 27, 2025
cbb994b
Merge pull request #15827 from cdapio/CDAP-21119-cherrypick
itsankit-google Jan 28, 2025
24edf7c
Merge pull request #15825 from cdapio/cherrypick/release/6.11/CDAP-21064
ritwiksahani Jan 28, 2025
c9d1a02
[CDAP-21096] Parametrize the AppFabricServiceRuntimeModule
vsethi09 Jan 12, 2025
daebe88
Merge pull request #15828 from cdapio/cherrypick/feature/CDAP-21096_p…
vsethi09 Jan 28, 2025
0e457de
Remove in-memory launching queue in RunRecordMonitorService
vsethi09 Jan 13, 2025
b93ed71
[CDAP-21096] Remove Bootstrap service from Appfabric server
vsethi09 Jan 21, 2025
3a18c78
handle gcs upload errors during starting state
itsankit-google Jan 28, 2025
603f1ae
Merge pull request #15831 from cdapio/cherrypick/CDAP-21096_remove_bo…
vsethi09 Jan 28, 2025
e2b5a68
Merge pull request #15833 from cdapio/upgrade-maven-antrun-plugin-che…
itsankit-google Jan 28, 2025
bc7e359
Merge pull request #15830 from cdapio/cherrypick/feature/CDAP-21096_f…
vsethi09 Jan 28, 2025
de5c88f
CDAP-21114 Disable messaging service pod for new CDAP instances with …
sidhdirenge Jan 16, 2025
71536cc
Merge pull request #15837 from cdapio/cherrypick-CDAP-21114
sidhdirenge Jan 29, 2025
9f20a76
prevent stage information from getting lost in the log
itsankit-google Jan 29, 2025
54ea754
Merge pull request #15839 from cdapio/CDAP-21125-cherrypick
itsankit-google Jan 30, 2025
97bd87b
[CDAP-21096] Split ProgramLifecycleService for Appfabric service and …
vsethi09 Jan 27, 2025
92b8740
Merge pull request #15840 from cdapio/cherrypick/feature/CDAP-21096_s…
vsethi09 Jan 31, 2025
bff7122
[CDAP-21118] Task workers should communicate with Spanner Messaging S…
sidhdirenge Jan 28, 2025
5e9780a
Merge pull request #15843 from cdapio/cherrypick/CDAP-21118-sidhdiren…
sidhdirenge Jan 31, 2025
61c851f
[CDAP-21118] Enable gzip compression for PreviewHttpServer
sidhdirenge Jan 31, 2025
f7d0a61
Merge pull request #15845 from cdapio/cherrypick/CDAP-21118_sidhdiren…
sidhdirenge Jan 31, 2025
cabf07e
fix error messages while gcs upload
itsankit-google Feb 4, 2025
c3bc2f2
Merge pull request #15851 from cdapio/fix-gcs-uploa-cherrypick
itsankit-google Feb 4, 2025
eb1a7d2
[CDAP-21096] Keep TaskWorkerServiceLauncher, SystemWorkerServiceLaunc…
vsethi09 Jan 31, 2025
71c9f34
[CDAP-21131] Delay in spanner table creation should not crash statele…
sidhdirenge Feb 4, 2025
334a6a6
Merge pull request #15853 from cdapio/cherrypick/CDAP-21131-spanner_r…
sidhdirenge Feb 5, 2025
e29dad6
Merge pull request #15854 from cdapio/cherrypick/fix/CDAP-21096_appfa…
vsethi09 Feb 5, 2025
c54fc50
add query param to list apps API to enable default pagination
adrikagupta Feb 3, 2025
3d26439
Add new OAuthProvider data to OAuthStore
Awk34 Feb 4, 2025
45aabfd
Merge pull request #15857 from cdapio/cherry-picks
adrikagupta Feb 5, 2025
ed99267
override permissions at workflow level
itsankit-google Feb 3, 2025
af41455
Merge pull request #15861 from cdapio/build-fix-cherrypick
itsankit-google Feb 7, 2025
76b9875
[CDAP-21096] Separate bind and announce port configurations for appfa…
vsethi09 Feb 5, 2025
4bf49c5
Merge pull request #15863 from cdapio/cherrypick/CDAP-21096_startup_p…
vsethi09 Feb 7, 2025
689025b
Add rule based error classification
itsankit-google Feb 3, 2025
62387a0
Merge pull request #15865 from cdapio/CDAP-21128-cherrypick
itsankit-google Feb 8, 2025
c1289af
Avoid double wrapping of failure details provider
itsankit-google Feb 10, 2025
dd5505a
Merge pull request #15868 from cdapio/CDAP-21123-cherrypick
itsankit-google Feb 10, 2025
a85a1fe
[CDAP-21096] Use RemoteScheduleManager to update TimeSchedulerService…
vsethi09 Feb 7, 2025
59fa341
Merge pull request #15873 from cdapio/cherrypick/fix/CDAP-21096_sched…
vsethi09 Feb 11, 2025
e33e8c2
Adding namespace tag to Flow Control metrics
masivesky Feb 11, 2025
f14260f
Making tags a static variable
masivesky Feb 12, 2025
1befee3
[CDAP-21133] Making Dataproc 2.2 as default
sahusanket Feb 10, 2025
c3538bc
upgrade hadoop to 3.3.6
itsankit-google Feb 12, 2025
df1e09f
Merge pull request #15879 from cdapio/cdap-master-build-fix-cherrypick
itsankit-google Feb 12, 2025
8da00ff
Merge pull request #15875 from cdapio/cherry-pick-ns-tag
masivesky Feb 12, 2025
c904853
Handle dataproc job failures in error management
itsankit-google Feb 12, 2025
14e3da1
Add more unknown http 4xx errors in error utils
itsankit-google Feb 12, 2025
4b4ce54
Fix method used to base64 encode basic auth header
Awk34 Feb 10, 2025
59765ad
add pagination during list call to stop the pipelines during pre upgr…
adrikagupta Feb 10, 2025
b4114e5
Merge pull request #15882 from cdapio/CDAP-21128-cherrypick
itsankit-google Feb 13, 2025
9b86d6d
Merge pull request #15884 from cdapio/cherry-pick-oauth-upgrade
adrikagupta Feb 13, 2025
9cd1733
spanner library version upgrade
sidhdirenge Feb 13, 2025
234b8b9
[cherry-pick][CDAP-21079] Update cloud spanner library version to 6.86.0
sidhdirenge Feb 14, 2025
879fccd
Increasing timeout for task workers to recover when app fabric restarts
anshumanks Feb 11, 2025
737118b
Add error classification for macro evaluator
itsankit-google Feb 14, 2025
8ead948
Wrap exceptions from process stage to throw WrappedStageException
itsankit-google Feb 14, 2025
f7fd437
Change log to error if appspec regeneration failed
itsankit-google Feb 14, 2025
616d96d
Merge pull request #15892 from cdapio/cherry-pick/task-worker-increas…
anshumanks Feb 17, 2025
1c45c84
Merge pull request #15893 from cdapio/CDAP-21137-cherrypick
itsankit-google Feb 17, 2025
a83b927
[CDAP-21096] Dataset service fix
vsethi09 Feb 17, 2025
1211189
Extracting namespace tag from URI
masivesky Feb 18, 2025
7e586ba
Merge pull request #15897 from cdapio/cherrypick/feature/CDAP-21096_d…
masivesky Feb 18, 2025
51d5aaa
[CDAP-21140] Fix transaction retries in OperationNotificationSubscrib…
vsethi09 Feb 18, 2025
6f47785
Consolidate Metrics Query and Metrics Proccessor Services
bhardwaj-priyanshu Feb 10, 2025
9448230
Merge pull request #15902 from cdapio/cherry-pick/feature/consolidate…
bhardwaj-priyanshu Feb 18, 2025
94de6da
Consolidate Log Query and Log Saver Services
bhardwaj-priyanshu Feb 10, 2025
760f2fa
Merge pull request #15898 from cdapio/CDAP-21136-cherry-pick
masivesky Feb 18, 2025
33836d9
Merge pull request #15903 from cdapio/cherry-pick/feature/consolidate…
bhardwaj-priyanshu Feb 19, 2025
dbb6151
[🍒][CDAP-21140] Fix transaction retries in OperationNotificationSubsc…
vsethi09 Feb 19, 2025
0cbbb48
Add dependency on common-io:2.12.0 in k8s profile in cdap-master/pom.xml
vsethi09 Feb 19, 2025
f6ca1e2
Revert "[Cherrypick][CDAP-21064] Validate workflow token on program s…
itsankit-google Feb 19, 2025
1d466f7
Merge pull request #15908 from cdapio/revert-15825-cherrypick/release…
itsankit-google Feb 19, 2025
6a37205
Merge pull request #15907 from cdapio/cherrypick/fix/common-io-dep-ver
vsethi09 Feb 20, 2025
d9686e4
[CDAP-21079] Update google cloud library dependency version to 26.55.…
sidhdirenge Feb 24, 2025
5ebb200
[cherry-pick][CDAP-21079] Update google cloud library dependency vers…
sidhdirenge Feb 25, 2025
3d466c9
[CDAP-21144] Spanner Compression for String & bytes type fields
sidhdirenge Feb 20, 2025
90188c7
[cherry-pick][CDAP-21144] Spanner Compression for String & bytes type…
sidhdirenge Feb 26, 2025
b07215b
[CDAP-21079] Fix guava version post updating google cloud library dep…
sidhdirenge Feb 26, 2025
486eee5
Merge pull request #15877 from cdapio/cherry_CDAP-21133_default_dp22
sahusanket Feb 26, 2025
6037d3e
[cherry-pick][CDAP-21079] Fix guava version post updating google clou…
sidhdirenge Feb 26, 2025
8a8f3fa
make list apps in pre-upgrade and post-upgrade paginated
adrikagupta Feb 25, 2025
5dab8d6
Merge pull request #15920 from cdapio/cherry-pick-pagination-611
adrikagupta Feb 27, 2025
30bddd6
handle null credential strategy values for existing providers
adrikagupta Mar 4, 2025
ee8aab2
Merge pull request #15925 from cdapio/cherry-pick-15924
adrikagupta Mar 5, 2025
7b1d95b
[CDAP-21148] Display user-friendly error in case of deploy failure du…
sidhdirenge Mar 4, 2025
ec26245
Merge pull request #15927 from cdapio/cherrypick/sidhdirenge-spanner-…
sidhdirenge Mar 5, 2025
3c525e6
Adding default namespace tag for authorization check metrics
masivesky Mar 5, 2025
2064f84
Merge pull request #15929 from cdapio/add-ns-tag-auth-611
masivesky Mar 6, 2025
8ecf56e
Updated dependancy copyright license files.
masivesky Mar 7, 2025
a651c47
Merge pull request #15931 from cdapio/release-update-license-6110
masivesky Mar 7, 2025
6638336
Removing snapshot for 6.11 release
masivesky Mar 9, 2025
8f938ee
[CDAP-21144] Add workflows.workflows_data column to compression config
sidhdirenge Mar 10, 2025
614f1b8
Merge pull request #15935 from cdapio/cherrypick/sidhdirenge-compress…
sidhdirenge Mar 10, 2025
01f1e78
Merge pull request #15933 from cdapio/remove-snapshot
itsankit-google Mar 10, 2025
2abf0dd
Bumping snapshot to 6.11.1
masivesky Mar 24, 2025
c859f11
Merge pull request #15940 from cdapio/bump-snapshot-6111
itsankit-google Mar 24, 2025
cab3b9e
Retry socket timeout exception when launching pipelines to system wor…
itsankit-google Mar 11, 2025
82fe866
Change log to error if appspec regeneration failed
itsankit-google Mar 11, 2025
6ab1076
Merge pull request #15942 from cdapio/CDAP-21154-cherrypick
itsankit-google Mar 24, 2025
f6e10dc
Add from_plugin metric tag in the error classification metric
itsankit-google Mar 24, 2025
9468231
Merge pull request #15945 from cdapio/CDAP-21158-cherrypick
itsankit-google Mar 28, 2025
c6aa077
Cover dataproc create operation failures
itsankit-google Apr 16, 2025
619dc61
Merge pull request #15949 from cdapio/dataproc-stockout-error-cherrypick
itsankit-google Apr 17, 2025
6ac55d7
Force cleaning up location cache periodically.
ritwiksahani May 21, 2025
790d9cb
Force cleaning up location cache periodically.
ritwiksahani May 26, 2025
0ee47d8
Merge pull request #15957 from cdapio/cherrypick/release/6.11/CDAP-21166
ritwiksahani May 27, 2025
16073df
Add new API for app count in a namespace.
ritwiksahani Jun 19, 2025
a4ba2cb
Merge pull request #15981 from cdapio/cheryypick/release/6.11/CDAP-21161
ritwiksahani Jun 20, 2025
6204e16
[CDAP-21163] Reduce ApplicationSpecification size when storing in the…
sidhdirenge Apr 17, 2025
b7bdb0f
Merge pull request #15984 from cdapio/sidhdirenge-appspec-cherrypick
sidhdirenge Jun 23, 2025
742bad6
[CDAP-21163] Reduce ProvisionerTaskInfo size when storing in the Clou…
sidhdirenge Jun 17, 2025
d45f398
Merge pull request #15985 from cdapio/cherrypick/sidhdirenge-provisio…
sidhdirenge Jun 23, 2025
0d4cc30
[CDAP-21180] Instead of instantiation of Class,we can figure out the …
sahusanket Jun 22, 2025
e7fb123
Merge pull request #15987 from cdapio/cherry_CDAP-21180
sahusanket Jun 27, 2025
2f6383d
OSSRH to central sonatype repo migration.
ritwiksahani Jul 2, 2025
7c375f3
Fixing maven snapshots URL in the CDAP repo.
ritwiksahani Jul 3, 2025
6c45c40
Merge pull request #15995 from cdapio/cherrypick/release/6.11/ossrh-m…
itsankit-google Jul 3, 2025
f3eaebd
Use central publishing maven plugin
ritwiksahani Jul 7, 2025
efb2ca8
Merge pull request #15999 from cdapio/cherrypick/release/6.11/ossrh-m…
ritwiksahani Jul 9, 2025
6a11d11
add kms key rotation for secure keys
adrikagupta May 30, 2025
4ea0832
Merge pull request #16002 from cdapio/cheryy-pick-key-rotation
adrikagupta Jul 11, 2025
7e5b1c3
add configurable polling interval for ui
GnsP Jul 11, 2025
1ea62c5
[CDAP-21184] Changes to support running CDAP on Java 11 runtime
sahusanket Jul 3, 2025
56317be
[CDAP-21184] Support java 11 : Move log lines to Java process only to…
sahusanket Jul 7, 2025
3cb9285
CDAP-21186 : Update parent classloader to include java.sql
sahusanket Jul 15, 2025
ea1c1c4
Merge pull request #16013 from cdapio/cherry_java_11_for_cdf611
sahusanket Jul 18, 2025
9fa533e
[CDAP-21187] Update dataproc's default image to 2.3
sahusanket Jul 18, 2025
84f06cf
Merge pull request #16015 from cdapio/cherry_CDAP-21187_default_dp_image
sahusanket Jul 18, 2025
a5f6ffb
add http access token auth for bitbucket server
adrikagupta Jul 14, 2025
5376a22
Merge pull request #16017 from cdapio/cherry-pick-21049
adrikagupta Jul 22, 2025
109116e
Oauth handler changes to support Access token and long lived token
sahusanket Jul 22, 2025
c30f863
Merge pull request #16008 from GnsP/cherrypick-16006-611
itsankit-google Jul 22, 2025
201aacb
Add the post cleanup logic for conditional plugin
bhardwaj-priyanshu Jul 21, 2025
2b3e99e
Merge pull request #16018 from cdapio/oauth_changes_copla
sahusanket Jul 22, 2025
94fb3fc
Merge pull request #16019 from cdapio/cherry-pick/feature/cleanup-dat…
bhardwaj-priyanshu Jul 22, 2025
c77a8fb
add new dataproc supported regions
adrikagupta Jul 23, 2025
9da9569
[CDAP-21192] : Checking the version suffix should only have alphanume…
sahusanket Jul 23, 2025
15ac976
Merge pull request #16023 from cdapio/cherry_CDAP-21192
itsankit-google Jul 23, 2025
f0c6463
[CDAP-21193] : Check and validate each entry of uploaded jar that is …
sahusanket Jul 23, 2025
2ff0235
Merge pull request #16025 from cdapio/cherry_CDAP-21193_zip_slip
sahusanket Jul 24, 2025
b26734e
Merge pull request #16021 from cdapio/cherry-pick-16020
adrikagupta Aug 4, 2025
7b52543
[CDAP-21199] : Add DELETE Oauth provider feature
sahusanket Jul 29, 2025
cedefdf
CDAP-21188 add feature flag for wrangler actions rbac
sahusanket Aug 4, 2025
08cc010
Merge pull request #16031 from cdapio/cherry_CDAP-21199_delete_oauth
sahusanket Aug 4, 2025
3c16a1b
Merge pull request #16033 from cdapio/cherry_ff_CDAP-21188_wrangler_rbac
itsankit-google Aug 6, 2025
0375aae
CDAP-21202 : making validation regex to support dot
sahusanket Aug 6, 2025
0a16740
Merge pull request #16035 from cdapio/cherry_CDAP-21202
sahusanket Aug 6, 2025
cd06aa9
CDAP-21203 : Handle unauthorized exception case for remote calls for …
sahusanket Aug 7, 2025
f1874b5
Merge pull request #16037 from cdapio/CDAP-21203_cherry_611
sahusanket Aug 11, 2025
e4aeae3
Reducing the log level to reduce logs
sahusanket Aug 18, 2025
4b8aec7
Merge pull request #16040 from cdapio/cherry_log_level
itsankit-google Aug 18, 2025
7ef0e24
Updated dependancy copyright license files.
Aug 19, 2025
191815b
Merge pull request #16042 from cdapio/release-update-license-6111
123-komal Aug 19, 2025
85b3d0a
Remove -SNAPSHOT from Version
Aug 20, 2025
efb1007
Merge pull request #16044 from cdapio/snapshot-removal-6111
123-komal Aug 20, 2025
c89aa1a
Add module name to fix central maven publishing
itsankit-google Aug 20, 2025
34d3d45
Merge pull request #16046 from cdapio/ossrh-migration-cherrypick
itsankit-google Aug 20, 2025
28404c4
[CDAP-21211] Restrict preview runner to poll for only one request per…
sidhdirenge Sep 22, 2025
9502cb5
Merge pull request #16057 from cdapio/cherrypick/sidhdirenge-preview-…
sidhdirenge Oct 23, 2025
f3ad889
[CDAP-21211] Refactor DistributedPreviewManager : remove redundant ac…
sidhdirenge Oct 1, 2025
d18205f
Merge pull request #16058 from cdapio/cherrypick/preview-part1-bug-fix
sidhdirenge Oct 23, 2025
24b20e0
[CDAP-21211] Authenticate Preview Runner to Preview Manager communica…
sidhdirenge Sep 26, 2025
819e7e5
Merge pull request #16059 from cdapio/cherrypick/sidhdirenge-preview-…
sidhdirenge Oct 24, 2025
9065611
[CDAP-21043] Retry on SocketTimeoutException in MessagingProgramState…
vsethi09 Oct 30, 2025
1b5479b
bump-snapshot
Nov 4, 2025
8cded5d
Merge pull request #16063
123-komal Nov 5, 2025
ac18c29
Merge pull request #16061 from cdapio/cherrypick/fix/CDAP-21043-relea…
vsethi09 Nov 6, 2025
66c51f5
[CDAP-21213] Fix Stuck Task Worker : Refactor: Improve worker reliabi…
sahusanket Nov 14, 2025
9e9fbf5
Merge pull request #16068 from cdapio/cherry_task_work_stuck
sahusanket Nov 26, 2025
a42a854
[CDAP-21223] Fix Cloud Spanner lock contention issues related to run_…
sidhdirenge Dec 24, 2025
d4b729b
Merge pull request #16075 from cdapio/cherrypick/sidhdirenge-spanner-…
sidhdirenge Dec 31, 2025
bf35e5e
[CDAP-21220] Fix range Where clause in the SpannerStructuredTable que…
Dec 26, 2025
5f1ac62
Merge pull request #16078 from cdapio/cherrypick/spanner-query-fix
sidhdirenge Jan 5, 2026
dc7f706
[CDAP-21224] Silently log PluginNotFoundException instead of throwing…
sidhdirenge Jan 16, 2026
ba706ef
Merge pull request #16080 from cdapio/cherrypick/sidhdirenge-handle-m…
sidhdirenge Jan 19, 2026
a48a168
adding Thread + caller stack + Sql timing
sahusanket Mar 18, 2026
1557dab
adding detailed stack
sahusanket Mar 18, 2026
45dce6b
Testing without Spanner query for FlowControl
sahusanket Mar 30, 2026
803d2a1
Splitting Flow control write n read
sahusanket Mar 31, 2026
5551948
Trying cached counter in FlowControl Service
sahusanket Apr 1, 2026
93dc8dd
Trying optimistic lock
sahusanket Apr 8, 2026
2b26cf8
Revert "adding detailed stack"
sahusanket Apr 9, 2026
0060703
Revert "Trying cached counter in FlowControl Service"
sahusanket Apr 14, 2026
098ac4e
Revert "Splitting Flow control write n read"
sahusanket Apr 14, 2026
7dabf08
Revert "Testing without Spanner query for FlowControl"
sahusanket Apr 14, 2026
3017140
REMOVE LOGGING SQL PROFILE
sahusanket Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .github/workflows/build-sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ on:
branches: [ develop, release/** ]
types: [opened, synchronize, reopened, labeled]

permissions:
checks: write

jobs:
build-sonar:
runs-on: k8s-runner-build
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
[submodule "cdap-ui"]
path = cdap-ui
url = ../cdap-ui
branch = develop
branch = release/6.11
2 changes: 1 addition & 1 deletion cdap-api-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.cdap.cdap</groupId>
<artifactId>cdap</artifactId>
<version>6.11.0-SNAPSHOT</version>
<version>6.11.2-SNAPSHOT</version>
</parent>

<artifactId>cdap-api-common</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package io.cdap.cdap.api.exception;

import java.util.Objects;
import javax.annotation.Nullable;

/**
* Class representing the category of an error.
*
Expand All @@ -25,6 +28,7 @@
*/
public class ErrorCategory {
private final ErrorCategoryEnum errorCategory;
@Nullable
private final String subCategory;

/**
Expand All @@ -33,8 +37,7 @@ public class ErrorCategory {
* @param errorCategory The category of the error.
*/
public ErrorCategory(ErrorCategoryEnum errorCategory) {
this.errorCategory = errorCategory;
this.subCategory = null;
this(errorCategory, null);
}

/**
Expand All @@ -43,7 +46,7 @@ public ErrorCategory(ErrorCategoryEnum errorCategory) {
* @param errorCategory The category of the error.
* @param subCategory The sub-category of the error.
*/
public ErrorCategory(ErrorCategoryEnum errorCategory, String subCategory) {
public ErrorCategory(ErrorCategoryEnum errorCategory, @Nullable String subCategory) {
this.errorCategory = errorCategory;
this.subCategory = subCategory;
}
Expand All @@ -52,8 +55,24 @@ public ErrorCategory(ErrorCategoryEnum errorCategory, String subCategory) {
* Returns the category of the error.
*/
public String getErrorCategory() {
return errorCategory == null ? ErrorCategoryEnum.OTHERS.toString() : subCategory == null ?
errorCategory.toString() : String.format("%s-'%s'", errorCategory, subCategory);
return errorCategory == null ? ErrorCategoryEnum.OTHERS.toString() : subCategory == null
? errorCategory.toString() : String.format("%s-'%s'", errorCategory, subCategory);
}

@Override
public boolean equals(Object o) {
if (!(o instanceof ErrorCategory)) {
return false;
}

ErrorCategory that = (ErrorCategory) o;
return Objects.equals(this.errorCategory, that.errorCategory)
&& Objects.equals(this.subCategory, that.subCategory);
}

@Override
public int hashCode() {
return Objects.hash(this.errorCategory, this.subCategory);
}

/*
Expand All @@ -64,16 +83,26 @@ public String toString() {
return getErrorCategory();
}

/**
* Returns the parent category of the error.
*/
public ErrorCategoryEnum getParentCategory() {
return errorCategory == null ? ErrorCategoryEnum.OTHERS : errorCategory;
}

/**
* Enum representing the different categories of errors.
*/
public enum ErrorCategoryEnum {
PLUGIN("Plugin"),
ACCESS("Access"),
DEPROVISIONING("Deprovisioning"),
NETWORKING("Networking"),
MACROS("Macros"),
OTHERS("Others"),
PLUGIN("Plugin"),
PROVISIONING("Provisioning"),
ACCESS("Access"),
SCHEDULES_AND_TRIGGERS("Schedules and Triggers"),
OTHERS("Others");
STARTING("Starting");

private final String displayName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,56 @@ public static ActionErrorPair getActionErrorByStatusCode(Integer statusCode) {
return new ActionErrorPair("Please ensure there are no network connectivity "
+ "issues between the proxy/gateway server and the upstream server or try again later.",
ErrorType.SYSTEM);
case HttpURLConnection.HTTP_PROXY_AUTH:
return new ActionErrorPair("Proxy authentication required. Please check your "
+ "proxy settings and provide valid credentials.", ErrorType.USER);
case HttpURLConnection.HTTP_NOT_ACCEPTABLE:
return new ActionErrorPair("Request cannot be processed in the requested format."
+ " Please check the Accept headers.", ErrorType.USER);
case HttpURLConnection.HTTP_GONE:
return new ActionErrorPair("Requested resource is no longer available.",
ErrorType.USER);
case HttpURLConnection.HTTP_LENGTH_REQUIRED:
return new ActionErrorPair("Content-Length header is required. "
+ "Please include it in your request.", ErrorType.USER);
case HttpURLConnection.HTTP_ENTITY_TOO_LARGE:
return new ActionErrorPair("Request entity too large. "
+ "Please reduce payload size and try again.", ErrorType.USER);
case HttpURLConnection.HTTP_REQ_TOO_LONG: // 414
return new ActionErrorPair("Request URL is too long. "
+ "Consider shortening the URL.", ErrorType.USER);
case HttpURLConnection.HTTP_UNSUPPORTED_TYPE:
return new ActionErrorPair("Unsupported media type. "
+ "Please use a supported format and try again.", ErrorType.USER);
case 416: // HTTP 416 Requested Range Not Satisfiable
return new ActionErrorPair("Requested range is not satisfiable. "
+ "Please adjust range headers and try again.", ErrorType.USER);
case 417: // HTTP 417 Expectation Failed
return new ActionErrorPair("Expectation failed. "
+ "Server cannot meet Expect header requirements.", ErrorType.USER);
case 421: // HTTP 421 Misdirected Request
return new ActionErrorPair("Request was misdirected. "
+ "Please try sending it to the correct server.", ErrorType.USER);
case 422: // HTTP 422 Unprocessable Entity
return new ActionErrorPair("Request cannot be processed due to semantic errors. "
+ "Please check the request syntax and try again.", ErrorType.USER);
case 423: // HTTP 423 Locked
return new ActionErrorPair("Resource is locked. Please try again later.",
ErrorType.USER);
case 424: // HTTP 424 Failed Dependency
return new ActionErrorPair("Request failed due to a failed dependency. "
+ "Please ensure related actions are successful.", ErrorType.USER);
case 426: // HTTP 426 Upgrade Required
return new ActionErrorPair("Upgrade required. "
+ "Please use a newer protocol version.", ErrorType.USER);
case 428: // HTTP 428 Precondition Required
return new ActionErrorPair("Request requires preconditions. "
+ "Please ensure headers are set correctly.", ErrorType.USER);
case 431: // HTTP 431 Request Header Fields Too Large
return new ActionErrorPair("Request headers are too large. "
+ "Please reduce the number or size of headers.", ErrorType.USER);
case 451: // HTTP 451 Unavailable For Legal Reasons
return new ActionErrorPair("Content is restricted due to legal reasons.", ErrorType.USER);
default:
return new ActionErrorPair(String.format("Request failed with error code: %s", statusCode),
ErrorType.UNKNOWN);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

/**
* Interface for providing failure details.
* While implementing the interface, please don't forget to add the class the in
* {io.cdap.cdap.logging.ErrorLogsClassifier#ALLOWLIST_CLASSES} list.
*/
public interface FailureDetailsProvider {

Expand Down Expand Up @@ -69,4 +71,43 @@ default ErrorCategory getErrorCategory() {
default ErrorType getErrorType() {
return ErrorType.UNKNOWN;
}

/**
* Returns whether the error is coming from a dependent service.
*
* @return true if the error is a dependency service error, false otherwise.
*/
default boolean isDependency() {
return false;
}

/**
* Returns the type of error code.
*
* @return the type of error code.
*/
@Nullable
default ErrorCodeType getErrorCodeType() {
return null;
}

/**
* Returns the error code.
*
* @return the error code.
*/
@Nullable
default String getErrorCode() {
return null;
}

/**
* Returns the URL to the documentation.
*
* @return the URL to the documentation.
*/
@Nullable
default String getSupportedDocumentationUrl() {
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,46 +70,39 @@ public String getErrorReason() {

@Override
public ErrorCategory getErrorCategory() {
if (errorCategory == null) {
return FailureDetailsProvider.super.getErrorCategory();
}
return errorCategory;
}

@Override
public ErrorType getErrorType() {
return errorType == null ? ErrorType.UNKNOWN : errorType;
if (errorType == null) {
return FailureDetailsProvider.super.getErrorType();
}
return errorType;
}

/**
* Returns whether the error is coming from a dependent service.
*
* @return true if the error is a dependency service error, false otherwise.
*/
@Override
public boolean isDependency() {
return dependency;
}

/**
* Returns the type of error code.
*
* @return the type of error code.
*/
@Nullable
@Override
public ErrorCodeType getErrorCodeType() {
return errorCodeType;
}

/**
* Returns the error code.
*
* @return the error code.
*/
@Nullable
@Override
public String getErrorCode() {
return errorCode;
}

/**
* Returns the URL to the documentation.
*
* @return the URL to the documentation.
*/
@Nullable
@Override
public String getSupportedDocumentationUrl() {
return supportedDocumentationUrl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,76 @@

package io.cdap.cdap.api.macro;

import io.cdap.cdap.api.exception.ErrorCategory;
import io.cdap.cdap.api.exception.ErrorCategory.ErrorCategoryEnum;
import io.cdap.cdap.api.exception.ErrorType;
import io.cdap.cdap.api.exception.FailureDetailsProvider;
import javax.annotation.Nullable;

/**
* Indicates that there is an invalid macro.
*/
public class InvalidMacroException extends RuntimeException {
public class InvalidMacroException extends RuntimeException implements FailureDetailsProvider {

private final ErrorCategory errorCategory;

/**
* Constructor for {@link InvalidMacroException}.
*/
public InvalidMacroException(String message) {
super(message);
this(message, null, null);
}

/**
* Constructor for {@link InvalidMacroException}.
*/
public InvalidMacroException(String message, Throwable cause) {
super(message, cause);
this(message, cause, null);
}

/**
* Constructor for {@link InvalidMacroException}.
*/
public InvalidMacroException(Throwable cause) {
super(cause);
this(cause.getMessage(), cause, null);
}

/**
* Constructor for {@link InvalidMacroException}.
*/
public InvalidMacroException(Throwable cause, ErrorCategory errorCategory) {
this(cause.getMessage(), cause, errorCategory);
}

/**
* Constructor for {@link InvalidMacroException}.
*/
public InvalidMacroException(String message, ErrorCategory errorCategory) {
this(message, null, errorCategory);
}

/**
* Constructor for {@link InvalidMacroException}.
*/
public InvalidMacroException(String message, @Nullable Throwable cause,
@Nullable ErrorCategory errorCategory) {
super(message, cause);
this.errorCategory = errorCategory;
}


@Override
public ErrorCategory getErrorCategory() {
return errorCategory == null ? new ErrorCategory(ErrorCategoryEnum.MACROS) : errorCategory;
}

@Override
public ErrorType getErrorType() {
return ErrorType.USER;
}

@Override
public String getErrorReason() {
return getMessage();
}
}
2 changes: 1 addition & 1 deletion cdap-api-spark3_2.12/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.cdap.cdap</groupId>
<artifactId>cdap</artifactId>
<version>6.11.0-SNAPSHOT</version>
<version>6.11.2-SNAPSHOT</version>
</parent>

<artifactId>cdap-api-spark3_2.12</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion cdap-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.cdap.cdap</groupId>
<artifactId>cdap</artifactId>
<version>6.11.0-SNAPSHOT</version>
<version>6.11.2-SNAPSHOT</version>
</parent>

<artifactId>cdap-api</artifactId>
Expand Down
Loading
Loading