Commit Graph

8528 Commits

Author SHA1 Message Date
Márton Elek
0affe03007 cmd/tools/tag-signer: make the output less noisy
This patch removes the following lines from the output (with disable tracing + set the log level to warn):

```
2023-09-25T15:30:58+02:00	INFO	process/tracing.go:73	Anonymized tracing enabled
2023-09-25T15:30:58+02:00	DEBUG	tracing collector	monkit-jaeger@v0.0.0-20220915074555-d100d7589f41/udp.go:128	started
2023-09-25T15:30:58+02:00	DEBUG	process/debug.go:37	debug server listening on 127.0.0.1:34803
```

Change-Id: Iccbf4fc3bde9436e0571943d0d85c51ebc766ef9
2023-09-26 16:30:48 +00:00
Vitalii
05a276ecc7 web/satellite/vuetify-poc: add buckets table to project dashboard
Added buckets table to the bottom of project dashboard view

Issue:
https://github.com/storj/storj/issues/6322

Change-Id: I059bf60631096956d55522da7d18cb8a9eaedc93
2023-09-26 15:49:47 +00:00
Vitalii
f5af0f2268 web/satellite/vuetify-poc: add geographic distribution dialog
Added geographic distribution dialog to object browser preview.

Issue:
https://github.com/storj/storj/issues/6321

Change-Id: Ia3d89a3c27ce8100a3a0a4e5fff91f0c41d0595e
2023-09-26 15:49:06 +00:00
Vitalii
f78cde93ac web/satellite/vuetify-poc: make project table search field be consistent with other search fields
Made search field styling be consistent with other search fields.

Issue:
https://github.com/storj/storj/issues/6320

Change-Id: I21e383cef522a9f76b437a8f9977eab72987766c
2023-09-26 15:09:41 +00:00
Cameron
8689f609d7 web/satellite: vuetify upload progress panel
vuetify snackbar with expansion panels displaying upload statuses.

https://github.com/storj/storj/issues/6257

Change-Id: Ife01616f5a07a4987153ef85331ff71f53b8cf78
2023-09-26 14:04:40 +00:00
Ivan Fraixedes
6555a68fa9 satellite/admin: Serve back-office static UI
Serve the front-end sources of the new back-office through the current
satellite admin server under the path `/back-office`.

The front-end is served in the same way than the current one, which is
through an indicated directory path with a configuration parameter or
embed in the binary when that configuration parameter is empty.

The commit also slightly changes the test that checks serving these
static assets for not targeting the empty file in the build folder.

build folders must remain because of the embed directive.

Change-Id: I3c5af6b75ec944722dbdc4c560d0e7d907a205b8
2023-09-26 13:18:29 +00:00
Ivan Fraixedes
48d7be7eab
private/apigen: Panic types defined in main package
The API generator was generating invalid code when types were defined in
a main package because the generated Go code was defining in import from
it.

This commit update the Go generator to panic with a explicit error
message if that situation happens.

The commit also add a new endpoint to the example with a named types
(i.e. no anonymous) to show that the Generator works fine with them.

Change-Id: Ieddd89c67048de50516f7ac7787d602660dc4a54
2023-09-26 14:04:33 +02:00
Ivan Fraixedes
7ab7ac49c8
private/apigen: Remove TypeScript errors from generated code
Remove the "duplicate identifier: 'path'" TypeScript errors from the
generated code.

Change-Id: I6b411a5cee720e2a16353034627954616c480f8a
2023-09-26 14:04:33 +02:00
Ivan Fraixedes
00484429d6
private/apigen: Generate valid TypeScript code with anonymous types
The API generator didn't generate valid TypeScript code when using
Go anonymous types.

This commit fixes that issue creating names for anonymous types.

Change-Id: Ice0748d8650686e3d3979523b8f218dc20eade5a
2023-09-26 14:04:33 +02:00
Ivan Fraixedes
a9901cc7d0
private/apigen: Add validations to improve usage
Add a few validations to panic with a nicer message or abort rather than
generating invalid code.

Also improve the panic message wrapping a standard error with errs2 at
the time that it's returned.

Change-Id: I1393933eb5f0bc3f86646bf4d0acfc64626efbe0
2023-09-26 14:04:33 +02:00
Ivan Fraixedes
822a13570e
private/apigen: Document Endpoint fields
Add document comments to tall the fields of the Endpoint struct.

Change-Id: Ibcd534f26474fc73fb378a9f30ce7d9401217557
2023-09-26 14:04:32 +02:00
Wilfred Asomani
d67bb4f2c5 web/satellite/vuetify-poc: show file delete confirmation dialog
This change extends the folder deletion modal to work for objects as
well.

Issue: https://github.com/storj/storj/issues/6299

Change-Id: I13e9ffa508c802480c0e3ed2ac630fa693b66fc7
2023-09-26 11:00:16 +00:00
Vitalii
4cbfa28e10 web/satellite/vuetify-poc: use 'demo-bucket' placeholder instead of prefilled value
Use placeholder instead of prefilled value for bucket creation dialog.

Issue:
https://github.com/storj/storj/issues/6319

Change-Id: I86c25926034adbe93a58df56e0bf18b60b41e568
2023-09-26 09:59:10 +00:00
Vitalii
4a9d5edbfc web/satellite/vuetify-poc: another round of small improvements
break text of download notification (e.g. when you download from preview)
hide right/left buttons in object preview if there are not next/previous items
add counter property to project name in "project create". Set max length so that user cannot type additional characters

Issue:
https://github.com/storj/storj/issues/6268

Change-Id: Icff95427a5c73c2fb5bb014ff09150283cc49e83
2023-09-26 11:37:21 +03:00
Ivan Fraixedes
9a06de9058 private/apigen: Add test for Types.All
Add a test for Types.All method because we may need to adjust the logic
in future commits and we want to detect what has changed for good or
bad.

