ovrclk / akash

Compare 812f927 ... +0 ... c87aece

Coverage Reach
x/market/types/v1beta2/query.pb.gw.go x/market/types/v1beta2/event.go x/market/types/v1beta2/types.go x/market/types/v1beta2/msgs.go x/market/types/v1beta2/id.go x/market/types/v1beta2/params.go x/market/types/v1beta2/escrow.go x/market/types/v1beta2/codec.go x/market/types/v1beta2/key.go x/market/types/v1beta1/query.pb.gw.go x/market/types/v1beta1/event.go x/market/types/v1beta1/types.go x/market/types/v1beta1/msgs.go x/market/types/v1beta1/id.go x/market/types/v1beta1/escrow.go x/market/types/v1beta1/params.go x/market/types/v1beta1/codec.go x/market/types/v1beta1/key.go x/market/client/cli/tx.go x/market/client/cli/flags.go x/market/client/cli/test_helpers.go x/market/client/cli/bid.go x/market/client/cli/lease.go x/market/client/cli/order.go x/market/client/cli/query.go x/market/client/rest/rest.go x/market/client/rest/params.go x/market/keeper/keeper.go x/market/keeper/grpc_query.go x/market/keeper/keys/key.go x/market/keeper/migrations.go x/market/handler/server.go x/market/handler/handler.go x/market/simulation/operations.go x/market/simulation/utils.go x/market/simulation/genesis.go x/market/query/path.go x/market/query/rawclient.go x/market/query/types.go x/market/legacy/v015/store.go x/market/module.go x/market/hooks/hooks.go x/market/genesis.go x/deployment/types/v1beta2/query.pb.gw.go x/deployment/types/v1beta2/event.go x/deployment/types/v1beta2/msgs.go x/deployment/types/v1beta2/resource_list_validation.go x/deployment/types/v1beta2/types.go x/deployment/types/v1beta2/id.go x/deployment/types/v1beta2/groupspec.go x/deployment/types/v1beta2/group_pricing_validation.go x/deployment/types/v1beta2/codec.go x/deployment/types/v1beta2/migrate/v1beta1.go x/deployment/types/v1beta2/deposit_deployment_authorization.go x/deployment/types/v1beta2/group_validation.go x/deployment/types/v1beta2/params.go x/deployment/types/v1beta2/escrow.go x/deployment/types/v1beta2/key.go x/deployment/types/v1beta2/validation_config.go x/deployment/types/v1beta1/query.pb.gw.go x/deployment/types/v1beta1/event.go x/deployment/types/v1beta1/msgs.go x/deployment/types/v1beta1/resource_list_validation.go x/deployment/types/v1beta1/types.go x/deployment/types/v1beta1/id.go x/deployment/types/v1beta1/group_pricing_validation.go x/deployment/types/v1beta1/codec.go x/deployment/types/v1beta1/deposit_deployment_authorization.go x/deployment/types/v1beta1/group_validation.go x/deployment/types/v1beta1/params.go x/deployment/types/v1beta1/escrow.go x/deployment/types/v1beta1/key.go x/deployment/types/v1beta1/validation_config.go x/deployment/client/cli/tx.go x/deployment/client/cli/query.go x/deployment/client/cli/flags.go x/deployment/client/cli/test_helpers.go x/deployment/client/cli/util.go x/deployment/client/rest/params.go x/deployment/client/rest/rest.go x/deployment/simulation/operations.go x/deployment/simulation/genesis.go x/deployment/keeper/keeper.go x/deployment/keeper/grpc_query.go x/deployment/keeper/key.go x/deployment/keeper/migrations.go x/deployment/handler/server.go x/deployment/handler/handler.go x/deployment/query/types.go x/deployment/query/client.go x/deployment/query/rawclient.go x/deployment/query/path.go x/deployment/module.go x/deployment/genesis.go x/deployment/legacy/v015/store.go x/audit/types/v1beta2/query.pb.gw.go x/audit/types/v1beta2/event.go x/audit/types/v1beta2/msgs.go x/audit/types/v1beta2/codec.go x/audit/types/v1beta2/types.go x/audit/types/v1beta2/key.go x/audit/types/v1beta1/query.pb.gw.go x/audit/types/v1beta1/event.go x/audit/types/v1beta1/msgs.go x/audit/types/v1beta1/codec.go x/audit/types/v1beta1/types.go x/audit/types/v1beta1/key.go x/audit/client/cli/tx.go x/audit/client/cli/query.go x/audit/client/rest/rest.go x/audit/keeper/keeper.go x/audit/keeper/grpc_query.go x/audit/keeper/key.go x/audit/keeper/migrations.go x/audit/module.go x/audit/handler/msg_server.go x/audit/handler/handler.go x/audit/query/rawclient.go x/audit/genesis.go x/audit/legacy/v015/store.go x/provider/types/v1beta1/query.pb.gw.go x/provider/types/v1beta1/msgs.go x/provider/types/v1beta1/event.go x/provider/types/v1beta1/types.go x/provider/types/v1beta1/codec.go x/provider/types/v1beta2/query.pb.gw.go x/provider/types/v1beta2/msgs.go x/provider/types/v1beta2/event.go x/provider/types/v1beta2/types.go x/provider/types/v1beta2/codec.go x/provider/client/cli/tx.go x/provider/client/cli/query.go x/provider/client/cli/test_helpers.go x/provider/client/rest/rest.go x/provider/simulation/operations.go x/provider/simulation/genesis.go x/provider/keeper/keeper.go x/provider/keeper/grpc_query.go x/provider/keeper/migrations.go x/provider/keeper/key.go x/provider/handler/server.go x/provider/handler/handler.go x/provider/module.go x/provider/query/types.go x/provider/query/client.go x/provider/query/rawclient.go x/provider/query/path.go x/provider/config/config.go x/provider/legacy/v015/store.go x/provider/genesis.go x/cert/client/cli/tx.go x/cert/client/cli/query.go x/cert/client/cli/test_helpers.go x/cert/types/v1beta2/query.pb.gw.go x/cert/types/v1beta2/cert.go x/cert/types/v1beta2/msgs.go x/cert/types/v1beta2/types.go x/cert/types/v1beta2/genesis.go x/cert/types/v1beta2/codec.go x/cert/types/v1beta2/key.go x/cert/types/v1beta1/query.pb.gw.go x/cert/types/v1beta1/cert.go x/cert/types/v1beta1/msgs.go x/cert/types/v1beta1/types.go x/cert/types/v1beta1/genesis.go x/cert/types/v1beta1/codec.go x/cert/types/v1beta1/key.go x/cert/keeper/keeper.go x/cert/keeper/grpc_query.go x/cert/keeper/key.go x/cert/keeper/migrations.go x/cert/utils/utils.go x/cert/module.go x/cert/handler/msg_server.go x/cert/handler/handler.go x/cert/genesis.go x/cert/legacy/v015/store.go x/cert/simulation/genesis.go x/escrow/keeper/keeper.go x/escrow/keeper/key.go x/escrow/keeper/migrations.go x/escrow/keeper/querier.go x/escrow/types/v1beta2/query.pb.gw.go x/escrow/types/v1beta2/validate.go x/escrow/types/v1beta2/codec.go x/escrow/types/v1beta2/key.go x/escrow/types/v1beta1/query.pb.gw.go x/escrow/types/v1beta1/validate.go x/escrow/types/v1beta1/codec.go x/escrow/types/v1beta1/key.go x/escrow/client/cli/query.go x/escrow/client/cli/tx.go x/escrow/module.go x/escrow/genesis.go x/escrow/legacy/v015/store.go x/escrow/query/querier.go x/inflation/types/v1beta2/inflation_calculator.go x/inflation/types/v1beta2/params.go x/inflation/module.go x/inflation/keeper/keeper.go x/inflation/genesis.go x/inflation/simulation/genesis.go provider/cluster/kube/builder/netpol.go provider/cluster/kube/builder/workload.go provider/cluster/kube/builder/service.go provider/cluster/kube/builder/podsecuritypolicy.go provider/cluster/kube/builder/statefulset.go provider/cluster/kube/builder/deployment.go provider/cluster/kube/builder/manifest.go provider/cluster/kube/builder/builder.go provider/cluster/kube/builder/namespace.go provider/cluster/kube/builder/settings.go provider/cluster/kube/client.go provider/cluster/kube/inventory.go provider/cluster/kube/client_hostname_connections.go provider/cluster/kube/client_ingress.go provider/cluster/kube/client_exec.go provider/cluster/kube/apply.go provider/cluster/kube/resourcetypes.go provider/cluster/kube/cleanup.go provider/cluster/inventory.go provider/cluster/client.go provider/cluster/hostname.go provider/cluster/manager.go provider/cluster/service.go provider/cluster/monitor.go provider/cluster/lease_withdraw.go provider/cluster/types/types.go provider/cluster/util/util.go provider/cluster/util/lease_id_to_namespace.go provider/cluster/util/context_settings.go provider/cluster/reservation.go provider/cluster/config.go provider/cmd/run.go provider/cmd/hostname_operator.go provider/cmd/shell.go provider/cmd/leaseLogs.go provider/cmd/manifest.go provider/cmd/leaseEvents.go provider/cmd/auth_server.go provider/cmd/helpers.go provider/cmd/authenticate.go provider/cmd/serviceStatus.go provider/cmd/migrate_hostnames.go provider/cmd/leaseStatus.go provider/cmd/root.go provider/cmd/status.go provider/cmd/clusterns.go provider/cmd/hostname_operator_types.go provider/cmd/metrics.go provider/cmd/test_helpers.go provider/gateway/rest/router.go provider/gateway/rest/client.go provider/gateway/rest/client_shell.go provider/gateway/rest/middleware.go provider/gateway/rest/router_migrate.go provider/gateway/rest/router_shell.go provider/gateway/rest/server.go provider/gateway/rest/path.go provider/gateway/utils/utils.go provider/bidengine/order.go provider/bidengine/provider_attributes.go provider/bidengine/pricing.go provider/bidengine/service.go provider/manifest/manager.go provider/manifest/service.go provider/manifest/watchdog.go provider/service.go provider/testutil/provider.go provider/balance_checker.go provider/session/session.go provider/config.go provider/event/events.go app/app.go app/app_configure.go app/export.go app/config.go app/mac.go app/params/proto.go app/genesis.go testutil/cert.go testutil/types.go testutil/base.go testutil/manifest_overflow.go testutil/state/suite.go testutil/manifest_app.go testutil/ids.go testutil/manifest_rand.go testutil/deployment.go testutil/cli/cmd.go testutil/event.go testutil/channel_wait.go testutil/sdk.go testutil/provider.go testutil/audit.go testutil/restserver.go testutil/log.go testutil/rand.go sdl/v2.go sdl/storage.go sdl/sdl.go sdl/units.go sdl/resources.go sdl/coin.go sdl/cpu.go sdl/memory.go sdl/placement.go sdl/expose.go sdl/utils.go deploy/cmd/create.go deploy/cmd/event-handlers.go deploy/cmd/deployment-data.go deploy/cmd/utils.go deploy/cmd/event-emitters.go deploy/cmd/root.go types/v1beta1/resource.go types/v1beta1/attribute.go types/v1beta1/resourcevalue.go types/v1beta1/requirements.go types/v1beta2/attribute.go types/v1beta2/migrate/v1beta1.go types/v1beta2/resource.go types/v1beta2/resourcevalue.go types/v1beta2/requirements.go types/v1beta2/endpoint.go cmd/akash/cmd/root.go cmd/akash/cmd/genaccounts.go cmd/akash/main.go cmd/common/signal.go cmd/common/util.go cmd/common/flags.go client/broadcaster/serial.go client/broadcaster/client.go client/client.go client/extra.go client/docs/statik/statik.go sdkutil/broadcast.go sdkutil/event.go sdkutil/init_config.go sdkutil/address.go sdkutil/query.go validation/manifest.go util/validation/hostname.go util/ctxlog/ctxlog.go util/metrics/metrics.go util/legacy/v015/helpers.go util/wsutil/wsutil.go util/runner/runner.go events/publish.go events/cmd/root.go events/query.go integration/test_helpers.go pubsub/bus.go pubsub/util.go manifest/types.go manifest/parse.go docgen/main.go

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -129,6 +129,10 @@
Loading
129 129
		return nil, errors.Errorf("error: invalid unit storage, cannot be nil")
130 130
	}
131 131
132 +
	if len(u) > validationConfig.MaxGroupVolumes {
133 +
		return nil, errors.Errorf("error: invalid amount of volumes (%v > %v)", len(u), validationConfig.MaxGroupVolumes)
134 +
	}
135 +
132 136
	storage := make([]sdk.Int, 0, len(u))
133 137
134 138
	for i := range u {

@@ -1,6 +1,9 @@
Loading
1 1
package v1beta2
2 2
3 -
import "github.com/ovrclk/akash/types/unit"
3 +
import (
4 +
	"github.com/ovrclk/akash/types/unit"
5 +
	"github.com/ovrclk/akash/validation/constants"
6 +
)
4 7
5 8
// This is the validation configuration that acts as a hard limit
6 9
// on what the network accepts for deployments. This is never changed
@@ -14,7 +17,7 @@
Loading
14 17
	MaxUnitMemory uint64
15 18
	// MaxUnitStorage is the maximum number of bytes of storage that a unit can consume
16 19
	MaxUnitStorage uint64
17 -
	// MaxUnitCount is the maximum number of replias of a service
20 +
	// MaxUnitCount is the maximum number of replicas of a service
18 21
	MaxUnitCount uint
19 22
	// MaxUnitPrice is the maximum price that a unit can have
20 23
	MaxUnitPrice uint64
@@ -35,6 +38,8 @@
Loading
35 38
	MaxGroupMemory uint64
36 39
	// MaxGroupStorage is the maximum total amount of storage requested per group
37 40
	MaxGroupStorage uint64
41 +
	// MaxGroupVolumes is the maximum amount of volumes per group
42 +
	MaxGroupVolumes int
38 43
}
39 44
40 45
var validationConfig = ValidationConfig{
@@ -55,6 +60,7 @@
Loading
55 60
	MaxGroupCPU:     512 * 1000,
56 61
	MaxGroupMemory:  1024 * unit.Gi,
57 62
	MaxGroupStorage: 32 * unit.Ti,
63 +
	MaxGroupVolumes: constants.MaxGroupVolumes,
58 64
}
59 65
60 66
func GetValidationConfig() ValidationConfig {

@@ -11,6 +11,7 @@
Loading
11 11
	"github.com/ovrclk/akash/manifest"
12 12
	providerUtil "github.com/ovrclk/akash/provider/cluster/util"
13 13
	types "github.com/ovrclk/akash/types/v1beta2"
14 +
	"github.com/ovrclk/akash/validation/constants"
14 15
	dtypes "github.com/ovrclk/akash/x/deployment/types/v1beta2"
15 16
)
16 17
@@ -419,6 +420,10 @@
Loading
419 420
			}
