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

Add Metrics and Target Exploration #2

Merged
merged 1 commit into from
Sep 30, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/pull-requests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
{
"name": "linux_amd64: build and test",
"run": "bazel test --test_output=errors --platforms=@rules_go//go/toolchain:linux_amd64 //..."
"run": "bazel test --test_output=errors --platforms=@rules_go//go/toolchain:linux_amd64_cgo //..."
},
{
"name": "linux_386: build and test",
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
buildportal.db*
bep-files/
blob-archive/

cmd/bb-portal/__debug*
bazel-*
!bazel-demo/
bazel-demo/bazel-*
bazel-demo/*.ndjson
cmd/bb_portal/__debug*
15 changes: 7 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ linters-settings:
golint:
min-confidence: 0
gocyclo:
min-complexity: 10
min-complexity: 20
maligned:
suggest-new: true
dupl:
threshold: 100
threshold: 200
goconst:
min-len: 2
min-occurrences: 2
gomnd:
ignored-numbers:
- '0755' # common file mode
- '0640' # common file mode
- '0644' # common file mode
- '2' # common and usually clear (e.g. splitting in half)
- "0755" # common file mode
- "0640" # common file mode
- "0644" # common file mode
- "2" # common and usually clear (e.g. splitting in half)
depguard:
rules:
main:
Expand All @@ -42,7 +42,6 @@ linters-settings:
# NOTE: $gostd seems to match google.golang.org, even though I don't think it should.
- github.com/buildbarn/bb-portal/third_party/bazel/gen/bes


gomodguard:
# Currently just blocked, so everything is allowed. But we might want to start putting allowed so we can
# use this file to avoid dependency creep.
Expand Down Expand Up @@ -127,7 +126,7 @@ linters:
# - gocritic # Tentatively skipped; it's vague & opinionated so will review it last.
- gocyclo # Computes and checks the cyclomatic complexity of functions
- godot # Check if comments end in a period
# - godox # Tool for detection of FIXME, TODO and other comment keywords
# - godox # Tool for detection of FIXME, TODO and other comment keywords
- goerr113 # Golang linter to check the errors handling expressions
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
# - gofumpt # Tenatively skipped; it's an extension of gofmt so evaluate the base set of rules first
Expand Down
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ use_repo(
"com_github_google_shlex",
"com_github_google_uuid",
"com_github_hashicorp_go_multierror",
"com_github_hedwigz_entviz",
"com_github_machinebox_graphql",
"com_github_mattn_go_sqlite3",
"com_github_pkg_errors",
Expand Down
4 changes: 3 additions & 1 deletion bazel-demo/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
build --bes_backend=grpc://localhost:8082
build --bes_results_url=http://localhost:8081/bazel-invocations/
build --bes_results_url=<http://localhost:8081/bazel-invocations/>
build --build_metadata=user_ldap=demo-user
build --build_metadata=user_email=<[email protected]>
2 changes: 2 additions & 0 deletions ent/entc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"entgo.io/contrib/entgql"
"entgo.io/ent/entc"
"entgo.io/ent/entc/gen"
"github.com/hedwigz/entviz"
)

func main() {
Expand All @@ -24,6 +25,7 @@ func main() {
log.Fatalf("creating entgql extension: %v", err)
}
extensions := []entc.Extension{ex}
extensions = append(extensions, entviz.Extension{})
if err := os.RemoveAll("./ent/gen"); err != nil {
log.Fatalf("failed to remove ./ent/gen: %v", err)
}
Expand Down
206 changes: 206 additions & 0 deletions ent/gen/ent/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@ load("@rules_go//go:def.bzl", "go_library")
go_library(
name = "ent",
srcs = [
"actioncachestatistics.go",
"actioncachestatistics_create.go",
"actioncachestatistics_delete.go",
"actioncachestatistics_query.go",
"actioncachestatistics_update.go",
"actiondata.go",
"actiondata_create.go",
"actiondata_delete.go",
"actiondata_query.go",
"actiondata_update.go",
"actionsummary.go",
"actionsummary_create.go",
"actionsummary_delete.go",
"actionsummary_query.go",
"actionsummary_update.go",
"artifactmetrics.go",
"artifactmetrics_create.go",
"artifactmetrics_delete.go",
"artifactmetrics_query.go",
"artifactmetrics_update.go",
"bazelinvocation.go",
"bazelinvocation_create.go",
"bazelinvocation_delete.go",
Expand All @@ -23,33 +43,219 @@ go_library(
"build_delete.go",
"build_query.go",
"build_update.go",
"buildgraphmetrics.go",
"buildgraphmetrics_create.go",
"buildgraphmetrics_delete.go",
"buildgraphmetrics_query.go",
"buildgraphmetrics_update.go",
"client.go",
"cumulativemetrics.go",
"cumulativemetrics_create.go",
"cumulativemetrics_delete.go",
"cumulativemetrics_query.go",
"cumulativemetrics_update.go",
"dynamicexecutionmetrics.go",
"dynamicexecutionmetrics_create.go",
"dynamicexecutionmetrics_delete.go",
"dynamicexecutionmetrics_query.go",
"dynamicexecutionmetrics_update.go",
"ent.go",
"entviz.go",
"evaluationstat.go",
"evaluationstat_create.go",
"evaluationstat_delete.go",
"evaluationstat_query.go",
"evaluationstat_update.go",
"eventfile.go",
"eventfile_create.go",
"eventfile_delete.go",
"eventfile_query.go",
"eventfile_update.go",
"exectioninfo.go",
"exectioninfo_create.go",
"exectioninfo_delete.go",
"exectioninfo_query.go",
"exectioninfo_update.go",
"filesmetric.go",
"filesmetric_create.go",
"filesmetric_delete.go",
"filesmetric_query.go",
"filesmetric_update.go",
"garbagemetrics.go",
"garbagemetrics_create.go",
"garbagemetrics_delete.go",
"garbagemetrics_query.go",
"garbagemetrics_update.go",
"gql_collection.go",
"gql_edge.go",
"gql_node.go",
"gql_pagination.go",
"gql_transaction.go",
"gql_where_input.go",
"memorymetrics.go",
"memorymetrics_create.go",
"memorymetrics_delete.go",
"memorymetrics_query.go",
"memorymetrics_update.go",
"metrics.go",
"metrics_create.go",
"metrics_delete.go",
"metrics_query.go",
"metrics_update.go",
"missdetail.go",
"missdetail_create.go",
"missdetail_delete.go",
"missdetail_query.go",
"missdetail_update.go",
"mutation.go",
"namedsetoffiles.go",
"namedsetoffiles_create.go",
"namedsetoffiles_delete.go",
"namedsetoffiles_query.go",
"namedsetoffiles_update.go",
"networkmetrics.go",
"networkmetrics_create.go",
"networkmetrics_delete.go",
"networkmetrics_query.go",
"networkmetrics_update.go",
"outputgroup.go",
"outputgroup_create.go",
"outputgroup_delete.go",
"outputgroup_query.go",
"outputgroup_update.go",
"packageloadmetrics.go",
"packageloadmetrics_create.go",
"packageloadmetrics_delete.go",
"packageloadmetrics_query.go",
"packageloadmetrics_update.go",
"packagemetrics.go",
"packagemetrics_create.go",
"packagemetrics_delete.go",
"packagemetrics_query.go",
"packagemetrics_update.go",
"racestatistics.go",
"racestatistics_create.go",
"racestatistics_delete.go",
"racestatistics_query.go",
"racestatistics_update.go",
"resourceusage.go",
"resourceusage_create.go",
"resourceusage_delete.go",
"resourceusage_query.go",
"resourceusage_update.go",
"runnercount.go",
"runnercount_create.go",
"runnercount_delete.go",
"runnercount_query.go",
"runnercount_update.go",
"runtime.go",
"systemnetworkstats.go",
"systemnetworkstats_create.go",
"systemnetworkstats_delete.go",
"systemnetworkstats_query.go",
"systemnetworkstats_update.go",
"targetcomplete.go",
"targetcomplete_create.go",
"targetcomplete_delete.go",
"targetcomplete_query.go",
"targetcomplete_update.go",
"targetconfigured.go",
"targetconfigured_create.go",
"targetconfigured_delete.go",
"targetconfigured_query.go",
"targetconfigured_update.go",
"targetmetrics.go",
"targetmetrics_create.go",
"targetmetrics_delete.go",
"targetmetrics_query.go",
"targetmetrics_update.go",
"targetpair.go",
"targetpair_create.go",
"targetpair_delete.go",
"targetpair_query.go",
"targetpair_update.go",
"testcollection.go",
"testcollection_create.go",
"testcollection_delete.go",
"testcollection_query.go",
"testcollection_update.go",
"testfile.go",
"testfile_create.go",
"testfile_delete.go",
"testfile_query.go",
"testfile_update.go",
"testresultbes.go",
"testresultbes_create.go",
"testresultbes_delete.go",
"testresultbes_query.go",
"testresultbes_update.go",
"testsummary.go",
"testsummary_create.go",
"testsummary_delete.go",
"testsummary_query.go",
"testsummary_update.go",
"timingbreakdown.go",
"timingbreakdown_create.go",
"timingbreakdown_delete.go",
"timingbreakdown_query.go",
"timingbreakdown_update.go",
"timingchild.go",
"timingchild_create.go",
"timingchild_delete.go",
"timingchild_query.go",
"timingchild_update.go",
"timingmetrics.go",
"timingmetrics_create.go",
"timingmetrics_delete.go",
"timingmetrics_query.go",
"timingmetrics_update.go",
"tx.go",
],
embedsrcs = ["schema-viz.html"],
importpath = "github.com/buildbarn/bb-portal/ent/gen/ent",
visibility = ["//visibility:public"],
deps = [
"//ent/gen/ent/actioncachestatistics",
"//ent/gen/ent/actiondata",
"//ent/gen/ent/actionsummary",
"//ent/gen/ent/artifactmetrics",
"//ent/gen/ent/bazelinvocation",
"//ent/gen/ent/bazelinvocationproblem",
"//ent/gen/ent/blob",
"//ent/gen/ent/build",
"//ent/gen/ent/buildgraphmetrics",
"//ent/gen/ent/cumulativemetrics",
"//ent/gen/ent/dynamicexecutionmetrics",
"//ent/gen/ent/evaluationstat",
"//ent/gen/ent/eventfile",
"//ent/gen/ent/exectioninfo",
"//ent/gen/ent/filesmetric",
"//ent/gen/ent/garbagemetrics",
"//ent/gen/ent/memorymetrics",
"//ent/gen/ent/metrics",
"//ent/gen/ent/migrate",
"//ent/gen/ent/missdetail",
"//ent/gen/ent/namedsetoffiles",
"//ent/gen/ent/networkmetrics",
"//ent/gen/ent/outputgroup",
"//ent/gen/ent/packageloadmetrics",
"//ent/gen/ent/packagemetrics",
"//ent/gen/ent/predicate",
"//ent/gen/ent/racestatistics",
"//ent/gen/ent/resourceusage",
"//ent/gen/ent/runnercount",
"//ent/gen/ent/systemnetworkstats",
"//ent/gen/ent/targetcomplete",
"//ent/gen/ent/targetconfigured",
"//ent/gen/ent/targetmetrics",
"//ent/gen/ent/targetpair",
"//ent/gen/ent/testcollection",
"//ent/gen/ent/testfile",
"//ent/gen/ent/testresultbes",
"//ent/gen/ent/testsummary",
"//ent/gen/ent/timingbreakdown",
"//ent/gen/ent/timingchild",
"//ent/gen/ent/timingmetrics",
"//ent/schema",
"//pkg/summary",
"@com_github_99designs_gqlgen//graphql",
Expand Down
Loading
Loading