Skip staging SAP HANA client JAR if already present in userlib or vendorlib - #916
Merged
mayankmendix merged 4 commits intoSep 21, 2026
Merged
Conversation
…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>
| 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", |
Contributor
There was a problem hiding this comment.
Parsing version is not needed. Just loggin the found file name should be enough.
|
|
||
| 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")) |
Contributor
There was a problem hiding this comment.
add a '-' in the search. Make it "ngdbc-*.jar"
- 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
approved these changes
Sep 21, 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.
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.