tasks/release.py
def _fetch_independent_dependency_repo_version(
    repo_name, release_json, agent_major_version, github_token, release_json_key
):
    """
    Fetches the latest tag on a given repository whose version scheme doesn't match the one used for the Agent:
    - first, we get the latest version used in release entries of the matching Agent major version
    - then, we fetch the latest version available in the repository
    - if the above two versions are different, emit a warning and ask for user confirmation before updating the version.
    """

    previous_version = _get_release_version_from_release_json(
        release_json,
        agent_major_version,
        VERSION_RE,
        release_json_key=release_json_key,
    )
    # NOTE: This assumes that the repository doesn't change the way it prefixes versions.
    version = _get_highest_repo_version(github_token, repo_name, previous_version.prefix, VERSION_RE)

    version = _confirm_independent_dependency_repo_version(repo_name, version, previous_version)
    print(TAG_FOUND_TEMPLATE.format(repo_name, version))

    return version

    Fetches the latest tag on a given repository whose version scheme doesn't match the one used for the Agent:
    - first, we get the latest version used in release entries of the matching Agent major version
    - then, we fetch the latest version available in the repository
    - if the above two versions are different, emit a warning and ask for user confirmation before updating the version.
    
Fetches the latest tag on a given repository whose version scheme doesn't match the one used for the Agent:
first, we get the latest version used in release entries of the matching Agent major version
then, we fetch the latest version available in the repository
if the above two versions are different, emit a warning and ask for user confirmation before updating the version.
Fetches the latest tag on a given repository whose version scheme doesn ' t match the one used for the Agent : first we get the latest version used in release entries of the matching Agent major version then we fetch the latest version available in the repository if the above two versions are different emit a warning and ask for user confirmation before updating the version .
def _fetch_independent_dependency_repo_version(
    repo_name, release_json, agent_major_version, github_token, release_json_key
):
    previous_version = _get_release_version_from_release_json(
        release_json,
        agent_major_version,
        VERSION_RE,
        release_json_key=release_json_key,
    )
    version = _get_highest_repo_version(github_token, repo_name, previous_version.prefix, VERSION_RE)
    version = _confirm_independent_dependency_repo_version(repo_name, version, previous_version)
    print(TAG_FOUND_TEMPLATE.format(repo_name, version))
    return version
def _fetch_independent_dependency_repo_version ( repo_name , release_json , agent_major_version , github_token , release_json_key ) : previous_version = _get_release_version_from_release_json ( release_json , agent_major_version , VERSION_RE , release_json_key = release_json_key , ) version = _get_highest_repo_version ( github_token , repo_name , previous_version . prefix , VERSION_RE ) version = _confirm_independent_dependency_repo_version ( repo_name , version , previous_version ) print ( TAG_FOUND_TEMPLATE . format ( repo_name , version ) ) return version
Fetches the latest tag on a given repository whose version scheme doesn't match the one used for the Agent:
 first, we get the latest version used in release entries of the matching Agent major version
 then, we fetch the latest version available in the repository
 if the above two versions are different, emit a warning and ask for user confirmation before updating the version.
Fetches the latest tag on a given repository whose version scheme doesn ' t match the one used for the Agent : first we get the latest version used in release entries of the matching Agent major version then we fetch the latest version available in the repository if the above two versions are different emit a warning and ask for user confirmation before updating the version .
"""
    Fetches the latest tag on a given repository whose version scheme doesn't match the one used for the Agent:
    - first, we get the latest version used in release entries of the matching Agent major version
    - then, we fetch the latest version available in the repository
    - if the above two versions are different, emit a warning and ask for user confirmation before updating the version.
    """ # NOTE: This assumes that the repository doesn't change the way it prefixes versions.
repo_name
release_json
agent_major_version
github_token
release_json_key