Skip to content

KNOX-3429: Harden source assembly to exclude build caches, runtime state, and staging dir - #1368

Merged
smolnar82 merged 1 commit into
apache:masterfrom
smolnar82:KNOX-3429
Sep 1, 2026
Merged

KNOX-3429: Harden source assembly to exclude build caches, runtime state, and staging dir#1368
smolnar82 merged 1 commit into
apache:masterfrom
smolnar82:KNOX-3429

Conversation

@smolnar82

@smolnar82 smolnar82 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

KNOX-3429 - Harden source assembly to exclude build caches, runtime state, and staging dir

What changes were proposed in this pull request?

src/assembly.xml includes ** from the repo root and excluded only target/, node_modules/, and IDE files. Since it snapshots the working tree at end-of-build, leftover artifacts get bundled into knox-<version>-src.zip - bloating it (staging then fails with svn E175002 on the dist repo) and shipping generated keystores/credentials in a source release.

Adds scoped excludes:

  • .angular/.scannerwork caches
  • candidate/** (re-bundled a previous *-src.zip)
  • install/** (full unpacked binary release (with a generated master secret) from install-test-home)
  • runtime state outside target/ (data/{security,ldap-server,deployments}, logs, *.pid)
  • and JVM crash/heap dumps.

Kept narrow (**/logs/.log not **/.log) to drop no tracked source. Safety net only - staging from a clean checkout remains recommended.

How was this patch tested?

- xmllint --noout src/assembly.xml passes.
- git ls-files confirms no new pattern matches tracked source (preserves home/data/**/README, home/logs/.gitignore, sample .log).
- Clean-checkout build already yields the correct ~38 MB zip; excludes now make a dirty tree produce the same.

Integration Tests

N/A

UI changes

N/A

…ate, and staging dirs

The source assembly includes ** from the repo root and excluded only
target/, node_modules/, and IDE files. It snapshots the working tree at
end-of-build, so leftover artifacts get bundled into knox-<version>-src.zip,
bloating it (staging PUTs then fail with svn E175002) and shipping generated
keystores/credentials in a source release.

Add scoped excludes for Angular/Sonar caches, the root-level release dirs
candidate/ (holds a previous *-src.zip) and install/ (a full unpacked binary
release with a generated master secret, from install-test-home), runtime
state generated outside target/ (data/security, data/ldap-server,
data/deployments, logs, *.pid), and JVM crash/heap dumps. Patterns verified
against git ls-files to drop no tracked source.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Test Results

 4 files   4 suites   13s ⏱️
69 tests 69 ✅ 0 💤 0 ❌
80 runs  80 ✅ 0 💤 0 ❌

Results for commit c3686c2.

@smolnar82
smolnar82 merged commit 1f5d5c0 into apache:master Sep 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants