Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GOPROXY ?= "https://proxy.golang.org,direct"
MAKEFILE_PATH = $(dir $(realpath -s $(firstword $(MAKEFILE_LIST))))
BUILD_DIR_PATH = ${MAKEFILE_PATH}/build
SUPPORTED_PLATFORMS ?= "windows/amd64,darwin/amd64,darwin/arm64,linux/amd64,linux/arm64,linux/arm"
SELECTOR_PKG_VERSION_VAR=github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector.versionID
SELECTOR_PKG_VERSION_VAR=github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector.versionID
LATEST_RELEASE_TAG=$(shell git describe --tags --abbrev=0)
PREVIOUS_RELEASE_TAG=$(shell git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)

Expand Down Expand Up @@ -85,7 +85,7 @@ sync-readme-to-dockerhub:
${MAKEFILE_PATH}/scripts/sync-readme-to-dockerhub

unit-test:
go test -bench=. ${MAKEFILE_PATH}/... -v -coverprofile=coverage.out -covermode=atomic -outputdir=${BUILD_DIR_PATH}
go test -bench=. ./... -v -coverprofile=coverage.out -covermode=atomic -outputdir=${BUILD_DIR_PATH}

## requires aws credentials
e2e-test: build
Expand Down
206 changes: 144 additions & 62 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cmd/examples/example1.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"fmt"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector"
"github.com/aws/aws-sdk-go-v2/config"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
)
Expand Down
12 changes: 6 additions & 6 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (
"syscall"
"time"

commandline "github.com/aws/amazon-ec2-instance-selector/v2/pkg/cli"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/env"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter"
commandline "github.com/aws/amazon-ec2-instance-selector/v3/pkg/cli"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/env"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector/outputs"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/sorter"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/aws/amazon-ec2-instance-selector/v2
module github.com/aws/amazon-ec2-instance-selector/v3

go 1.23

Expand Down
4 changes: 2 additions & 2 deletions pkg/bytequantity/bytequantity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/bytequantity"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
)

func TestParseToByteQuantity(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"reflect"
"strings"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/cli_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"os"
"testing"

h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
"github.com/spf13/pflag"
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"reflect"
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/cli"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/cli"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"
"strings"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/bytequantity"
"github.com/mitchellh/go-homedir"
"github.com/spf13/pflag"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"fmt"
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/bytequantity"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
)

// Tests
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"log"
"regexp"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"regexp"
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
)

// Tests
Expand Down
4 changes: 2 additions & 2 deletions pkg/ec2pricing/ec2pricing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/ec2pricing"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
"github.com/aws/aws-sdk-go-v2/service/ec2"
"github.com/aws/aws-sdk-go-v2/service/pricing"
)
Expand Down
5 changes: 3 additions & 2 deletions pkg/selector/aggregates.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package selector
import (
"context"
"fmt"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
"regexp"

"github.com/aws/amazon-ec2-instance-selector/v3/pkg/bytequantity"
"github.com/aws/aws-sdk-go-v2/service/ec2"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
"regexp"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/selector/aggregates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"context"
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
)

// Tests
Expand Down
2 changes: 1 addition & 1 deletion pkg/selector/comparators_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"math"
"testing"

h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
"github.com/aws/aws-sdk-go-v2/aws"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/selector/emr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package selector_test
import (
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
)

// Tests
Expand Down
4 changes: 2 additions & 2 deletions pkg/selector/outputs/bubbletea.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
package outputs

import (
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/sorter"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/muesli/termenv"
Expand Down
4 changes: 2 additions & 2 deletions pkg/selector/outputs/bubbletea_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"strings"
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
"github.com/evertras/bubble-table/table"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/selector/outputs/outputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strings"
"text/tabwriter"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
)