Change-Id: I1db4bf67db3c87513cb9aeb7b942c6c132fc4dd1
2023-09-25 21:15:06 +00:00
Antonio Franco
fe0b5743b0
Af testplan/private cloud (#6265)
* doc(testplan): storj private cloud

* Update storj-private-cloud-testplan.md

this commit pushes the content to the template file and removes unused sections.
2023-09-25 18:44:39 +02:00
paul cannon
1b8bd6c082 satellite/repair: unify repair logic
The repair checker and repair worker both need to determine which pieces
are healthy, which are retrievable, and which should be replaced, but
they have been doing it in different ways in different code, which has
been the cause of bugs. The same term could have very similar but subtly
different meanings between the two, causing much confusion.

With this change, the piece- and node-classification logic is
consolidated into one place within the satellite/repair package, so that
both subsystems can use it. This ought to make decision-making code more
concise and more readable.

The consolidated classification logic has been expanded to create more
sets, so that the decision-making code does not need to do as much
precalculation. It should now be clearer in comments and code that a
piece can belong to multiple sets arbitrarily (except where the
definition of the sets makes this logically impossible), and what the
precise meaning of each set is. These sets include Missing, Suspended,
Clumped, OutOfPlacement, InExcludedCountry, ForcingRepair,
UnhealthyRetrievable, Unhealthy, Retrievable, and Healthy.

Some other side effects of this change:

* CreatePutRepairOrderLimits no longer needs to special-case excluded
  countries; it can just create as many order limits as requested (by
  way of len(newNodes)).
* The repair checker will now queue a segment for repair when there are
  any pieces out of placement. The code calls this "forcing a repair".
* The checker.ReliabilityCache is now accessed by way of a GetNodes()
  function similar to the one on the overlay. The classification methods
  like MissingPieces(), OutOfPlacementPieces(), and
  PiecesNodesLastNetsInOrder() are removed in favor of the
  classification logic in satellite/repair/classification.go. This
  means the reliability cache no longer needs access to the placement
  rules or excluded countries list.

Change-Id: I105109fb94ee126952f07d747c6e11131164fadb
2023-09-25 09:42:08 -05:00
Márton Elek
c44e3d78d8 satellite/satellitedb: repairqueue.Select uses placement constraints
Change-Id: I59739926f8f6c5eaca3199369d4c5d88a9c08be8
2023-09-25 10:14:25 +00:00
Márton Elek
b4fdc49194 satellite/repair/checker: persist placement information to the queue
Change-Id: I51c7fd5a2a38f9f6620c16eddaed3b4915ffd792
2023-09-25 09:33:46 +00:00
Márton Elek
18d5caad7e satellite/satellitedb: write/read placement information to/from repairqueue
Change-Id: Ie58f129feae7898850905940f94643605dcf56ae
2023-09-25 08:52:56 +00:00
Vitalii
7d0b8f6f8c web/satellite/vuetify-poc: center loader in file preview
Vertically centered loader and no preview states for gallery view.

Issue:
https://github.com/storj/storj/issues/6312

Change-Id: Icce4aff6d0927ee36e3a94886edf4cc31dd379bf
2023-09-23 05:11:51 +00:00
Vitalii
5689083393 web/satellite/vuetify-poc: fix limits values formatting on project dashboard
Fixed regular expression which should search and remove insignificant trailing zeros of limit values.

Issue:
https://github.com/storj/storj/issues/6311

Change-Id: I267c779e406a1933d43f09b497470bad9f8ab71c
2023-09-22 21:16:54 +00:00
Vitalii
52d337496f web/satellite: change 'Bandwidth' and 'Egress' labels to 'Download' on project dashboard/settings
Updated label to be 'Download' instead of 'Bandwidth' or 'Egress'

Issue:
https://github.com/storj/storj/issues/6310
https://github.com/storj/storj/issues/6315

Change-Id: Id075882e8dd1e243ca516907d9db420d6d066437
2023-09-22 20:36:22 +00:00
Vitalii
a43f17d9a3 web/satellite/vuetify-poc: use 'Files' header instead of 'Objects' for buckets table
Updated table header to be 'Files' instead of 'Objects'

Issue:
https://github.com/storj/storj/issues/6309

Change-Id: I65058b473481e8b7218db15767c5cb7e2e0c2d8d
2023-09-22 19:01:10 +00:00
Ivan Fraixedes
8381483f79
satellite/admin: Add back-office UI sources
Add the front-end sources of the new back-office.

The front-end doesn't have any business logic, it only has the pages and
the components, so it's purely UI.

The front-end was developed in a separate repository until was
completed.

Change-Id: I382e50789d6b929a67b8a0b887563ef48cb1473d
2023-09-22 18:02:55 +02:00
Dan Willoughby
e563de6c81 web/satellite: Update segment and free tier doc links
4 links updated

Change-Id: I71111079b58542e8c7e4240e2cb55414a7b35934
2023-09-22 11:33:58 +00:00
Jeremy Wharton
5f4cd92cc5 web/satellite/vuetify-poc: clear S3 data when switching projects
This change fixes an issue where the S3 client data was not cleared
when switching projects. This would cause errors to appear when
entering the bucket of a project you switched to.

Resolves #6295

Change-Id: Ib9da43ddf1d38eed6ca26ba73a24e38815617b3e
2023-09-22 00:49:22 -05:00
Jeremy Wharton
e92acca937 web/satellite/vuetify-poc: show loader when creating a folder
This change makes the New Folder dialog indicate its loading status.

Resolves #6307

Change-Id: I37c87ce78f5dfa0d2594e874f248c451fb0d710f
2023-09-21 23:08:24 +00:00
Jeremy Wharton
0205a08c20 web/satellite/vuetify-poc: use image icon for SVGs in object browser
This change makes SVG file entries in the object browser table use the
image icon. Previously, SVGs used the icon for unknown file types.

Resolves #6306

Change-Id: Ic2a8b6154dc222292f3048d967a0420d5872acd0
2023-09-21 22:27:45 +00:00
Jeremy Wharton
6a4abb7f14 web/satellite/vuetify-poc: make project stat cards clickable
When clicked, cards containing project stats will redirect the user to
the card's respective page.

Resolves #6305

Change-Id: I6a598ad2a8a6ab79f48f559eced55f8f8257a518
2023-09-21 21:47:22 +00:00
Jeremy Wharton
15c0c675b1 web/satellite/vuetify-poc: update "Learn More" links in page subtitles
This change updates the "Learn More" links in the Buckets page,
the Team page, and the project dashboard.

Resolves #6293

Change-Id: I2d9c0ca9b8bbd2991869648d231a8069868efdc0
2023-09-21 21:06:57 +00:00
Jeremy Wharton
123309c648 web/satellite: update vuetify dependency
This change updates the Vuetify dependency from 3.3.12 to 3.3.17.

Change-Id: Id570e28c105a10fb2baca25367a4a3e53ce4bf52
2023-09-21 15:55:40 +00:00
Márton Elek
98921f9faa satellite/overlay: fix placement selection config parsing
When we do `satellite run api --placement '...'`, the placement rules are not parsed well.

The problem is based on `viper.AllSettings()`, and the main logic is sg. like this (from a new unit test):

```
		r := ConfigurablePlacementRule{}
		err := r.Set(p)
		require.NoError(t, err)
		serialized := r.String()

		r2 := ConfigurablePlacementRule{}
		err = r2.Set(serialized)
		require.NoError(t, err)

		require.Equal(t, p, r2.String())
```

All settings evaluates the placement rules in `ConfigurablePlacementRules` and stores the string representation.

The problem is that we don't have proper `String()` implementation (it prints out the structs instead of the original definition.

There are two main solutions for this problem:

 1. We can fix the `String()`. When we parse a placement rule, the `String()` method should print out the original definition
 2. We can switch to use pure string as configuration parameter, and parse the rules only when required.

I feel that 1 is error prone, we can do it (and in this patch I added a lot of `String()` implementations, but it's hard to be sure that our `String()` logic is inline with the parsing logic.

Therefore I decided to make the configuration value of the placements a string (or a wrapper around string).

That's the main reason why this patch seems to be big, as I updated all the usages.

But the main part is in beginning of the `placement.go` (configuration parsing is not a pflag.Value implementation any more, but a separated step).

And `filter.go`, (a few more String implementation for filters.

https://github.com/storj/storj/issues/6248

Change-Id: I47c762d3514342b76a2e85683b1c891502a0756a
2023-09-21 14:31:41 +00:00
Jeremy Wharton
950672ca6c web/satellite/vuetify-poc: implement Manage Passphrase dialog
This change implements the Manage Passphrase dialog in the Vuetify
project. Within it, users can create, switch, or clear the current
passphrase.

Resolves #6284

Change-Id: I2ca87e62b59c0cefd13bf36005c9301b35f12255
2023-09-20 18:36:21 -05:00
Jeremy Wharton
471111122b web/satellite/vuetify-poc: implement Delete Access dialog
This change implements the Delete Access dialog for deleting access
grants. It is triggered by clicking Delete in the actions menu of
access grant table rows.

Resolves #6300

Change-Id: I288f9a88c62e57390f039e41ca6770d2942a9058
2023-09-20 22:08:30 +00:00
Cameron
22261146be cmd/uplink: don't output stacktrace with unknown access
A stacktrace is unnecessary for this error, so don't print one.

https://github.com/storj/storj/issues/5910

Change-Id: Id9e5d9d188042cc7ac0dba571138d5f3e331a9d6
2023-09-20 10:06:47 +00:00
Ivan Fraixedes
926076bffd private/apigen/example: Add description to endpoint
Add the description field to the endpoint to show where it ends up when
generating code.

Change-Id: I415f088dbf795656ed1ef042ed41ebf39a517692
2023-09-19 18:31:20 +00:00
Wilfred Asomani
e599df03a8 satellite/console: add more cross-user api tests
This change adds more endpoints to the cross-user api test.

Issue: https://github.com/storj/storj/issues/6246

Change-Id: I4c3128c3a932c713b10499a8909836a599b79458
2023-09-19 16:50:31 +00:00
Cameron
a2d37bc69a {satellite/console, web/satellite}: send analytics if invitee signs up
send analytics event if project invite link is clicked and if user
signs up.

github issue: https://github.com/storj/storj/issues/5190

Change-Id: I41eee5e679a84b9ec325815655684a98624d5656
2023-09-19 14:50:44 +00:00
Vitalii
81d49ada06 web/satellite: slightly refactored billing modals
Slightly refactored html and css code (it's still weird) of billing modals.
Probably there is no reason to rework it entirely since we're going to migrate to Vuetify project.

Issue:
https://github.com/storj/storj/issues/5220

Change-Id: I25b4b0cdb9d4d24ef3d1f615f2a3471b2d3e727d
2023-09-19 14:01:31 +00:00
Wilfred Asomani
0a063fdeb3 web/satellite/vuetify-poc: require MFA code to generate MFA recovery codes
This change uses the code protected MFA code generation endpoint. It
requires a code from the user before generating new recovery codes.

Issue: https://github.com/storj/storj-private/issues/433

Change-Id: I38c7c6f543a1d0c68aa1c2e9092e76fed2448467
2023-09-19 08:28:10 +00:00
Márton Elek
5bbd477a58 go.mod: bump dependencies (uplink,common,monkit)
Change-Id: I72e17c3acbabd36ffb0a0adbcccec4c252ba710c
2023-09-19 00:35:07 +00:00
Jeremy Wharton
3104a830ae web/satellite/vuetify-poc: unmock list of owned and shared projects
This change shows real projects in the Project dropdown of the project
navigation sidebar, replacing mock data.

Resolves #6283

Change-Id: Id8eef6cc02b5b773f89a00d41d5335ae2feb1729
2023-09-18 23:53:43 +00:00
Michal Niewrzal
5d0934e4d9 satellite/metabase/rangedloop: disable ranged loop for tests
Currently each testplanet test is running ranged loop no matter if
it's used or not. This is small change with some benefits like:
* saves some cpu cycles
* less log entries
* ranged loop won't interfere with other systems

Change have no big impact on tests execration but I believe it's nice to
have.

Change-Id: I731846bf625cac47ed4f3ca3bc1d1a4659bdcce8
2023-09-18 22:51:10 +00:00
Jeremy Wharton
95d87f5a22 web/satellite/vuetify-poc: remove Browse from project nav sidebar
This change removes the Browse item from the project navigation
sidebar. This item didn't do anything, and we have no plans to use it.

Resolves #6281

Change-Id: Ifed6a563e38585955b0bf180c2896d6d224cb7dc
2023-09-18 21:58:26 +00:00
Andrew Harding
fd679c329c private/server: FreeBSD TCP fastopen support detection
Detects whether or not TCP fastopen is supported by running sysctl to
grab the current value of net.inet.tcp.fastopen.server_enable.

If not enabled, directs the operator to use sysctl to set it temporarily
and /etc/sysctl.conf to set it on-boot.

Setting the socket option always works whether it is enabled or not.

Verified that fastopen works on FreeBSD 13. Did not attempt on earlier
versions but support has been there since FreeBSD 10.

Change-Id: I2e0c457558a6fa7b7a1b18bc3c6684aff50b81a2
2023-09-18 21:17:42 +00:00
Jeremy Wharton
ad5c2e171a web/satellite/vuetify-poc: add tier indicator
This change indicates the user's tier in the My Account dropdown button
of the Vuetify project.

Resolves #6278

Change-Id: I0db6bfe8e03720b87ff77e947f785031eed7e528
2023-09-18 15:25:53 -05:00
Egon Elbre
c48f58e968 satellite/metabase: simplify BeginExactObject
There's only one value that BeginExactObject should return and there's
no point in restating that.

Also, use a clearer value for the random object version.

Change-Id: I06b26ad87d64e1b04b48458f624edd630f7f2f1d
2023-09-18 19:26:49 +00:00
Jeremy Wharton
109c0d5e37 web/satellite/vuetify-poc: make Resources dropdown items functional
This change adds functionality to the items in the project navigation
sidebar's Resources dropdown menu.

Resolves #6282

Change-Id: I64e0d472592ec07545034adff6a3c2122fcc113c
2023-09-18 18:47:05 +00:00
Jeremy Wharton
012e1fbc06 cmd/uplink: use configured user agent
This change fixes an issue where the configured user agent wasn't used
by Uplink commands.

Resolves storj/customer-issues#999

Change-Id: I2d9f38308eddad7c471a100c968082783c05a3b3
2023-09-18 18:00:34 +00:00