Skip to content

Fixes #7309 -- Implement testPlatform filter - #7599

Merged
TeddyCr merged 4 commits into
open-metadata:mainfrom
TeddyCr:issue-7309
Sep 21, 2022
Merged

TeddyCr merged 4 commits into
open-metadata:mainfrom
TeddyCr:issue-7309

Conversation

@TeddyCr

@TeddyCr TeddyCr commented Sep 20, 2022

Copy link
Copy Markdown
Collaborator

Describe your changes :

I worked on the ..... because ...

Type of change :

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Frontend Preview (Screenshots) :

For frontend related change, please link screenshots of your changes preview! Optional for backend related changes.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • All new and existing tests passed.

Reviewers

@TeddyCr
TeddyCr requested a review from a team September 20, 2022 14:26
@TeddyCr
TeddyCr temporarily deployed to cypress September 20, 2022 14:27 Inactive
@TeddyCr
TeddyCr temporarily deployed to cypress September 20, 2022 14:27 Inactive
@cypress

cypress Bot commented Sep 20, 2022 •

Copy link
Copy Markdown



Test summary

108 • 0 • 4 • 0


Run details

Project openmetadata
Status Passed
Commit fc82ae8
Started Sep 20, 2022 9:25 PM
Ended Sep 20, 2022 10:00 PM
Duration 35:14 💡
OS Linux Ubuntu - 20.04
Browser Chrome 105

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@TeddyCr TeddyCr changed the title Fixes #7309 -- Implement testPlatform filer Fixes #7309 -- Implement testPlatform filter Sep 20, 2022
@TeddyCr
TeddyCr temporarily deployed to cypress September 20, 2022 15:27 Inactive
@TeddyCr
TeddyCr temporarily deployed to cypress September 20, 2022 15:27 Inactive
@sonarqubecloud

Copy link
Copy Markdown

[open-metadata-ingestion] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarqubecloud

Copy link
Copy Markdown

[OpenMetadata-Platform] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

20.0% 20.0% Coverage
0.0% 0.0% Duplication

@TeddyCr
TeddyCr temporarily deployed to cypress September 20, 2022 21:03 Inactive
@TeddyCr
TeddyCr temporarily deployed to cypress September 20, 2022 21:03 Inactive
Comment on lines +2667 to +2686
if (entityType == null) {
String mysqlCondition =
String.format("%s AND json_extract(json, '$.testPlatforms') LIKE '%%%s%%' ", condition, testPlatform);
String psqlCondition = String.format("%s AND json->>'testPlatforms' LIKE '%%%s%%' ", condition, testPlatform);
return listBefore(getTableName(), getNameColumn(), mysqlCondition, psqlCondition, limit, before);
}

if (testPlatform == null) {
condition = String.format("%s AND entityType='%s' ", condition, entityType);
return listBefore(getTableName(), getNameColumn(), condition, condition, limit, before);
}

String mysqlCondition =
String.format(
"%s AND entityType='%s' AND json_extract(json, '$.testPlatforms') LIKE '%%%s%%' ",
condition, entityType, testPlatform);
String psqlCondition =
String.format(
"%s AND entityType='%s' AND json->>'testPlatforms' LIKE '%%%s%%' ", condition, entityType, testPlatform);
return listBefore(getTableName(), getNameColumn(), mysqlCondition, psqlCondition, limit, before);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can build the SQL query differently, and this could be applied to other methods and maybe also extracted into a separate method.

