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

Tests - Cluster Logging Capture #95

Open
GeekSheikh opened this issue Apr 5, 2021 · 0 comments
Open

Tests - Cluster Logging Capture #95

GeekSheikh opened this issue Apr 5, 2021 · 0 comments
Labels
Testing Tests Needed Or Part of Testing Suite

Comments

@GeekSheikh
Copy link
Contributor

Let's ensure that all clusters with logging enabled are captured. The cluster_id must be found for all scenarios.

Code to validate is here.

val incrementalClusterBase = df
.selectExpr("*", "requestParams.*").drop("requestParams")
.filter('serviceName === "clusters" && 'actionName.isin("create", "edit"))
.withColumn("cluster_id", when('actionName === "create", get_json_object($"response.result", "$.cluster_id"))
.when('actionName =!= "create" && 'cluster_id.isNull, 'clusterId)
.otherwise('cluster_id).alias("cluster_id")
)
.select('organization_id, 'timestamp, 'cluster_id, 'cluster_name, 'cluster_log_conf)
// Get incremental snapshot of clusters during current run
// This captures clusters that have not been edited/restarted (still not terminated) since the last run with
// log confs as they will not be in the audit logs
val latestSnapW = Window.partitionBy('organization_id).orderBy('Pipeline_SnapTS.desc)
val currentlyDefinedClustersWithLogging = clusterSnapshot.asDF
.withColumn("snapRnk", rank.over(latestSnapW))
.filter('snapRnk === 1)
.withColumn("cluster_log_conf", to_json('cluster_log_conf))
.filter('cluster_id.isNotNull && 'cluster_log_conf.isNotNull)
.select('cluster_id, 'cluster_log_conf)

@GeekSheikh GeekSheikh added the Testing Tests Needed Or Part of Testing Suite label Apr 5, 2021
@GeekSheikh GeekSheikh added this to the 0.6.1.2 milestone May 11, 2022
@GeekSheikh GeekSheikh modified the milestones: 0.7.0.1, 0.7.0.2 Dec 1, 2022
@GeekSheikh GeekSheikh modified the milestones: 0.7.1.1, 0.7.1.2 Feb 13, 2023
@GeekSheikh GeekSheikh modified the milestones: 0.7.1.2, 0.7.2.0 Mar 1, 2023
@GeekSheikh GeekSheikh self-assigned this Mar 14, 2023
@GeekSheikh GeekSheikh modified the milestones: 0.7.2.0, 0.7.2.1 Apr 21, 2023
@GeekSheikh GeekSheikh modified the milestones: 0.7.2.1, 0.7.3.0 Jun 9, 2023
@gueniai gueniai modified the milestones: 0.7.3.0, backlog Aug 10, 2023
@gueniai gueniai removed this from the backlog milestone Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Tests Needed Or Part of Testing Suite
Projects
None yet
Development

No branches or pull requests

4 participants