docstr: Test that the current commit's CLI works with old server-side Ray versions.
  
  1) Create a new conda environment with old ray version X installed;
      inherits same env as current conda envionment except ray version
  2) (Server) Start head node and dashboard with old ray version X
  3) (Client) Use current commit's CLI code to do sample job submission flow
  4) Deactivate the new conda environment and back to original place
docstr_tok: ["Test","that","the","current","commit","'s","CLI","works","with","old","server-side","Ray","versions",".","1",")","Create","a","new","conda","environment","with","old","ray","version","X","installed",";","inherits","same","env","as","current","conda","envionment","except","ray","version","2",")","(","Server",")","Start","head","node","and","dashboard","with","old","ray","version","X","3",")","(","Client",")","Use","current","commit","'s","CLI","code","to","do","sample","job","submission","flow","4",")","Deactivate","the","new","conda","environment","and","back","to","original","place"]
code: def test_cli(self):
      """
      Test that the current commit's CLI works with old server-side Ray versions.
  
      1) Create a new conda environment with old ray version X installed;
          inherits same env as current conda envionment except ray version
      2) (Server) Start head node and dashboard with old ray version X
      3) (Client) Use current commit's CLI code to do sample job submission flow
      4) Deactivate the new conda environment and back to original place
      """
      # Shell script creates and cleans up tmp conda environment regardless
      # of the outcome
      env_name = f"jobs-backwards-compatibility-{uuid.uuid4().hex}"
      with conda_env(env_name):
          shell_cmd = f"{_compatibility_script_path('test_backwards_compatibility.sh')}"  # noqa: E501
  
          try:
              subprocess.check_output(
                  shell_cmd, shell=True, stderr=subprocess.STDOUT
              )
          except subprocess.CalledProcessError as e:
              logger.error(str(e))
              logger.error(e.stdout.decode())
              raise e
  
file_path: ray/python/ray/dashboard/modules/job/tests/test_backwards_compatibility.py
imports: import logging
  import pytest
  import sys
  import os
  import subprocess
  import uuid
  from contextlib import contextmanager
  from ray.job_submission import JobSubmissionClient, JobStatus
  from ray._private.test_utils import wait_for_condition
label_desc: Use image node_id 1 for calling the TestBackwardsCompatibility obj's underlying member method code with example usage: obj.test_cli() without return types