You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/06/18 17:46:12 UTC
(superset) 01/01: fix(embedded-sdk): surface npm publish stderr in release script
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch fix/embedded-sdk-release-error-logging
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 61ba59ebf992c11cbcff0752396cc9a68f3a49ee
Author: Evan Rusackas <ev...@rusackas.com>
AuthorDate: Thu Jun 18 10:45:56 2026 -0700
fix(embedded-sdk): surface npm publish stderr in release script
The release-if-necessary.js catch block only printed err.stdout, but
npm publish writes its real failure details (auth/permission/registry
errors) to stderr. When the publish path actually ran after the 0.4.0
version bump (#40991), CI logs showed only "Encountered an error,
details should be above" with nothing above it, masking the real cause.
Print stderr as well so the actual npm error is visible in CI.
Co-Authored-By: Claude Opus 4.8 <no...@anthropic.com>
---
superset-embedded-sdk/release-if-necessary.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/superset-embedded-sdk/release-if-necessary.js b/superset-embedded-sdk/release-if-necessary.js
index 83196ad821d..69878b8a46c 100644
--- a/superset-embedded-sdk/release-if-necessary.js
+++ b/superset-embedded-sdk/release-if-necessary.js
@@ -47,7 +47,11 @@ function logError(...args) {
execSync('npm publish --access public', { stdio: 'pipe' });
log(`published ${version} to npm`);
} catch (err) {
- console.error(String(err.stdout));
+ // npm writes failure details to stderr (auth/permission/registry
+ // errors in particular), so surface both streams to avoid masking
+ // the real cause in CI logs.
+ if (err.stdout) console.error(String(err.stdout));
+ if (err.stderr) console.error(String(err.stderr));
logError('Encountered an error, details should be above');
process.exitCode = 1;
}