[PR #503] [MERGED] Fix Cartesian product to return empty set if empty set is given #1474

Closed
opened 2026-03-01 21:51:20 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/503
Author: @edtan
Created: 1/23/2021
Status: Merged
Merged: 1/23/2021
Merged by: @cplee

Base: masterHead: fix-cartesian-product-empty-set


📝 Commits (1)

  • 27709f8 Fix Cartesian product to return empty set if empty set is given

📊 Changes

2 files changed (+13 additions, -1 deletions)

View changed files

📝 pkg/common/cartesian.go (+1 -1)
📝 pkg/common/cartesian_test.go (+12 -0)

📄 Description

This fixes #499, where a matrix strategy with only include keys ends up
causing multiple builds. This bug appears to have been introduced in #415,
when extra include keys are added in the matrix strategy. The cause
seems to be because the CartesianProduct function returns an item with
empty keys, instead of returning an empty set, when given an empty set.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/503 **Author:** [@edtan](https://github.com/edtan) **Created:** 1/23/2021 **Status:** ✅ Merged **Merged:** 1/23/2021 **Merged by:** [@cplee](https://github.com/cplee) **Base:** `master` ← **Head:** `fix-cartesian-product-empty-set` --- ### 📝 Commits (1) - [`27709f8`](https://github.com/nektos/act/commit/27709f8c0ce5c86a7bb275defef255ee80e643a9) Fix Cartesian product to return empty set if empty set is given ### 📊 Changes **2 files changed** (+13 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pkg/common/cartesian.go` (+1 -1) 📝 `pkg/common/cartesian_test.go` (+12 -0) </details> ### 📄 Description This fixes #499, where a matrix strategy with only `include` keys ends up causing multiple builds. This bug appears to have been introduced in #415, when extra `include` keys are added in the matrix strategy. The cause seems to be because the CartesianProduct function returns an item with empty keys, instead of returning an empty set, when given an empty set. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:51:20 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1474
No description provided.