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

Ed's pet PR with no flake retries #17831

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
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
16 changes: 16 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ alt_build_task:
only_if: &no_rhel_release |
$CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
$CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
skip: $CI == $CI
env:
<<: *stdenvars
TEST_FLAVOR: "altbuild"
Expand Down Expand Up @@ -265,6 +266,7 @@ osx_alt_build_task:
alias: osx_alt_build
# Docs: ./contrib/cirrus/CIModes.md
only_if: *no_rhel_release # RHEL never releases podman mac installer binary
skip: $CI == $CI
persistent_worker: &mac_pw
labels:
os: darwin
Expand Down Expand Up @@ -377,6 +379,7 @@ bindings_task:
changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'test/registries*.conf', 'hack/**', 'version/rawversion/*') ||
changesInclude('pkg/bindings/test/**') ||
(changesInclude('**/*.go', '**/*.c', '**/*.h') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**'))
skip: $CI == $CI
depends_on: &build
- build_success
gce_instance: *standardvm
Expand Down Expand Up @@ -412,6 +415,7 @@ bindings_task:
swagger_task:
name: "Test Swagger"
alias: swagger
skip: $CI == $CI
depends_on: *build
gce_instance: *standardvm
env:
Expand Down Expand Up @@ -443,6 +447,7 @@ win_installer_task:
$CIRRUS_TAG == '' &&
$CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
$CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
skip: $CI == $CI
depends_on: *build
ec2_instance: &windows
image: "${WINDOWS_AMI}"
Expand Down Expand Up @@ -504,6 +509,7 @@ docker-py_test_task:
changesInclude('test/python/**') ||
(changesInclude('**/*.go', '**/*.c', '**/*.h') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**'))
depends_on: *build
skip: $CI == $CI
gce_instance: *standardvm
env:
<<: *stdenvars
Expand All @@ -530,6 +536,7 @@ unit_test_task:
changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'test/registries*.conf', 'hack/**', 'version/rawversion/*') ||
changesInclude('**/*_test.go') ||
(changesInclude('**/*.go', '**/*.c', '**/*.h') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**'))
skip: $CI == $CI
depends_on: *build
matrix:
- env: *stdenvars
Expand Down Expand Up @@ -560,6 +567,7 @@ apiv2_test_task:
changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'test/registries*.conf', 'hack/**', 'version/rawversion/*') ||
changesInclude('test/apiv2/**', 'test/python/**') ||
(changesInclude('**/*.go', '**/*.c', '**/*.h') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**'))
skip: $CI == $CI
depends_on: *build
gce_instance: *standardvm
# Test is normally pretty quick, about 10-minutes. If it hangs,
Expand Down Expand Up @@ -592,6 +600,7 @@ compose_test_task:
changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'test/registries*.conf', 'hack/**', 'version/rawversion/*') ||
changesInclude('test/compose/**') ||
(changesInclude('**/*.go', '**/*.c', '**/*.h') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**'))
skip: $CI == $CI
depends_on: *build
gce_instance: *standardvm
matrix:
Expand Down Expand Up @@ -738,6 +747,7 @@ podman_machine_aarch64_task:
name: *std_name_fmt
alias: podman_machine_aarch64
only_if: *only_if_machine_test
skip: $CI == $CI
depends_on: *build
ec2_instance:
<<: *standard_build_ec2_aarch64
Expand All @@ -762,6 +772,7 @@ podman_machine_windows_task:
alias: podman_machine_windows
# Docs: ./contrib/cirrus/CIModes.md
only_if: *only_if_machine_test
skip: $CI == $CI
depends_on: *build
ec2_instance:
<<: *windows
Expand All @@ -786,6 +797,7 @@ podman_machine_mac_task:
name: *std_name_fmt
alias: podman_machine_mac
only_if: *only_if_machine_test
skip: $CI == $CI
depends_on: *build
persistent_worker: *mac_pw
env:
Expand Down Expand Up @@ -846,6 +858,7 @@ local_system_test_task: &local_system_test_task
gce_instance: *standardvm
env:
TEST_FLAVOR: sys
timeout_in: 45m
clone_script: *get_gosrc
setup_script: *setup
main_script: *main
Expand All @@ -864,6 +877,7 @@ local_system_test_aarch64_task: &local_system_test_task_aarch64
<<: *stdenvars_aarch64
TEST_FLAVOR: sys
DISTRO_NV: ${FEDORA_AARCH64_NAME}
timeout_in: 45m
clone_script: *get_gosrc_aarch64
setup_script: *setup
main_script: *main
Expand Down Expand Up @@ -914,6 +928,7 @@ rootless_system_test_task:
env:
TEST_FLAVOR: sys
PRIV_NAME: rootless
timeout_in: 45m
clone_script: *get_gosrc
setup_script: *setup
main_script: *main
Expand Down Expand Up @@ -956,6 +971,7 @@ buildah_bud_test_task:
$CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' ||
changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'test/registries*.conf', 'hack/**', 'version/rawversion/*') ||
changesInclude('**/*build*.go', 'test/buildah-bud/**')
skip: $CI == $CI
depends_on: *build
env:
<<: *stdenvars
Expand Down
122 changes: 0 additions & 122 deletions .packit.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ GINKGO ?= ./test/tools/build/ginkgo
GINKGO_JSON ?= $(if $(CI),--json-report ginkgo-e2e.json,)

# Allow control over some Ginkgo parameters
GINKGO_FLAKE_ATTEMPTS ?= 3
GINKGO_FLAKE_ATTEMPTS ?= 0
GINKGO_NO_COLOR ?= y

# Conditional required to produce empty-output if binary not built yet.
Expand Down
7 changes: 4 additions & 3 deletions contrib/cirrus/logformatter
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,10 @@ END_HTML
}