Suggested change
if (entityType == null) {
String mysqlCondition =
String.format("%s AND json_extract(json, '$.testPlatforms') LIKE '%%%s%%' ", condition, testPlatform);
String psqlCondition = String.format("%s AND json->>'testPlatforms' LIKE '%%%s%%' ", condition, testPlatform);
return listBefore(getTableName(), getNameColumn(), mysqlCondition, psqlCondition, limit, before);
}
if (testPlatform == null) {
condition = String.format("%s AND entityType='%s' ", condition, entityType);
return listBefore(getTableName(), getNameColumn(), condition, condition, limit, before);
}
String mysqlCondition =
String.format(
"%s AND entityType='%s' AND json_extract(json, '$.testPlatforms') LIKE '%%%s%%' ",
condition, entityType, testPlatform);
String psqlCondition =
String.format(
"%s AND entityType='%s' AND json->>'testPlatforms' LIKE '%%%s%%' ", condition, entityType, testPlatform);
return listBefore(getTableName(), getNameColumn(), mysqlCondition, psqlCondition, limit, before);
StringBuilder mysqlCondition = new StringBuilder();
StringBuilder psqlCondition = new StringBuilder();
if (entityType != null) {
mysqlCondition.append(String.format("%s AND json_extract(json, '$.testPlatforms') LIKE '%%%s%%' ", condition, testPlatform));
psqlCondition.append(String.format("%s AND json->>'testPlatforms' LIKE '%%%s%%' ", condition, testPlatform));
}
if (testPlatform != null) {
mysqlCondition.append(String.format("%s AND entityType='%s' ", condition, entityType));
psqlCondition.append(String.format("%s AND entityType='%s' ", condition, entityType));
}
return listBefore(getTableName(), getNameColumn(), mysqlCondition.toString(), psqlCondition.toString(), limit, before);

@TeddyCr
TeddyCr merged commit 3d7d7c8 into open-metadata:main Sep 21, 2022
yan-3005 added a commit that referenced this pull request Oct 21, 2026
Matches Collate (#7599) and ai-platform main, which already run 12.1.14.
12.1.13 is where CVE-2026-19863 (jetty-security) and the jetty-client CVEs
were fixed; 12.1.14 is the current patch on that line.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
yan-3005 added a commit that referenced this pull request Oct 21, 2026
…ort) (#35885)

* fix(security): bump logback to 1.5.38 and pin avatica-core to 1.29.0 (#34287)

- logback-core/classic 1.5.36 -> 1.5.38 clears CVE-2026-13006 (code
  execution via Janino conditional config, fixed in 1.5.37). Janino is on
  the server classpath via calcite-core.
- avatica-core pinned to 1.29.0 in dependencyManagement for CVE-2026-70410
  (unsafe reflection in AvaticaUtils#instantiatePlugin). calcite-core
  1.42.0 is the latest release and still declares 1.28.0.

Stays on logback 1.5.x on purpose: 1.6.x removed
PatternLayout.DEFAULT_CONVERTER_MAP, which Dropwizard's
LogbackAccessRequestLayout (5.0.0 through 5.0.2) reads in its static
initializer, so text request logging fails with NoSuchFieldError
(SwitchableLayoutFactoryTest reproduces it).

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit cd48072)

* fix(security): bump jetty to 12.1.13

Clears CVE-2026-19863 (jetty-security auth bypass, critical) and
CVE-2026-77711/76184 (jetty-client information exposure). Also moves the
openmetadata-service and openmetadata-mcp jetty.version overrides off
12.1.10, which still carry the 12.1.12 fixes for jetty-http,
jetty-server, jetty-ee10-annotations and jetty-websocket-core-common.

(cherry picked from commit ce99462)

* fix(security): move jetty to 12.1.14

Matches Collate (#7599) and ai-platform main, which already run 12.1.14.
12.1.13 is where CVE-2026-19863 (jetty-security) and the jetty-client CVEs
were fixed; 12.1.14 is the current patch on that line.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit 2b3696b)

---------

Co-authored-by: Harsh Vador <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: karanh37 <[email protected]>
github-actions Bot pushed a commit to aokimoon/OpenMetadata that referenced this pull request Oct 22, 2026
* fix(security): bump jetty to 12.1.13

Clears CVE-2026-19863 (jetty-security auth bypass, critical) and
CVE-2026-77711/76184 (jetty-client information exposure). Also moves the
openmetadata-service and openmetadata-mcp jetty.version overrides off
12.1.10, which still carry the 12.1.12 fixes for jetty-http,
jetty-server, jetty-ee10-annotations and jetty-websocket-core-common.

* fix(security): move jetty to 12.1.14

Matches Collate (open-metadata#7599) and ai-platform main, which already run 12.1.14.
12.1.13 is where CVE-2026-19863 (jetty-security) and the jetty-client CVEs
were fixed; 12.1.14 is the current patch on that line.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Ram Narayan Balaji <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>

This branch was previously deployed

1 inactive deployment
cypress — fc82ae81 Deployed Sep 20, 2022 by TeddyCr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants