Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-14949: [CI][Release] Output script's stdout on failure #14957

Merged
merged 1 commit into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
- name: Install Dependencies
shell: bash
run: |
gem install test-unit
pip install cython setuptools six pytest jira
- name: Run Release Test
env:
Expand Down
11 changes: 7 additions & 4 deletions dev/release/01-prepare-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ def prepare(*targets)
def test_linux_packages
user = "Arrow Developers"
email = "[email protected]"
prepare("LINUX_PACKAGES", "DEBFULLNAME" => user, "DEBEMAIL" => email)
stdout = prepare("LINUX_PACKAGES",
"DEBFULLNAME" => user,
"DEBEMAIL" => email)
changes = parse_patch(git("log", "-n", "1", "-p"))
sampled_changes = changes.collect do |change|
{
Expand Down Expand Up @@ -91,7 +93,7 @@ def test_linux_packages
],
},
]
assert_equal(expected_changes, sampled_changes)
assert_equal(expected_changes, sampled_changes, "Output:\n#{stdout}")
end

def test_version_pre_tag
Expand Down Expand Up @@ -273,8 +275,9 @@ def test_version_pre_tag
}
end

prepare("VERSION_PRE_TAG")
stdout = prepare("VERSION_PRE_TAG")
assert_equal(expected_changes.sort_by {|diff| diff[:path]},
parse_patch(git("log", "-n", "1", "-p")))
parse_patch(git("log", "-n", "1", "-p")),
"Output:\n#{stdout}")
end
end
20 changes: 11 additions & 9 deletions dev/release/post-11-bump-versions-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def bump_versions(*targets)
else
additional_env = {}
end
env = { "BUMP_DEFAULT" => "0" }
env = {"BUMP_DEFAULT" => "0"}
targets.each do |target|
env["BUMP_#{target}"] = "1"
end
Expand Down Expand Up @@ -259,13 +259,14 @@ def test_version_post_tag
}
end

bump_versions("VERSION_POST_TAG")
stdout = bump_versions("VERSION_POST_TAG")
assert_equal(expected_changes.sort_by {|diff| diff[:path]},
parse_patch(git("log", "-n", "1", "-p")))
parse_patch(git("log", "-n", "1", "-p")),
"Output:\n#{stdout}")
end

def test_deb_package_names
bump_versions("DEB_PACKAGE_NAMES")
stdout = bump_versions("DEB_PACKAGE_NAMES")
changes = parse_patch(git("log", "-n", "1", "-p"))
sampled_changes = changes.collect do |change|
first_hunk = change[:hunks][0]
Expand Down Expand Up @@ -299,15 +300,15 @@ def test_deb_package_names
path: "dev/tasks/tasks.yml",
},
]
assert_equal(expected_changes, sampled_changes)
assert_equal(expected_changes, sampled_changes, "Output:\n#{stdout}")
end

def test_linux_packages
name = "Arrow Developers"
email = "[email protected]"
bump_versions("LINUX_PACKAGES",
"DEBFULLNAME" => name,
"DEBEMAIL" => email)
stdout = bump_versions("LINUX_PACKAGES",
"DEBFULLNAME" => name,
"DEBEMAIL" => email)

release_time_string = git("log",
"--format=%aI",
Expand Down Expand Up @@ -367,6 +368,7 @@ def test_linux_packages
},
]
assert_equal(expected_changes,
parse_patch(git("log", "-n", "1", "-p")))
parse_patch(git("log", "-n", "1", "-p")),
"Output:\n#{stdout}")
end
end