Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable logging of all server-side errors #127

Merged
merged 3 commits into from
Nov 30, 2023
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
11 changes: 5 additions & 6 deletions .github/workflows/check-goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ jobs:
goreleaser-check:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v4
-
name: Run 'goreleaser check'
with:
go-version: 1.21
- name: Run 'goreleaser check'
uses: goreleaser/goreleaser-action@v5
with:
version: latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.21

- name: lint
uses: golangci/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.21
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand Down
6 changes: 6 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"default": true,
"MD013": false,
"MD024": false,
"MD033": false
}
294 changes: 294 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,294 @@
# Changelog

All notable changes to this project will be documented in this file.

*Note: Releases that only include dependency updates generated by Dependabot will not appear here.*

## [v0.14.0] - 2023-11-28

### ⚙️ Miscellaneous Tasks

- Added support for generating CHANGELOG.md from commits ([9673490](https://github.com/CrowdStrike/perseus/commits/96734904ac9e947a57c1424b5de903f08366bb07))

### ⛰️ Features

- *(logging)* Update server to always log errors ([4d97e62](https://github.com/CrowdStrike/perseus/commits/4d97e62aa9ea2664bb05b174fce0a0608719a4a0))

Contributors: Dylan Bourque

## [v0.12.2] - 2023-06-02

### 🐛 Bug Fixes

- Address database error when running 'perseus update' against untidy modules ([780a6d3](https://github.com/CrowdStrike/perseus/commits/780a6d3cfb01fd075bd99ab0c88126d4cbdb31ab))

Contributors: Dylan Bourque

## [v0.12.0] - 2023-04-20

### ⚙️ Miscellaneous Tasks

- Code cleanup ([3c1e9f6](https://github.com/CrowdStrike/perseus/commits/3c1e9f6c0ee78c9ec41c066683b77ba93111f945))

### ⛰️ Features

- Implemented new find-paths sub-command ([84b1dc8](https://github.com/CrowdStrike/perseus/commits/84b1dc8c35ebdd11e53e8d68dc0df2d3b04e9217))
- Add find path command ([24c06bb](https://github.com/CrowdStrike/perseus/commits/24c06bb5aa9d63c39ecca26729d2479489157288))

### 🐛 Bug Fixes

- *(store)* Partially written module cannot be corrected ([fbafd47](https://github.com/CrowdStrike/perseus/commits/fbafd47b7d9df1751598ff06280c11f5034d0b52))

Contributors: Dylan Bourque

## [v0.11.0] - 2023-04-04

### 🐛 Bug Fixes

- Updating a module with no dependencies is a no-op ([f338a4d](https://github.com/CrowdStrike/perseus/commits/f338a4d35994f41a1f0ea2901708ed819edbb093))

Contributors: Dylan Bourque

## [v0.10.0] - 2023-03-28

### 🐛 Bug Fixes

- Eliminate panic when generating debug logs ([81fb085](https://github.com/CrowdStrike/perseus/commits/81fb0851679d879a0c6ffc3d46203208c10615a5))
- Eliminate panic when generating debug logs ([0559cc1](https://github.com/CrowdStrike/perseus/commits/0559cc1f5675d4de9ef8d8f852ef0717cc76f2d3))
- *(logs)* File/line info is incorrect in debug logs ([86e1dc9](https://github.com/CrowdStrike/perseus/commits/86e1dc914bf7cdda733aa946de8190588f2bb064))
- *(logging)* Remove database connection password from debug logs ([8a3f74c](https://github.com/CrowdStrike/perseus/commits/8a3f74c446b528477fbfff3f03baf769c80b59aa))
- *(ui)* Module detail page would not load when on pre-release versions in database ([daa1902](https://github.com/CrowdStrike/perseus/commits/daa19025b93ef9c743d9053984a2d295804690c1))
- *(ui)* Module details page does not load when the module has only pre-release versions ([e57d754](https://github.com/CrowdStrike/perseus/commits/e57d75459ca7fbb2765278c75578f5805bdde481))

Contributors: Dylan Bourque

## [v0.11.0] - 2023-04-04

### 🐛 Bug Fixes

- Updating a module with no dependencies is a no-op ([f531cf0](https://github.com/CrowdStrike/perseus/commits/f531cf0941f0e62290bf58b049cea4c4c508be1c))
- Updating a module with no dependencies is a no-op ([f338a4d](https://github.com/CrowdStrike/perseus/commits/f338a4d35994f41a1f0ea2901708ed819edbb093))

Contributors: Dylan Bourque

## [v0.10.0] - 2023-03-28

### 🐛 Bug Fixes

- Eliminate panic when generating debug logs ([81fb085](https://github.com/CrowdStrike/perseus/commits/81fb0851679d879a0c6ffc3d46203208c10615a5))
- Eliminate panic when generating debug logs ([0559cc1](https://github.com/CrowdStrike/perseus/commits/0559cc1f5675d4de9ef8d8f852ef0717cc76f2d3))
- *(logs)* File/line info is incorrect in debug logs ([86e1dc9](https://github.com/CrowdStrike/perseus/commits/86e1dc914bf7cdda733aa946de8190588f2bb064))
- *(logging)* Remove database connection password from debug logs ([8a3f74c](https://github.com/CrowdStrike/perseus/commits/8a3f74c446b528477fbfff3f03baf769c80b59aa))
- *(ui)* Module detail page would not load when on pre-release versions in database ([daa1902](https://github.com/CrowdStrike/perseus/commits/daa19025b93ef9c743d9053984a2d295804690c1))
- *(ui)* Module details page does not load when the module has only pre-release versions ([e57d754](https://github.com/CrowdStrike/perseus/commits/e57d75459ca7fbb2765278c75578f5805bdde481))

Contributors: Dylan Bourque

## [v0.11.0] - 2023-04-04

### 🐛 Bug Fixes

- Updating a module with no dependencies is a no-op ([f531cf0](https://github.com/CrowdStrike/perseus/commits/f531cf0941f0e62290bf58b049cea4c4c508be1c))
- Updating a module with no dependencies is a no-op ([f338a4d](https://github.com/CrowdStrike/perseus/commits/f338a4d35994f41a1f0ea2901708ed819edbb093))

Contributors: Dylan Bourque

## [v0.10.0] - 2023-03-28

### 🐛 Bug Fixes

- Eliminate panic when generating debug logs ([81fb085](https://github.com/CrowdStrike/perseus/commits/81fb0851679d879a0c6ffc3d46203208c10615a5))
- Eliminate panic when generating debug logs ([0559cc1](https://github.com/CrowdStrike/perseus/commits/0559cc1f5675d4de9ef8d8f852ef0717cc76f2d3))
- *(logs)* File/line info is incorrect in debug logs ([86e1dc9](https://github.com/CrowdStrike/perseus/commits/86e1dc914bf7cdda733aa946de8190588f2bb064))
- *(logging)* Remove database connection password from debug logs ([8a3f74c](https://github.com/CrowdStrike/perseus/commits/8a3f74c446b528477fbfff3f03baf769c80b59aa))
- *(ui)* Module detail page would not load when on pre-release versions in database ([daa1902](https://github.com/CrowdStrike/perseus/commits/daa19025b93ef9c743d9053984a2d295804690c1))
- *(ui)* Module details page does not load when the module has only pre-release versions ([e57d754](https://github.com/CrowdStrike/perseus/commits/e57d75459ca7fbb2765278c75578f5805bdde481))

Contributors: Dylan Bourque

## [v0.12.0] - 2023-04-20

### ⚙️ Miscellaneous Tasks

- Code cleanup ([3c1e9f6](https://github.com/CrowdStrike/perseus/commits/3c1e9f6c0ee78c9ec41c066683b77ba93111f945))

### ⛰️ Features

- Implemented new find-paths sub-command ([84b1dc8](https://github.com/CrowdStrike/perseus/commits/84b1dc8c35ebdd11e53e8d68dc0df2d3b04e9217))
- Add find path command ([24c06bb](https://github.com/CrowdStrike/perseus/commits/24c06bb5aa9d63c39ecca26729d2479489157288))

### 🐛 Bug Fixes

- *(store)* Partially written module cannot be corrected ([fbafd47](https://github.com/CrowdStrike/perseus/commits/fbafd47b7d9df1751598ff06280c11f5034d0b52))

Contributors: Dylan Bourque

## [v0.11.0] - 2023-04-04

### 🐛 Bug Fixes

- Updating a module with no dependencies is a no-op ([f531cf0](https://github.com/CrowdStrike/perseus/commits/f531cf0941f0e62290bf58b049cea4c4c508be1c))
- Updating a module with no dependencies is a no-op ([f338a4d](https://github.com/CrowdStrike/perseus/commits/f338a4d35994f41a1f0ea2901708ed819edbb093))

Contributors: Dylan Bourque

## [v0.10.0] - 2023-03-28

### 🐛 Bug Fixes

- Eliminate panic when generating debug logs ([81fb085](https://github.com/CrowdStrike/perseus/commits/81fb0851679d879a0c6ffc3d46203208c10615a5))
- Eliminate panic when generating debug logs ([0559cc1](https://github.com/CrowdStrike/perseus/commits/0559cc1f5675d4de9ef8d8f852ef0717cc76f2d3))
- *(logs)* File/line info is incorrect in debug logs ([86e1dc9](https://github.com/CrowdStrike/perseus/commits/86e1dc914bf7cdda733aa946de8190588f2bb064))
- *(logging)* Remove database connection password from debug logs ([8a3f74c](https://github.com/CrowdStrike/perseus/commits/8a3f74c446b528477fbfff3f03baf769c80b59aa))
- *(ui)* Module detail page would not load when on pre-release versions in database ([daa1902](https://github.com/CrowdStrike/perseus/commits/daa19025b93ef9c743d9053984a2d295804690c1))
- *(ui)* Module details page does not load when the module has only pre-release versions ([e57d754](https://github.com/CrowdStrike/perseus/commits/e57d75459ca7fbb2765278c75578f5805bdde481))

Contributors: Dylan Bourque

## [v0.9.0] - 2023-03-16

### 🐛 Bug Fixes

- *(ui)* Module details page does not render ([0b8f5cb](https://github.com/CrowdStrike/perseus/commits/0b8f5cbccb039dd2b057c7f10abf8223e43476a4))
- *(debug)* Key/value pairs are not correctly output in debug logs ([28c9536](https://github.com/CrowdStrike/perseus/commits/28c9536cf47b466dd1ba945c73e52f8253d354d4))
- *(tls)* Updates to `query` and `update` sub-commands to work with TLS ([f5a3627](https://github.com/CrowdStrike/perseus/commits/f5a3627e0dcaadde368641b7353a8c6fd8a25641))
- *(list-modules)* `list-modules` sub-command fails if a module has no stable versions ([de32f31](https://github.com/CrowdStrike/perseus/commits/de32f31680b0a4d2a9a8e6bb8ecfd0f90773aee9))

Contributors: Dylan Bourque

## [v0.8.0] - 2023-03-08

### ⚙️ Miscellaneous Tasks

- Improve README.md ([e320392](https://github.com/CrowdStrike/perseus/commits/e3203927eae5f7fcc94cfb6b89a20235dafc3d7a))

### ⛰️ Features

- Export gRPC metrics for Prometheus ([0334446](https://github.com/CrowdStrike/perseus/commits/03344461ee3094b8fffbfb2556e9ef4ded274f7c))
- Expose pprof endpoints for runtime profiles ([4d24a6f](https://github.com/CrowdStrike/perseus/commits/4d24a6fc35f1336a83ef7c8e6d34054232e3bc39))
- Made healthz timeout configurable via env var ([4df48b4](https://github.com/CrowdStrike/perseus/commits/4df48b47a9f87a6f2cf317a8ab05fc2c6743a13d))

### 🐛 Bug Fixes

- Add 'v' prefix to returned versions for ListModuleVersions response ([26a390e](https://github.com/CrowdStrike/perseus/commits/26a390e403f31eec6e79de510d1b6278e4667cdd))
- Change 'SERVER_ADDR' env var to 'PERSEUS_SERVER_ADDR' for disambiguation ([eb549c7](https://github.com/CrowdStrike/perseus/commits/eb549c7aef05bdefe6b30314a3fdd322bc878cb4))

Contributors: Dylan Bourque

## [v0.7.0] - 2023-02-23

### ⛰️ Features

- Expose healthz/ endpoint ([1396590](https://github.com/CrowdStrike/perseus/commits/1396590fb58cf882c7ab9a8f460cc60c4680fa46))

Contributors: Dylan Bourque

## [v0.6.0] - 2023-02-14

### ⚙️ Miscellaneous Tasks

- Bump Go version in GH Actions to 1.19 ([0eeb62c](https://github.com/CrowdStrike/perseus/commits/0eeb62c41abd671b27a1413a7cd2b19465825efa))

### ⛰️ Features

- Update Goreleaser config to publish to GHCR ([9ca81be](https://github.com/CrowdStrike/perseus/commits/9ca81be7226a19257279488781264a54b0d89080))

Contributors: Dylan Bourque

## [v0.5.0] - 2023-02-08

### ⛰️ Features

- *(scripts)* Added support for command line args in processmod.sh ([a5cacdd](https://github.com/CrowdStrike/perseus/commits/a5cacdd49dcb8285e0afb8bd48b370fd1e29ed74))
- *(api)* Refactored ListModuleVersions RPC to support wildcards for modules and/or versions ([4b534bc](https://github.com/CrowdStrike/perseus/commits/4b534bcdf36df442a2b4b0e19f6bf00e7207870f))

### 🐛 Bug Fixes

- *(cli)* Error when skipping prerelease versions ([bc49064](https://github.com/CrowdStrike/perseus/commits/bc49064b93c3e5360eb8283e3aa03e093c17e12d))

Contributors: Dylan Bourque

## [v0.4.2] - 2022-12-06

### 🐛 Bug Fixes

- *(deps)* Update github.com/pjbgf/sha1cd to v0.2.3 ([800b867](https://github.com/CrowdStrike/perseus/commits/800b8677d502d6908dd8cab57a7ce992ae7ecf62))

Contributors: Dylan Bourque

## [v0.4.1] - 2022-12-06

### 🐛 Bug Fixes

- Goreleaser GH action failing ([4b35f5e](https://github.com/CrowdStrike/perseus/commits/4b35f5e7da8211fae226b6e0ee6310d520633369))

Contributors: Dylan Bourque

## [v0.4.0] - 2022-12-06

### ⛰️ Features

- Publish a runnable Docker image for Perseus server ([453d5c7](https://github.com/CrowdStrike/perseus/commits/453d5c745bb4470b9ca8f1d775871ab4ffd0e5fd))

Contributors: Dylan Bourque

## [v0.3.0] - 2022-11-17

### ⛰️ Features

- *(update)* Extend 'update' command to support OSS deps ([abbbeaf](https://github.com/CrowdStrike/perseus/commits/abbbeaffde6c954abdcb2535ea97fbc71ad94c98))

### 🐛 Bug Fixes

- The db-name flag now parses correctly ([3e874a9](https://github.com/CrowdStrike/perseus/commits/3e874a9d47f83d69e6eaab53bfc1144c92c51494))
- The db-name flag now parses correctly ([c5ec243](https://github.com/CrowdStrike/perseus/commits/c5ec243ad6e2b88165b674d4706bb79002a6acde))

Contributors: Anthony Lee, Dylan Bourque

## [v0.2.0] - 2022-09-28

### ⛰️ Features

- *(query)* UX improvements ([b6f3257](https://github.com/CrowdStrike/perseus/commits/b6f325726acb412a29f8fb193dc26bf11bcb495b))
- *(server)* Make server more configurable ([d1114ca](https://github.com/CrowdStrike/perseus/commits/d1114ca7c7219d81314d2d893d02649058b385aa))
- *(query)* Implement new 'list-modules' sub-command ([6fb0048](https://github.com/CrowdStrike/perseus/commits/6fb004801e648a3c1fbffabca0cb47d52b397b5a))
- *(ui)* Polish web UI/UX for the module view ([23c97b8](https://github.com/CrowdStrike/perseus/commits/23c97b817536c5d2bf1221d1faac8f57d9ca7f9c))

### 🐛 Bug Fixes

- *(ui)* Update graph nav to preserve the selected direction ([c183e19](https://github.com/CrowdStrike/perseus/commits/c183e19abc88c364053970c174c600af8d44fcf7))

### 🚜 Refactor

- Code cleanup ([02bbd1d](https://github.com/CrowdStrike/perseus/commits/02bbd1d4557690166203f5c537bf7675d35dcc0a))
- Move default database name to a shared constant ([ac58b8e](https://github.com/CrowdStrike/perseus/commits/ac58b8e1fce89e01254d7df1826d0d6e9461c46f))

Contributors: Dylan Bourque

## [v0.1.0] - 2022-09-07

### ⚙️ Miscellaneous Tasks

- Enable CodeQL analysis ([ad6230c](https://github.com/CrowdStrike/perseus/commits/ad6230caa449da611ba4dcbc63ce68718737b323))

### ⛰️ Features

- MVP ([a9d7425](https://github.com/CrowdStrike/perseus/commits/a9d74252ac52350a04cb2adc8d8f139dbcfc915f))
- *(ui)* Basic graph explorer UI ([f6fd044](https://github.com/CrowdStrike/perseus/commits/f6fd044c0edc764b8cc68b8a776aaa248428e5da))
- Implement 'query' CLI sub-command ([0d19011](https://github.com/CrowdStrike/perseus/commits/0d190111d756304703810da2db5b36447450b396))

### 🐛 Bug Fixes

- *(proto)* Move path parameters to query ([06a73db](https://github.com/CrowdStrike/perseus/commits/06a73db24382828f041106e8e61a0ee7d5a7eda4))

Contributors: Ben Woodward, Dylan Bourque

## [v0.0.0] - 2022-08-04

### ⚙️ Miscellaneous Tasks

- Scaffold out initial implementation ([3773d37](https://github.com/CrowdStrike/perseus/commits/3773d376cd48fac78b84736a2012c146c00ed494))

Contributors: Dylan Bourque

<!-- generated by git-cliff -->
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ check-goreleaser-config:
snapshot: check-goreleaser-install
@goreleaser release --snapshot --rm-dist --skip-publish

.PHONY: update-changelog
update-changelog: check-git-cliff-install
ifeq ("${NEXT_VERSION}", "")
$(error Must specify the next version via $$NEXT_VERSION)
else
git cliff --unreleased --tag ${NEXT_VERSION} --prepend CHANGELOG.md
endif

.PHONY: check-buf-install
check-buf-install:
ifeq ("$(shell command -v buf)", "")
Expand All @@ -83,3 +91,9 @@ check-goreleaser-install:
ifeq ("$(shell command -v goreleaser)", "")
$(error goreleaser was not found. Please install it using the method of your choice. (https://goreleaser.com/install))
endif

.PHONY: check-git-cliff-install
check-git-cliff-install:
ifeq ("$(shell command -v git-cliff)", "")
$(error git-cliff was not found. Please install it using the method of your choice. (https://git-cliff.org/docs/installation/))
endif
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ view that shows what other packages depend on your code. The `go` tool won't sh
on you, though. The `pkg.go.dev` site can only show things that it knows about, so it won't help for
private modules, and it doesn't show you which versions of those other packages depend on your code.

See [CHANGELOG.md](./CHANGELOG.md) for a detailed history of changes.

## Existing Tooling

Unfortunately, the `go` CLI commands, the `pkg.go.dev` site, and OSS tools like [`goda`](https://github.com/loov/goda)
Expand Down
2 changes: 1 addition & 1 deletion client_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (conf *clientConfig) dialServer() (client perseusapi.PerseusServiceClient,
} else {
dialOpts = append(dialOpts, grpc.WithTransportCredentials(credentials.NewTLS(nil)))
}
debugLog("connecting to Perseus server", "addr", conf.serverAddr, "useTLS", !conf.disableTLS)
logger.Debug("connecting to Perseus server", "addr", conf.serverAddr, "useTLS", !conf.disableTLS)
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
conn, err := grpc.DialContext(ctx, conf.serverAddr, dialOpts...)
Expand Down
Loading