420 421
421 422
			// validate storage's attributes and parameters
423 +
			if len(compute.Resources.Storage) > constants.MaxGroupVolumes {
424 +
				return errors.Errorf("sdl: compute.storage exceeds maximum amount of volumes (%v > %v)", compute.Resources.Storage, constants.MaxGroupVolumes)
425 +
			}
426 +
422 427
			volumes := make(map[string]v2ResourceStorage)
423 428
			for _, volume := range compute.Resources.Storage {
424 429
				// making deepcopy here as we gonna merge compute attributes and service parameters for validation below

Learn more Showing 5 files with coverage changes found.

Changes in cmd/akash/main.go
-4
Loading file...
Changes in events/cmd/root.go
+12
Loading file...
Changes in provider/bidengine/order.go
-1
-2
+3
Loading file...
Changes in sdl/storage.go
-1
-1
+2
Loading file...
Changes in sdl/utils.go
-1
-1
+2
Loading file...
Files Coverage
app 77.28%
client 2.84%
cmd 0.12% 8.67%
deploy/cmd 0.00%
events -1.07% 7.36%
manifest 80.95%
provider 0.04% 33.53%
pubsub 89.18%
sdkutil 38.33%
sdl 0.95% 71.22%
testutil 90.67%
types 28.34%
util 43.11%
x -0.01% 37.72%
docgen/main.go 0.00%
integration/test_helpers.go 5.40%
validation/manifest.go 94.78%
Project Totals (357 files) 38.25%
Loading