Skip to content

Feature/sap hana client jar stage - #915

Merged
mayankmendix merged 15 commits into
mendix:developfrom
Pri1235:feature/sap-hana-client-jar-clean
Sep 16, 2026
Merged

mayankmendix merged 15 commits into
mendix:developfrom
Pri1235:feature/sap-hana-client-jar-clean

Conversation

@Pri1235

@Pri1235 Pri1235 commented Sep 3, 2026

Copy link
Copy Markdown

Added SAP HANA client JAR staging to the CF Mendix buildpack — fetches ngdbc-2.29.11.jar from the Mendix CDN when INCLUDE_SAP_HANA_CLIENT is set.

priyal.chawda@mendix.com and others added 10 commits September 2, 2026 13:06
When SAP_HANA_CLIENT_ENABLED is set to a non-empty value, the buildpack
fetches ngdbc.jar from Maven Central and places it in model/lib/userlib/
so the Mendix runtime can load it via the project-userlib classpath.

SAP_HANA_CLIENT_URL can be set to override the default Maven Central URL
(e.g. to point to a CDN-hosted version or a different ngdbc version).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
If fetching the HANA client JAR fails, log a warning and continue
deployment instead of failing the staging process. Also log the
JAR filename (including version) and destination path on success.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…citly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread buildpack/core/runtime.py Outdated
version_url = util.get_blobstore_url(f"{_SAP_HANA_CLIENT_CDN_PREFIX}/version.txt")
resp = req.get(version_url, timeout=10)
resp.raise_for_status()
return f"ngdbc-{resp.text.strip()}.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.

remove the hardcoded string part to line number 84. Update this function as _get_hana_jar_version().
This way string manipulation will be in one place.

Comment thread buildpack/core/runtime.py
Comment thread buildpack/stage.py Outdated
metering.stage(BUILDPACK_DIR, BUILD_DIR, CACHE_DIR)
database.stage(BUILDPACK_DIR, BUILD_DIR)
runtime.stage(BUILDPACK_DIR, BUILD_DIR, CACHE_DIR)
runtime.stage_hana_client(BUILD_DIR)

@mayankmendix mayankmendix Sep 3, 2026

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.

shouldn't stage_hana_client be called from inside stage method, of runtime?

priyal.chawda@mendix.com and others added 3 commits September 3, 2026 21:56
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…hana_jar_version

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… prefix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread README.md Outdated
],
```

#### SAP HANA JDBC Client 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.

Name is as "SAP HANA Client" only.
Also in the description below.

Comment thread buildpack/core/runtime.py Outdated
return os.environ.get("MXRUNTIME_IncludeSAPHanaClient", "").strip().lower() == "true"


def _get_hana_jar_version():

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.

We do not need this as a separate method. Can be merged into stage_hana_client

Comment thread buildpack/core/runtime.py Outdated
return False


_SAP_HANA_CLIENT_CDN_PREFIX = util.BLOBSTORE_BUILDPACK_DEFAULT_PREFIX + "sap-hana-client"

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.

Do not need to be a global constant. Can be a local constant for method stage_hana_client

- Inline _is_sap_hana_client_enabled and _get_hana_jar_version into _stage_hana_client
- Remove module-level _SAP_HANA_CLIENT_CDN_PREFIX constant; use local variable instead
- Move requests import to top-level
- Rename README section from "SAP HANA JDBC Client JAR" to "SAP HANA Client"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Pri1235
Pri1235 force-pushed the feature/sap-hana-client-jar-clean branch from 064fa09 to 203dc55 Compare September 16, 2026 08:35
@mayankmendix mayankmendix changed the title Feature/sap hana client jar clean Feature/sap hana client jar stage Sep 16, 2026
@mayankmendix
mayankmendix merged commit 7ae5435 into mendix:develop Sep 16, 2026
26 checks passed
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