Uploaded image for project: 'IT: Release Engineering'
  1. IT: Release Engineering
  2. RELENG-4403

pyenv version is going back and forth between 3.9.1 & 3.8.7

Issue XMLXMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      pyenv version is going back and forth between 3.9.1 & 3.8.7 :
      ---> Setting up pyenv
        system
        3.5.10
        3.6.13
        3.7.10
        3.8.7
      * 3.9.1 (set by /w/workspace/bgpcep-csit-1node-bgp-ingest-all-sulfur/.python-version)
      And later it becomes:
      ---> Setting up pyenv
        system
        3.5.10
        3.6.13
        3.7.10
      * 3.8.7 (set by /w/workspace/bgpcep-csit-1node-bgp-ingest-all-sulfur/.python-version)
        3.9.1
      Seems the version currently selected is removed from the available versions and not selected again.
       
      Issue seems to be this:
      pyenv versions | sed 's/[[:alpha:]|(|)|/||*|[:space:]]//g'| tr -d ' ' \
              > "/tmp/.pyenv_versions"
      For example, for this pyenv version output
        system
        3.5.10
        3.6.13
        3.7.10
        3.8.7
      * 3.9.1 (set by /w/workspace/bgpcep-csit-1node-bgp-ingest-all-sulfur/.python-version)
      It becomes like this after sed:
      3.5.10
      3.6.13
      3.7.10
      3.8.7
      3.9.1--1----.-
      And then this grep excludes 3.9.1--1----.-:
      py_version_xyz=$(grep "^${py_version_xy//[a-zA-Z]/}\(\..*\)\?\.[0-9]\+$" \
              "/tmp/.pyenv_versions" | sort -V | tail -n 1;)
      So,  3.9.1 is not selected again, hence going back and forth between 3.8.7 & 3.9.1
       

              askb Anil Belur
              askb Anil Belur
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: