Skip to content

Skip staging SAP HANA client JAR if already present in userlib or vendorlib - #916

Merged
mayankmendix merged 4 commits into
mendix:developfrom
Pri1235:feature/sap-hana-skip-duplicate-jar
Sep 21, 2026
Merged

mayankmendix merged 4 commits into
mendix:developfrom
Pri1235:feature/sap-hana-skip-duplicate-jar

Conversation

@Pri1235

@Pri1235 Pri1235 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Checks both model/lib/userlib and model/lib/vendorlib for an existing ngdbc*.jar before downloading. The Mendix runtime scans both directories, so staging a duplicate is unnecessary.

priyal.chawda@mendix.com and others added 2 commits September 21, 2026 13:32
…dorlib

Checks both model/lib/userlib and model/lib/vendorlib for an existing
ngdbc*.jar before downloading. The Mendix runtime scans both directories,
so staging a duplicate is unnecessary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extract version from filename (ngdbc-{version}.jar) when an existing JAR
is found in userlib or vendorlib. Falls back to "unknown" if the filename
does not include a version (e.g. manually placed jar).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread buildpack/core/runtime.py Outdated
match = re.search(r"ngdbc-(.+)\.jar", os.path.basename(existing[0]))
version = match.group(1) if match else "unknown"
logging.info(
"SAP HANA client JAR version [%s] already present at [%s], skipping download",

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.

Parsing version is not needed. Just loggin the found file name should be enough.

Comment thread buildpack/core/runtime.py Outdated

model_lib = os.path.join(build_dir, "model", "lib")
for lib_dir in ("userlib", "vendorlib"):
existing = glob.glob(os.path.join(model_lib, lib_dir, "ngdbc*.jar"))

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.

add a '-' in the search. Make it "ngdbc-*.jar"

priyal.chawda@mendix.com and others added 2 commits September 21, 2026 14:47
- Use ngdbc-*.jar (with dash) in glob to avoid false matches
- Remove version parsing; log just the filename when skipping download

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mayankmendix
mayankmendix merged commit 74618d6 into mendix:develop Sep 21, 2026
26 checks passed
mayankmendix added a commit that referenced this pull request Oct 23, 2026
* added the metering code

* added logging

* added the sap metering sidecar

* updated the auth token usage

* updated the comments

* updated the env vars

* fix: update cryptography to 46.0.7 to address CVE-2026-39892

- Updated cryptography from 46.0.5 to 46.0.7
- Fixes buffer overflow vulnerability in non-contiguous buffer handling
- Regenerated requirements.txt with Python 3.10
- All unit tests passing (184 passed)
- All linting checks passing

* Bumped the cryptography module version to latest 47.0.0

* Fix CVE-2026-25645 and CVE-2026-34073 by upgrading requests and cryptography

Updated requests from 2.32.5 to 2.33.1 to address CVE-2026-25645.
Updated cryptography from 46.0.5 to 47.0.0 to address CVE-2026-34073.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Security/upgrade requests urllib3 CVE fix (#894)

* Security: Upgrade requests to 2.34.2 and urllib3 to 2.7.0

Fixes high-severity CVEs:
- CVE-2026-25645 (requests): Fixed in 2.33.0+
- GHSA-mf9v-mfxr-j63j (urllib3): Streaming API decompression issue
- GHSA-qccp-gfcp-xxvc (urllib3): Cross-origin redirect header leakage

Changes:
- requests: 2.32.5 → 2.34.2
- urllib3: 2.6.3 → 2.7.0
- charset-normalizer: 2.0.3 → 3.4.7 (transitive)
- idna: 3.10 → 3.15 (transitive)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fixes high-severity CVEs:
   - CVE-2026-25645 (requests): Fixed in 2.33.0+
   - GHSA-mf9v-mfxr-j63j (urllib3): Streaming API decompression issue
   - GHSA-qccp-gfcp-xxvc (urllib3): Cross-origin redirect header leakage

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>

* (fix) add typing extension lib (#898)

* Update requirements.txt

* Update requirements.in

* Expand static files caching (#901)

Support static files caching

* Security: Fix CVE-2026-45409 (idna) and GHSA-537c-gmf6-5ccf (cryptogr… (#902)

Security: Fix CVE-2026-45409 (idna) and GHSA-537c-gmf6-5ccf (cryptography)

Upgrades dependencies to address high-severity vulnerabilities:
- cryptography 47.0.0 → 48.0.1: Fixes vulnerable OpenSSL in wheels
- idna 3.10 → 3.15: Fixes DoS vulnerability in IDNA encoding

CVE-2026-45409: idna versions prior to 3.15 were vulnerable to DoS
attacks via specially crafted inputs to idna.encode() function.

GHSA-537c-gmf6-5ccf: cryptography wheels prior to 48.0.1 included
a statically linked copy of OpenSSL with security vulnerabilities.

* Security: Upgrade nginx from 1.26.1 to 1.30.4 to fix CVE-2025-23419 a… (#909)

Security: Upgrade nginx from 1.26.1 to 1.30.4 to fix CVE-2025-23419 and CVE-2026-42945

Co-authored-by: bhavin.shah <bhavin.shah@mendix.com>

* Fix CVE-2026-69247(cryptography)andCVE-2026-59939(httplib2) (#907)

Co-authored-by: Piyush <piyush.tiwari@mendix.com>
Co-authored-by: mayankmendix <60148863+mayankmendix@users.noreply.github.com>

* Add deprecation warning for Cloud Foundry Buildpack (#910)

Added a warning about the deprecation of the Cloud Foundry Buildpack for Mendix 12 and future Runtime versions.

* Fix PostgreSQL metrics query to filter by application database (#914)

Co-authored-by: Bhavin <bhavin.shah@mendix.com>

* Feature/sap hana client jar stage (#915)

Added SAP HANA client JAR staging support

* Skip staging SAP HANA client JAR if already present in userlib or vendorlib (#916)

Skip staging SAP HANA client JAR if already present in userlib or vendorlib

* Add RDS ap-southeast-7 support (#917)

* Add RDS ap-southeast-7 support

* Fix cert vulnerability (#920)

* Update requirements.in for certifi

* Update requirements.txt for certifi

* Update dependencies.yml for JDK patch versions

---------

Co-authored-by: bhavin.shah <bhavin.shah@mendix.com>
Co-authored-by: priyal.chawda@mendix.com <priyal.chawda@mendix.com>
Co-authored-by: Piyush <piyush.tiwari@mendix.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Bhavin Shah <162097397+bhavinshah-mendix@users.noreply.github.com>
Co-authored-by: Sanny Ramirez <sai.ramirez.umak@gmail.com>
Co-authored-by: EnasAbdelrazek <96430281+EnasAbdelrazek@users.noreply.github.com>
Co-authored-by: Bhavin Shah <162097397+bhavinshahM@users.noreply.github.com>
Co-authored-by: PiyushTiwari-LowCode <106152452+PiyushTiwari-LowCode@users.noreply.github.com>
Co-authored-by: Mário Serrador <61971372+mruiserrmendix@users.noreply.github.com>
Co-authored-by: Priyal Chawda <86288192+Pri1235@users.noreply.github.com>
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