playwright-slack-report-burak 3.0.13 → 3.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -42,6 +42,16 @@ class ResultsParser {
|
|
|
42
42
|
console.log(`🔍 Calculated shardIndex: ${this.shardIndex}`);
|
|
43
43
|
console.log(`🔍 Calculated totalShardCount: ${this.totalShardCount}`);
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Update shard information after detection (e.g., from GitHub API)
|
|
47
|
+
* @param {number} shardIndex - The current shard index (0-based)
|
|
48
|
+
* @param {number} totalShardCount - The total number of shards
|
|
49
|
+
*/
|
|
50
|
+
updateShardInfo(shardIndex, totalShardCount) {
|
|
51
|
+
this.shardIndex = shardIndex;
|
|
52
|
+
this.totalShardCount = totalShardCount;
|
|
53
|
+
console.log(`🔍 [ResultsParser] Updated shard info: shardIndex=${this.shardIndex}, totalShardCount=${this.totalShardCount}`);
|
|
54
|
+
}
|
|
45
55
|
async getParsedResults() {
|
|
46
56
|
const summary = {
|
|
47
57
|
total: 0,
|
|
@@ -400,6 +400,10 @@ class SlackReporter {
|
|
|
400
400
|
this.log(`🔍 shardIndexNum (number): ${shardIndexNum}`);
|
|
401
401
|
this.log(`🔍 totalShards: ${totalShards}`);
|
|
402
402
|
|
|
403
|
+
// CRITICAL: Update ResultsParser with detected shard values immediately after detection
|
|
404
|
+
// This ensures ResultsParser always has correct values, even if we block posting
|
|
405
|
+
this.resultsParser.updateShardInfo(shardIndexNum, totalShards);
|
|
406
|
+
|
|
403
407
|
// CRITICAL: For GitHub Actions with multiple shards, only shard 0 should post
|
|
404
408
|
// If we're in CI with multiple shards and don't know which shard we are, block all posts
|
|
405
409
|
// This prevents duplicate messages when MATRIX_SHARD/MATRIX_INDEX is not set
|
package/package.json
CHANGED