Skip to content

Commit

Permalink
chore: update to go 1.21.0 (#156)
Browse files Browse the repository at this point in the history
* chore: update to go 1.21.0

---------

Signed-off-by: Christopher Phillips <[email protected]>
  • Loading branch information
spiffcs authored Sep 8, 2023
1 parent fa9af6f commit dbb700f
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/actions/bootstrap/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ inputs:
go-version:
description: "Go version to install"
required: true
default: "1.20.x"
default: "1.21.x"
python-version:
description: "Python version to install"
required: true
default: "3.10"
default: "3.11"
poetry-version:
description: "Poetry version to install"
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-bootstrap-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

env:
GO_VERSION: "1.20.x"
GO_VERSION: "1.21.x"
GO_STABLE_VERSION: true

jobs:
Expand Down Expand Up @@ -64,4 +64,4 @@ jobs:
- [chronicle ${{ steps.latest-versions.outputs.CHRONICLE }}](https://github.com/anchore/chronicle/releases/tag/${{ steps.latest-versions.outputs.CHRONICLE }})
- [goreleaser ${{ steps.latest-versions.outputs.GORELEASER }}](https://github.com/goreleaser/goreleaser/releases/tag/${{ steps.latest-versions.outputs.GORELEASER }})
This is an auto-generated pull request to update all of the bootstrap tools to the latest versions.
token: ${{ steps.generate-token.outputs.token }}
token: ${{ steps.generate-token.outputs.token }}
2 changes: 1 addition & 1 deletion .github/workflows/update-grype-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

env:
GO_VERSION: "1.20.x"
GO_VERSION: "1.21.x"
GO_STABLE_VERSION: true

jobs:
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/anchore/grype-db

go 1.20
go 1.21

toolchain go1.21.0

require (
github.com/Masterminds/semver/v3 v3.2.1
Expand Down
23 changes: 23 additions & 0 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions manager/src/grype_db_manager/grypedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def get_db_info(self, db_uuid: str) -> DBInfo | None:
uuid=db_uuid,
schema_version=metadata["version"],
db_checksum=metadata["checksum"],
db_created=db_created_timestamp,
db_created=db_created_timestamp.strftime("%Y-%m-%dT%H:%M:%SZ"),
data_created=metadata["built"],
archive_path=abs_archive_path,
)
Expand All @@ -126,7 +126,7 @@ def list_dbs(self) -> list[DBInfo]:
except DBInvalidException as e:
logging.debug(f"failed to get info for session {db_uuid!r}: {e}")

return sessions
return sorted(sessions, key=lambda x: x.db_created)


class GrypeDB:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-07-31T03:45:08Z
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"built": "2023-07-31T03:45:08Z",
"built": "2023-07-30T03:45:08Z",
"version": 4,
"checksum": "sha256:0f2f6e45dcde94259c078d237e575a30787c5ad04345c57e4d5dea08a95af4cb"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-07-30T03:45:08Z
6 changes: 3 additions & 3 deletions manager/tests/unit/test_grypedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def path_to_archive(session_id: str, name: str):
uuid="9d1fce98-9c10-4887-949e-8296a259daf5",
schema_version=4,
db_checksum="sha256:0f2f6e45dcde94259c078d237e575a30787c5ad04345c57e4d5dea08a95af4cb",
db_created=None,
data_created="2023-07-31T03:45:08Z",
db_created="2023-07-30T03:45:08Z",
data_created="2023-07-30T03:45:08Z",
archive_path=path_to_archive(
"9d1fce98-9c10-4887-949e-8296a259daf5",
"vulnerability-db_v4_2023-08-03T01:34:34Z_54b7b6a76b058f1fa587.tar.gz",
Expand All @@ -29,7 +29,7 @@ def path_to_archive(session_id: str, name: str):
uuid="41e4c9e7-73c7-4106-bfb3-82e58ce15d9a",
schema_version=5,
db_checksum="sha256:c996a4c459a2fca9283c4fd8cdb53e3b050650d76e6ce517b91e34430f6db854",
db_created=None,
db_created="2023-07-31T03:45:08Z",
data_created="2023-07-31T01:34:05Z",
archive_path=path_to_archive(
"41e4c9e7-73c7-4106-bfb3-82e58ce15d9a",
Expand Down

0 comments on commit dbb700f

Please sign in to comment.