# Readability: /long/path/to/podman -> podman (hover for full path)
# Also make it boldface, to make commands stand out
$line =~ s{^(#\s+(#|\$)\s+)(\S+/)(podman\S*)(\s.*)}
{$1<b><span title="$3$4">$4</span>$5</b>};
# Also make it boldface, to make commands stand out, and strip --url
# 1 2 2 13 345 56 6 47 7
$line =~ s{^(#\s+(#|\$)\s+)(\S+/)((podman\S*)(\s+--url\s+\S+)?)(\s.*)}
{$1<b><span title="$3$4">$5</span>$7</b>};

if ($line =~ /^ok\s.*\s# skip/) { $css = 'skipped' }
elsif ($line =~ /^ok\s/) { $css = 'passed' }
Expand Down
2 changes: 2 additions & 0 deletions contrib/cirrus/logformatter.t
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ not ok 3 fail
# (from function `assert' in file ./helpers.bash, line 343,
# from function `expect_output' in file ./helpers.bash, line 370,
# in test file ./run.bats, line 786)
# $ /path/to/podman-remote --url /this/should/be-stripped blah blah
# $ /path/to/podman foo -bar
# time="2023-01-05T15:15:20Z" level=debug msg="this is debug"
# time="2023-01-05T15:15:20Z" level=warning msg="this is warning"
Expand All @@ -109,6 +110,7 @@ ok 4 blah
<span class='bats-log'># (from function `assert&#39; in file ./<a class="codelink" href="https://github.com/containers/podman/blob/ceci-nest-pas-une-sha/test/system/helpers.bash#L343">helpers.bash, line 343</a>,</span>
<span class='bats-log'># from function `expect_output&#39; in file ./<a class="codelink" href="https://github.com/containers/podman/blob/ceci-nest-pas-une-sha/test/system/helpers.bash#L370">helpers.bash, line 370</a>,</span>
<span class='bats-log'># in test file ./<a class="codelink" href="https://github.com/containers/podman/blob/ceci-nest-pas-une-sha/test/system/run.bats#L786">run.bats, line 786</a>)</span>
<span class='bats-log'># $ <b><span title="/path/to/podman-remote --url /this/should/be-stripped">podman-remote</span> blah blah</b></span>
<span class='bats-log'># $ <b><span title="/path/to/podman">podman</span> foo -bar</b></span>
<span class='bats-log'># time=<span class='log-debug'>&quot;2023-01-05T15:15:20Z&quot;</span> level=<span class='log-debug'>debug</span> msg=<span class='log-debug'>&quot;this is debug&quot;</span></span>
<span class='bats-log'># time=<span class='log-warning'>&quot;2023-01-05T15:15:20Z&quot;</span> level=<span class='log-warning'>warning</span> msg=<span class='log-warning'>&quot;this is warning&quot;</span></span>
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/blang/semver/v4 v4.0.0
github.com/buger/goterm v1.0.4
github.com/checkpoint-restore/checkpointctl v1.2.1
github.com/checkpoint-restore/go-criu/v7 v7.1.0
github.com/checkpoint-restore/go-criu/v7 v7.1.1-0.20240728160228-a9064d7e053c
github.com/containernetworking/plugins v1.5.1
github.com/containers/buildah v1.37.0
github.com/containers/common v0.60.1-0.20240808214705-d93f74f43223
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/checkpoint-restore/checkpointctl v1.2.1 h1:aYFl2CEk95bPLDvNDgif4ZLx3pjCZMJm6td+A0X1+xs=
github.com/checkpoint-restore/checkpointctl v1.2.1/go.mod h1:8oF+AtNUFJAI13ETcbB3clnjiwvviX0QzVBhYzQ8yBA=
github.com/checkpoint-restore/go-criu/v7 v7.1.0 h1:JbQyO4o+P8ycNTMLPiiDqXg49bAcy4WljWCzYQho35A=
github.com/checkpoint-restore/go-criu/v7 v7.1.0/go.mod h1:1svAtmbtvX4BKI45OFzgoTTLG7oYFKdColv/Vcsb2A8=
github.com/checkpoint-restore/go-criu/v7 v7.1.1-0.20240728160228-a9064d7e053c h1:/LNWuEZICKO96wvlLRam53lp7inbzwR1zE/YuoUUV/k=
github.com/checkpoint-restore/go-criu/v7 v7.1.1-0.20240728160228-a9064d7e053c/go.mod h1:FTB8VSlcpwignNNaAXXzNlKBIf+DcZw8urnXKCkpeB4=
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0=
Expand Down
17 changes: 15 additions & 2 deletions libpod/logs/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ func GetLogFile(path string, options *LogOptions) (*tail.Tail, []*LogLine, error
return t, logTail, err
}

func printFileToStderr(path string) {
f, err := os.Open(path)
if err != nil {
logrus.Errorf("failed to read file: %v", err)
}
_, err = io.Copy(os.Stderr, f)
if err != nil {
logrus.Errorf("failed to print file: %v", err)
}
}

func getTailLog(path string, tail int) ([]*LogLine, error) {
var (
nllCounter int
Expand Down Expand Up @@ -120,7 +131,8 @@ func getTailLog(path string, tail int) ([]*LogLine, error) {
}
nll, err := NewLogLine(lines[i])
if err != nil {
return nil, err
printFileToStderr(path)
return nil, fmt.Errorf("parse log line: %w", err)
}
if !nll.Partial() || first {
nllCounter++
Expand All @@ -146,7 +158,8 @@ func getTailLog(path string, tail int) ([]*LogLine, error) {
if leftover != "" && nllCounter < tail {
nll, err := NewLogLine(leftover)
if err != nil {
return nil, err
printFileToStderr(path)
return nil, fmt.Errorf("parse leftover log line: %w", err)
}
tailLog = append(tailLog, nll)
}
Expand Down
4 changes: 4 additions & 0 deletions test/e2e/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,10 @@ RUN ls /dev/test1`, CITEST_IMAGE)
session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly())

// 2023-06-21 ESM FIXME
ls := SystemExec("bash", []string{"-c", fmt.Sprintf("find %s/events -type f | while read f;do echo;ls -l $f;cat $f;done", tempdir)})
ls.WaitWithDefaultTimeout()

session = podmanTest.Podman([]string{"system", "reset", "-f"})
session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly())
Expand Down
1 change: 1 addition & 0 deletions vendor/github.com/checkpoint-restore/go-criu/v7/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions vendor/github.com/checkpoint-restore/go-criu/v7/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading