Skip to content

ecctl does not sort stack versions correctly #427

Description

@ckauf

Readiness Checklist

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I am reporting the issue to the correct repository (for multi-repository projects)

Expected Behavior

When a deployment with ecctl is created it should select the newest version available, as stated in the documentation:

When version is not specified, the latest available stack version will automatically be used.

Current Behavior

Currently ecctl considers 7.9 newer then 7.10.

Possible Solution

Sort the newest version on top

Steps to Reproduce

  1. Upload a Stack Pack for 7.10 and 7.9 to ECE
  2. List deployments, notice 7.9 is sorted above 7.10
  3. Create deployment without version parameter. ecctl will pick 7.9
$ ecctl stack list
VERSION   DELETED   ELASTICSEARCH IMAGE                                     KIBANA IMAGE                                     APM IMAGE
7.9.3     false     docker.elastic.co/cloud-assets/elasticsearch:7.9.3-0    docker.elastic.co/cloud-assets/kibana:7.9.3-0    docker.elastic.co/cloud-assets/apm:7.9.3-0
7.10.1    false     docker.elastic.co/cloud-assets/elasticsearch:7.10.1-0   docker.elastic.co/cloud-assets/kibana:7.10.1-0   docker.elastic.co/cloud-assets/apm:7.10.1-0
6.8.13    false     docker.elastic.co/cloud-assets/elasticsearch:6.8.13-0   docker.elastic.co/cloud-assets/kibana:6.8.13-0   docker.elastic.co/cloud-assets/apm:6.8.13-0

$ ecctl deployment create
Obtained latest stack version: 7.9.3
{
  "created": true,
  "id": "f826922063d2bd35a6678f6531843f01",
  "name": "f826922063d2bd35a6678f6531843f01",
  [...]
}

Your Environment

  • Version used: 1.1.0 installed via RPM

Activity

  1. karencfv commented on Jan 20, 2021

    @karencfv
    Contributor

    Thanks for opening an issue @ckauf :)

    This bug originated in our SDK and has been fixed. We have already imported the SDK version with the fix for the next release.

    In the mean time you can build ecctl from source following these instructions.

  2. karencfv commented on Jan 26, 2021

    @karencfv
    Contributor

    I will close this issue as the fix has already been merged.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions