You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/12/27 13:52:58 UTC
[airflow-cancel-workflow-runs] 42/44: Revert problem with
non-iterable data.jobs sometimes.
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow-cancel-workflow-runs.git
commit 169f1694e07cdfff421539599c048cdc276e2a00
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Nov 1 18:29:19 2020 +0100
Revert problem with non-iterable data.jobs sometimes.
The data.jobs is apparently deprecated but getting rid of it
causes data not iterable sometimes. Before investigation we want to
revert that to stop failures from happening
---
dist/index.js | 2 +-
src/main.ts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dist/index.js b/dist/index.js
index 09fdb5d..a46b432 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1627,7 +1627,7 @@ function jobsMatchingNames(repositoryInfo, runId, jobNameRegexps, checkIfFailed)
try {
for (var _b = __asyncValues(repositoryInfo.octokit.paginate.iterator(listJobs)), _c; _c = yield _b.next(), !_c.done;) {
const item = _c.value;
- for (const job of item.data) {
+ for (const job of item.data.jobs) {
core.info(` The job name: ${job.name}, Conclusion: ${job.conclusion}`);
const [jobMatched, jobMatches] = matchInArray(job.name, jobNameRegexps);
if (jobMatched) {
diff --git a/src/main.ts b/src/main.ts
index 3c4eab1..7ee681b 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -228,7 +228,7 @@ async function jobsMatchingNames(
const allMatches: string[] = []
let matched = false
for await (const item of repositoryInfo.octokit.paginate.iterator(listJobs)) {
- for (const job of item.data) {
+ for (const job of item.data.jobs) {
core.info(` The job name: ${job.name}, Conclusion: ${job.conclusion}`)
const [jobMatched, jobMatches] = matchInArray(job.name, jobNameRegexps)
if (jobMatched) {