Skip to content

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

Open
@albfan

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions