Feature/sap hana client jar stage - #915
Merged
mayankmendix merged 15 commits intoSep 16, 2026
Merged
Conversation
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>
mayankmendix
reviewed
Sep 3, 2026
| 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" |
Contributor
There was a problem hiding this comment.
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.
mayankmendix
reviewed
Sep 3, 2026
mayankmendix
reviewed
Sep 3, 2026
| 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) |
Contributor
There was a problem hiding this comment.
shouldn't stage_hana_client be called from inside stage method, of runtime?
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>
| ], | ||
| ``` | ||
|
|
||
| #### SAP HANA JDBC Client JAR |
Contributor
There was a problem hiding this comment.
Name is as "SAP HANA Client" only.
Also in the description below.
| return os.environ.get("MXRUNTIME_IncludeSAPHanaClient", "").strip().lower() == "true" | ||
|
|
||
|
|
||
| def _get_hana_jar_version(): |
Contributor
There was a problem hiding this comment.
We do not need this as a separate method. Can be merged into stage_hana_client
| return False | ||
|
|
||
|
|
||
| _SAP_HANA_CLIENT_CDN_PREFIX = util.BLOBSTORE_BUILDPACK_DEFAULT_PREFIX + "sap-hana-client" |
Contributor
There was a problem hiding this comment.
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
force-pushed
the
feature/sap-hana-client-jar-clean
branch
from
September 16, 2026 08:35
064fa09 to
203dc55
Compare
mayankmendix
approved these changes
Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.