Skip to content

Commit b40427d

Browse files
JelledbtfelixJohannesRudolphdmurtic
committed
Feature/release 0.5.0 (#95)
* feat: Add tutorial links directly in README. (#52) * feat: Add tutorial links directly in README. * And removed GitOps section, which is not supported yet. * Update README.md * Update README.md Added a different caption * feat: Avoid cli setup checks when not required (#68) * feat: Avoid cli setup checks when not required In order to optimize startup time, especially when only issuing a non cloud-cli required command, collie now only checks cloud cli configuration when required. * fix: setup logger before running commands and await it not awaiting the logger configuration can cause loosing logs * feat: run cli checks concurrently see discussion in #68 * feat: add debug logs to ShellRunner for every command * style: deno fmt Co-authored-by: Johannes Rudolph <[email protected]> * Feature/issue 56 (#71) * feat: detect installed cli versions match expectations if not, give installation hints via collie readme. fixes #56 * fix: handle GCP projects with empty IAM policies (#80) fixes #67 * fix: use azure subscription id instead of name to prevent word-splitting (#79) fixes #76 * Feature/cache statistics (#78) * refactor: generate entries summary generically for all platforms * feat: add query statistics to tty table output This lets users know whether results are served from cache or if they're queried from the cloud. At the moment only "tenant list" command supports this. Fixes #72 * feat: add query statistics to all tenant commands Fixes #72 * refactor: extract QueryStatistics class into its own module * test: add a tests for query statistics * feat: slightly tweak the query stats message. * feat: correctly print cache and cloud query statistics for hybrid query hybrid queries can occur when e.g. running - collie tenant list -> partially fills the tenant cache - collie tenant iam -> uses tenants from cache, adds IAM info * refactor: Uses OOP patterns Simplifies the statistics decorator to be less intrusive. Co-authored-by: Thomas Felix <[email protected]> * Update issue templates * Update issue templates * fix: Spinner animation overwrites error message (#85) Improves the spinner animation termination to avoid part of the error message writing into the spinner animation text. * feat: Tags are shown in table cost view (#90) * fix: Fix costs / IAM missing in cached tenants. (#91) * Feature/add windows support (#87) * feat: add windows support for collie * feat: add windows binary to releases * fix: differentiation in posix and win32 path * fix: Replaces var with let * Fixed issue found while testing Windows * Added global `isWindows` var for consistency Co-authored-by: Thomas Felix <[email protected]> Co-authored-by: Jelle den Burger <[email protected]> * Bump version to 0.5.0 Co-authored-by: Thomas Felix <[email protected]> Co-authored-by: Johannes Rudolph <[email protected]> Co-authored-by: Thomas Felix <[email protected]> Co-authored-by: Dennis Murtic <[email protected]>
1 parent f46fa55 commit b40427d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+562
-141
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Bug report
3+
about: Create a bug report to help us improve Collie CLI
4+
title: ''
5+
labels: bug
6+
assignees: Jelledb, tfelix
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**Reach of the bug**
14+
Who is impacted by the bug? All users of Collie? Only a subset, e.g. only AWS users?
15+
16+
**Impact of the bug**
17+
What is the bug preventing users from doing? How are they impacted?
18+
19+
**To Reproduce**
20+
Steps to reproduce the behavior:
21+
1. Run `az logout`.
22+
2. Run `collie tenant list`.
23+
3. An error is thrown.
24+
25+
**Expected behavior**
26+
A clear and concise description of what you expected to happen.
27+
28+
**Screenshots**
29+
If applicable, add screenshots to help explain your problem.
30+
31+
**Desktop (please complete the following information):**
32+
- OS: [e.g. Mac OS X]
33+
- Version [e.g. v0.4.0]
34+
35+
(optional) **Implementation Hints**
36+
Do you have any ideas on how to solve the problem? A particular code file to check out? A solution pattern proposal?
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea that can improve Collie CLI
4+
title: ''
5+
labels: idea
6+
assignees: Jelledb, tfelix
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Reach of the feature request**
14+
Who else has this problem?
15+
16+
**Impact of the feature request**
17+
What are you (and others) not able to do? How are you impacted by the problem?
18+
19+
**How would a solution look like?**
20+
What do you expect the solution to be to solve your problem? (attaching mockups or prototypes is helpful!)
21+
22+
(optional) **Implementation Hints**
23+
Any hints that could help implementation?

.github/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ curl -sf -L https://raw.githubusercontent.com/meshcloud/collie-cli/main/install.
108108

109109
**Windows**
110110

111-
We sadly do not support Windows at the moment. Follow
112-
[this issue](https://github.com/meshcloud/collie-cli/issues/2) to get updated on
113-
the progress of Collie for Windows.
111+
Simply copy the content of [`install.ps1`](https://github.com/meshcloud/collie-cli/blob/develop/install.ps1) and run it in your PowerShell console.
114112

115113
## 👋 Need help or have feedback?
116114

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ jobs:
7676
with:
7777
name: collie
7878
path: |
79-
bin/collie-*
79+
bin/**/collie-*

.github/workflows/releases.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ jobs:
5555
event: push
5656
path: bin/
5757

58-
- name: zip-artifacts
58+
- name: preparing-artifacts
5959
shell: bash
6060
run: |
61-
mkdir bin/gz
62-
cd bin/collie
63-
tar -czvf ../gz/collie-x86_64-apple-darwin.tar.gz collie-x86_64-apple-darwin
64-
tar -czvf ../gz/collie-x86_64-unknown-linux-gnu.tar.gz collie-x86_64-unknown-linux-gnu
61+
mkdir bin/artifacts
62+
cd bin/collie/unix
63+
tar -czvf ../../artifacts/collie-x86_64-apple-darwin.tar.gz collie-x86_64-apple-darwin
64+
tar -czvf ../../artifacts/collie-x86_64-unknown-linux-gnu.tar.gz collie-x86_64-unknown-linux-gnu
65+
cd ../../..
66+
cp -a bin/collie/windows/. bin/artifacts
6567
6668
- name: build-changelog
6769
id: build_changelog
@@ -75,7 +77,7 @@ jobs:
7577
- name: create-release
7678
uses: ncipollo/release-action@v1
7779
with:
78-
artifacts: bin/gz/*
80+
artifacts: bin/artifacts/*
7981
body: ${{ steps.github_release.outputs.changelog }}
8082
token: ${{ secrets.GITHUB_TOKEN }}
8183
tag: ${{ steps.version.outputs.version }}

build.sh

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,23 @@ cli_name="collie"
66

77
deno_flags="--unstable --allow-read --allow-write --allow-env --allow-run"
88

9-
mkdir -p bin
9+
mkdir -p bin/unix bin/windows
1010

11-
compile(){
11+
compile_unix(){
1212
target="$1"
1313

14-
deno compile $deno_flags --target "$target" --output "./bin/$cli_name-$target" src/main.ts
14+
deno compile $deno_flags --target "$target" --output "./bin/unix/$cli_name-$target" src/main.ts
1515
}
1616

17-
deno test $deno_flags
17+
compile_windows(){
18+
target="$1"
1819

19-
compile "x86_64-unknown-linux-gnu"
20-
compile "x86_64-apple-darwin"
21-
#compile "x86_64-pc-windows-msvc"
20+
deno compile $deno_flags --target "$target" --output "./bin/windows/$cli_name-$target" src/main.ts
21+
22+
}
2223

23-
# first grep filters for the first line of the output "deno 1.8.1 (release, x86_64-apple-darwin)"
24-
# second grep extracts the architecture string, but can't get rid of the trailing ): "x86_64-apple-darwin)"
25-
# sed then removes the last trailing character: "x86_64-apple-darwin"
26-
arch=$(deno --version | grep deno | grep -o "[a-z0-9_-]*)" | sed 's/.$//')
24+
deno test $deno_flags
2725

28-
echo "currently running on $arch, creating symlink at ./bin/$cli_name"
29-
ln -fs "./$cli_name-$arch" "./bin/$cli_name"
30-
chmod +x "./bin/$cli_name"
26+
compile_unix "x86_64-unknown-linux-gnu"
27+
compile_unix "x86_64-apple-darwin"
28+
compile_windows "x86_64-pc-windows-msvc"

install.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
$url=(Invoke-WebRequest -Uri https://api.github.com/repos/meshcloud/collie-cli/releases/latest | Select-String -Pattern '.*\"browser_download_url\":\"(.*windows-msvc.exe).*' | ForEach-Object {($_.matches.groups[1]).Value})
2+
3+
New-Item -ItemType directory -Path "${HOME}\collie-cli"
4+
Invoke-WebRequest -Uri $url -OutFile "${HOME}\collie-cli\collie"
5+
6+
Write-Host "Please add ${HOME}\collie-cli\ to your path environemnt variable."

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ case "$(uname -s)" in
2020
name="collie-x86_64-unknown-linux-gnu"
2121
;;
2222
CYGWIN*|MINGW32*|MSYS*|MINGW*)
23-
echo 'Collie currently does not support Windows. Please have a look at https://github.com/meshcloud/collie-cli/issues/2 to follow progress.'
23+
echo 'Please execute the install.ps1 script as mentioned in our README. Go to https://github.com/meshcloud/collie-cli#-install-and-usage'
2424
exit 1
2525
;;
2626
*)

src/aws/aws-mesh-adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ export class AwsMeshAdapter implements MeshAdapter {
6868

6969
const costItem: MeshTenantCost = {
7070
currency: "",
71-
from: from.toDate().toUTCString(),
72-
to: to.toDate().toUTCString(),
71+
from: from.toDate(),
72+
to: to.toDate(),
7373
cost: "0",
7474
details: [],
7575
};

src/azure/azure-mesh-adapter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ export class AzureMeshAdapter implements MeshAdapter {
113113
t.costs.push({
114114
currency: currencySymbol,
115115
cost: summedCost.toString(),
116-
from: startDate.toUTCString(),
117-
to: endDate.toUTCString(),
116+
from: startDate,
117+
to: endDate,
118118
details: [],
119119
});
120120
}
@@ -201,8 +201,8 @@ export class AzureMeshAdapter implements MeshAdapter {
201201
currency: currencySymbol,
202202
cost: totalUsagePretaxCost.toFixed(2),
203203
details: [], // Can hold daily usages
204-
from: timeWindow.from.toUTCString(),
205-
to: timeWindow.to.toUTCString(),
204+
from: timeWindow.from,
205+
to: timeWindow.to,
206206
};
207207
}
208208

0 commit comments

Comments
 (0)