const columnTag = "column"
Expand Down
6 changes: 3 additions & 3 deletions pkg/selector/outputs/outputs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"strings"
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector/outputs"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
"github.com/aws/aws-sdk-go-v2/service/ec2"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/selector/outputs/sortingView.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"io"
"strings"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/sorter"
"github.com/charmbracelet/bubbles/key"
"github.com/charmbracelet/bubbles/list"
"github.com/charmbracelet/bubbles/textinput"
Expand Down
4 changes: 2 additions & 2 deletions pkg/selector/outputs/tableView.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"reflect"
"strings"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/sorter"
"github.com/charmbracelet/bubbles/key"
"github.com/charmbracelet/bubbles/textinput"
tea "github.com/charmbracelet/bubbletea"
Expand Down
2 changes: 1 addition & 1 deletion pkg/selector/outputs/verboseView.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"math"
"strings"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
"github.com/charmbracelet/bubbles/viewport"
tea "github.com/charmbracelet/bubbletea"
Expand Down
6 changes: 3 additions & 3 deletions pkg/selector/selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"sync"
"time"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/ec2pricing"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector/outputs"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/service/ec2"
Expand Down
10 changes: 5 additions & 5 deletions pkg/selector/selector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"strconv"
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/awsapi"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/awsapi"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/ec2"
Expand Down
4 changes: 2 additions & 2 deletions pkg/selector/services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package selector_test
import (
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
"github.com/aws/aws-sdk-go-v2/aws"
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/selector/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import (
"log"
"regexp"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/awsapi"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/awsapi"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/bytequantity"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/ec2pricing"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
)

// InstanceTypesOutput can be implemented to provide custom output to instance type results
Expand Down
4 changes: 2 additions & 2 deletions pkg/selector/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"strings"
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/sorter/sorter.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"sort"
"strings"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
"github.com/oliveagle/jsonpath"
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/sorter/sorter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"strings"
"testing"

"github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs"
"github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter"
h "github.com/aws/amazon-ec2-instance-selector/v2/pkg/test"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/instancetypes"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector/outputs"
"github.com/aws/amazon-ec2-instance-selector/v3/pkg/sorter"
h "github.com/aws/amazon-ec2-instance-selector/v3/pkg/test"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions test/readme-test/run-readme-codeblocks
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ interpreters=($(echo $rundoc_output | jq -r '.code_blocks[] | .interpreter'))

## Execute --help check which compares the help codeblock in the README to the actual output of the binary
rd list-blocks -T "bash#help" /aeis/README.md | jq -r '.code_blocks[0] .code' > $BUILD_DIR/readme_help.out
docker run -t --rm codeblocks build/ec2-instance-selector --help > $BUILD_DIR/actual_help.out
diff --ignore-all-space --ignore-blank-lines "$BUILD_DIR/actual_help.out" "$BUILD_DIR/readme_help.out"
docker run -t --rm codeblocks build/ec2-instance-selector --help | perl -pe 's/\e\[?.*?[a-zA-Z]//g' > $BUILD_DIR/actual_help.out
diff --ignore-all-space --ignore-blank-lines --ignore-trailing-space "$BUILD_DIR/actual_help.out" "$BUILD_DIR/readme_help.out"
echo "✅ README help section matches actual binary output!"

## Execute go codeblocks example tests which checks the go codeblocks in the readme with a source file path
Expand All @@ -35,7 +35,7 @@ for i in "${!example_files[@]}"; do
example_file="${example_files[$i]}"
example_bin=$(echo $example_file | cut -d'.' -f1)
mkdir -p $BUILD_DIR/examples
docker run -i -e GOOS=$OS -e GOARCH=amd64 -v $BUILD_DIR:/amazon-ec2-instance-selector/build --rm codeblocks go build -o build/examples/$example_bin $example_file
docker run -i -e GOOS=$OS -e GOARCH=amd64 -e CGO_ENABLED=0 -v $BUILD_DIR:/amazon-ec2-instance-selector/build --rm codeblocks go build -o build/examples/$example_bin $example_file
$BUILD_DIR/examples/$example_bin
echo "✅ $example_file Executed Successfully!"
fi
Expand Down
Loading