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

[CI] crc version test only works on releases #4640

Open
albfan opened this issue Feb 25, 2025 · 0 comments
Open

[CI] crc version test only works on releases #4640

albfan opened this issue Feb 25, 2025 · 0 comments
Labels
kind/bug Something isn't working

Comments

@albfan
Copy link
Contributor

albfan commented Feb 25, 2025

General information

e2e test uses a fixed version to test:

func defaultCRCVersion() string {
	return fmt.Sprintf("%s+%s", version.GetCRCVersion(), version.GetCommitSha())
}
test/e2e/testsuite/testsuite.go

while nightly override crc version each time:

if [[ -z ${CRC_VERSION+x} ]]; then 
    CRC_VERSION_PARTIAL=$(date +'%y.%m.%d')
    if [[ ! -z ${CRC_SCM_PR+x} ]]; then 
        git -C crc fetch origin pull/${CRC_SCM_PR}/head:pr-${CRC_SCM_PR}
        git -C crc checkout pr-${CRC_SCM_PR}
    else
        git -C crc checkout ${CRC_SCM_REF} 
    fi 
    # In case we build for a custom bundle we need to match the version
    # if [[ ! -z ${CUSTOM_BUNDLE_VERSION_VARIABLE+x} ]] && [[ ! -z ${CUSTOM_BUNDLE_VERSION+x} ]]; then 
    #     sed -i.bak "s/${CUSTOM_BUNDLE_VERSION_VARIABLE} ?= .*/${CUSTOM_BUNDLE_VERSION_VARIABLE} = ${CUSTOM_BUNDLE_VERSION}/g" crc/Makefile
    # fi
    sed -i.bak "s/CRC_VERSION = .*/CRC_VERSION = ${CRC_VERSION_PARTIAL}/g" crc/Makefile
else 
    git -C crc checkout "tags/v${CRC_VERSION}" -b "v${CRC_VERSION}"
fi

currently we disable crc version on nightly, but instead we might build e2e.test binary with same changes.

That would identify quickly using wrong crc version as #4629 tries to workaround

Operating System

Linux

Hypervisor

KVM

Did you run crc setup before crc start?

yes

Running on

Laptop

Steps to reproduce

  • test e2e "crc version"
  • version do not match if CRC_VERSION_PARTIAL is in use (nightly)

CRC version

CRC status

CRC config

Host Operating System

All OS

Expected behavior

e2e.test is build with same customization for version than crc

Actual behavior

e2e.test uses fixed crc version

CRC Logs

Additional context

No response

@albfan albfan added the kind/bug Something isn't working label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant