Commit Graph

8820 Commits

Author SHA1 Message Date
Ivan Fraixedes
ed67ce33bb
satellite/console: Clarify return params of interface method
Name the return parameters in a User interface method to clarify what
they are.

Change-Id: I6a5c97659c8167df89b38016fcccbc8eb70a09c5
2023-11-17 11:45:52 +01:00
Márton Elek
257bdbac32 satellitedb/repair: update placement when InsertBatch updates records
Change-Id: If974ff5d57abbe5bd16ce4cb6643d8a12314fe12
2023-11-16 18:55:18 +00:00
Vitalii
e474b9728c web/satellite: fix redundant redirect on first login
Not partnered users were redirected to onboarding pricing plan step and back to all projects dashboard in case when they have not finished onboarding. That caused tons of redundant API requests to be done.

Change-Id: I454a8cc29730943b84a351416b78c4281c47f6ca
2023-11-16 18:05:46 +00:00
Jeremy Wharton
1ea81c8887 satellite/admin/back-office: add endpoint to get placement info
This change adds an endpoint to the back office API that returns
placement IDs and their locations.

References #6503

Change-Id: I20ee1c82dcb647d6d264317beceeb5e70f7a8e87
2023-11-16 13:15:32 +00:00
Ivan Fraixedes
e67691d51c private/apigen: Remove support for anonymous types
I made several commits to add support to the API generator for
anonymous types because the example was using them.

Later, I was told that we don't need to support them, so the example
should have never used anonymous types.

Supporting anonymous types has added complexity to the API generator and
we are finding bugs in corner cases whose fixes lead to adding more
complexity and some fixes doesn't seem to have a neat solution without
doing a big refactoring.

We decided to reduce the side effects that supporting anonymous type has
brought just removing it.

This commit remove the support for anonymous types and reflect that in
the example.

Change-Id: I2f8c87a0db0e229971ab1bef46cca16fee924191
2023-11-16 12:29:21 +00:00
Ivan Fraixedes
418673f7a2 satellite/admin/back-office: Implement authorization
Implement the authorization that will hook into each endpoint handler
through a wrapping handler for defining the permissions that each
endpoint requires.

Change-Id: I9c8f12b58f48e849e7ea35f372dddce5c9cfc5b5
2023-11-16 11:37:55 +00:00
Igor
720b75ad73
docs/testplan: add object versioning testplan (#6444)
* docs/testplan: add object versioning testplan
2023-11-16 11:46:25 +01:00
Ivan Fraixedes
359c09b57f satellite/admin/back-office: Specify router path prefix
For convenience of not having to modify the API generator to contemplate
the path prefix that we are adding to the back office server, we define
the path prefix in a constant than the admin server and the definition
of the API uses to adapt the router and the generated code.

Change-Id: Ic557b0e6e88e930e03647835759bb34e06e8bb48
2023-11-15 20:28:52 -06:00
Jeremy Wharton
032faefa4b private/apigen: fix URL construction in generated TypeScript code
This change fixes an incorrect invocation of the URL object constructor
in generated TypeScript HTTP clients.

Change-Id: I9011bc535f2096374d20b74b401d4cc38a0451fb
2023-11-16 01:12:58 +00:00
Vitalii
cfb7f55220 satellite/console: update project usage-limits endpoint to also return buckets count/limit
Extended {projectID}/usage-limits endpoint to also return buckets count/limit.

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

Change-Id: Ibc8956a2c10c9f383324e049f4b093410cbea899
2023-11-16 00:08:59 +00:00
Michal Niewrzal
6834c04539 satellite/metabase: drop pending objects table support
We decided that we won't use seprate table for handling pending
objects. We need to remove related code.

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

Change-Id: I442b0f58da75409f725e08e2cd83d29ed4f91ec6
2023-11-15 23:19:46 +00:00
Vitalii
cd9518a3c3 satellite/{accounting, console}: remove unnecessary fields from usage report
Removed MetadataSize, RepairEgress, AuditEgress fields from usage report because they are not relevant.

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

Change-Id: I8ef7d56bd1b01cdb53cec8c67dd47a6a0e7fa184
2023-11-15 22:31:29 +00:00
Jeremy Wharton
a52934ef4d private/apigen: prevent self imports
This change prevents Go code produced by the API generator from
importing its own package. Previously, we tried to prevent self imports
by skipping import paths whose last segment matched the generated Go
code's package name. However, aliased imports circumvented this.
We now require API definitions to define the Go package path so that we
can compare this with the import path directly.

Change-Id: I7ae7ec5e1a342d2f76cd28ff72d4cd7285c2820a
2023-11-15 21:41:20 +00:00
Wilfred Asomani
24370964ab satellite/{console/payment}: wrap freeze code in transactions
This change wraps account freeze code in DB transactions to prevent
freeze inconsistencies resulting from errors that happen in the process
of freezing accounts.

Change-Id: Ib67fb30dc33248413d3057ceeac5c2f410f551d5
2023-11-15 20:40:54 +00:00
Egon Elbre
1105deba48 storagenode/blobstore/filestore: fix flaky TestTrashAndRestore
The result sorting was not correct causing occasional failures.

Fixes https://github.com/storj/storj/issues/6511

Change-Id: I09242846eda7c40198e7375ce218cb7026f9e7e4
2023-11-15 19:52:37 +00:00
dlamarmorgan
25262d62f3 satellite/metabase: add version tests to FinishMoveObject
Change-Id: I7603e0ff7819ad781a8ef5acb87e5efd9edc0b7f
2023-11-15 18:21:04 +00:00
Jeremy Wharton
f1ce0ab6d0 private/apigen/example: use hardcoded time
This change makes the example API definition use a hardcoded timestamp
rather than the current time so that files aren't unnecessarily
changed each time the API code is generated.

Change-Id: I72e4ec98d29345b9f16ca2ca38a91e593f83ea87
2023-11-15 16:52:18 +00:00
dlamarmorgan
2ed05314fc satellite/metabase: add tests FinishCopyObject
Change-Id: I94a6071c797857e8d5ba50d069500d8d1f10185f
2023-11-15 14:39:55 +00:00
Michal Niewrzal
90ed7ca070 satellite/metainfo: allow returning delete marker with GetObject
To be compatible with S3 we need to return 'Method Not Allowed' when
delete marker is requested and to do this libuplnk needs to know about
delete marker. It will be returned only if object version will be
specified.

Change-Id: I288da5566c74e1b4951f7cd249dbf34622b92e91
2023-11-15 12:18:38 +00:00
Michal Niewrzal
d2083281c9 satellite/metainfo: drop pending objects table support
We decided that we won't use seprate table for handling pending
objects. We need to remove related code.

After this change we still needs to remove related code from metabase.

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

Change-Id: Idaaa8ae08b80bab7114e316849994be171daf948
2023-11-15 10:55:08 +01:00
Jeremy Wharton
40d67065ba web/satellite: statically serve Papa Parse worker
Papa Parse, the library we use to parse CSV files in the satellite UI,
uses a blob URL for its worker. This isn't allowed by our content
security policy, so this change implements a Vite plugin that writes
the worker code to a file that is statically served.

Change-Id: I0ce58c37b86953a71b7433b789b72fbd8ede313d
2023-11-14 18:24:38 +00:00
JT Olio
9930b86791 go.mod: bump storj.io/common
Change-Id: Ifae770c2eb8dd398e3e049240afa14714c605cba
2023-11-14 16:58:51 +00:00
Ivan Fraixedes
e39f395cf1 satellite/admin/back-office: Use PathPrefix value
PathPrefix is the full path of the subrouter passed to the back office
server when it hooks into another server, in this case, the satellite
admin server.

PathPrefix allows to serve the static assets from the root of the
sub-router when the prefix is stripped before accessing them.

There was a bug where the PathPrefix weren't used and a hard-coded path
was used.

Test passed because the back-office server is hooked into the satellite
admin server with a subrouter with path `/back-office/` which matched
the hard-code value, however, it wouldn't work if that path changed or
it is hooked into another server with a different subrouter path,
despite it was set to PathPrefix.

This commit fixes that bug.

Change-Id: Id4a0d86329eb563b008b3fc6f8eb7b51cbfd2e6f
2023-11-14 16:05:04 +00:00
Vitalii
fe890ff535 web/satellite/vuetify-poc: add low token balance banner
Added low token balance banner to vuetify app with the same logic as in main app.

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

Change-Id: Ifa9af8e2179ec3a6601b5053575990b86cc8f0b5
2023-11-14 16:43:47 +02:00
Wilfred Asomani
cd8e9bd044 satellite/{payment,console,analytics} extend freeze functionality for legal freeze
This change extends the account freeze functionality account for legal
freezes as well. This is a freeze event for accounts to be put on hold
for legal review. It also sets the LegalHold status on the affected
user.

Issue: storj/storj-private#492

Change-Id: I8c733269b5cfb647c840379a6bb033da120c8280
2023-11-14 11:09:25 +00:00
Igor
a053b210a5
scripts/draft-release.sh: ignore warning (#6496) 2023-11-13 14:20:24 +01:00
Wilfred Asomani
443a7b220e web/satellite: fix storj token card flexible height
This change fixes an issue where the storj token cards will extend
their height to match their parent, causing them to get taller when the
add card form is showing.

Change-Id: I22219c8e537bda6555c8c3bf813f9649b664639a
2023-11-13 10:53:27 +00:00
Wilfred Asomani
dc28dadbc2 satellite/{web,console}: add config for payment element
This change adds a config flag for whether the stripe payment element
should be used to collect card info.

Change-Id: I301cf69e6f1b64350266e8f2286542b951e216c4
2023-11-10 23:18:12 +00:00
Vitalii
7c7123a156 web/satellite/vuetify-poc: updated warning state copy for enter bucket dialog
Updated copy to be the same as in main app.

Change-Id: I856248db2965837449aa51eb6058f28268a93d5a
2023-11-10 20:08:07 +00:00
Michal Niewrzal
b96e7401c3 satellite/metainfo: add TestEnableBucketVersioning flag
Additional feature flag (onyly for testing) to set versioning enabled
for all new create buckets. We need it until we will have support
for enabling/disabling versioning for bucket on metainfo API.

In addition this change is fixing also two small issues which makes
testing this flag imposible:
* metabase Status list was not aligned with protobuf definition
* object retruned by metainfo API didn't have correct status set in some
cases

Change-Id: I0d63dff6a08efa588c8999af1e17db476943e067
2023-11-10 19:19:30 +00:00
Wilfred Asomani
e9fd430d01 storj: remove instances of DCS and OSP
This change replaces with "Storj" all instances of "Storj DCS" or
"Storj OSP".

Issues: storj/storj-private#479
#5069 and #5839

Change-Id: I78d13f2abd8bde5d2cb42d8006016ee87130a566
2023-11-10 18:29:48 +00:00
Michal Niewrzal
e592138c51 satellite/metainfo: align object version format with minio
For some reason minio sometimes validates versionID as UUID. Until
we decide what to do lets align our version format with it.

Change-Id: I6e9832d0adc1d3b6e3f46688b386e0e118219038
2023-11-10 16:52:19 +00:00
Vitalii
f2ccb910df web/satellite: fix low token balance banner's show condition
Fixed the condition when low token balance is shown.
The bug was related to account balance being returned in dollars instead of cents and this was not handled by 'sum' method.

Change-Id: I35f642302d877c9b1ed9f6f1d03d6091f2942a0b
2023-11-10 17:08:35 +02:00
Moby von Briesen
cdcd3b2687 satellite/console,web/satellite: add feature flag for limit increase req
This change adds a feature flag (default disabled) to enable the ability
to submit a project limit increase request directly from the UI. When
this feature is disabled, the user will be directed to a page to file a
support ticket.

Resolves https://github.com/storj/storj/issues/6480

Change-Id: I5f355dcb1a40e5b694f9623f05fe706ed4d6a528
2023-11-10 08:07:13 +00:00
Vitalii
147076a696 web/satellite/vuetify-poc: notifications for getting close to limits
Added notification banners on project dashboard when user is close to or reached some particular project limit.
Implementation is similar to main app notifications.

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

Change-Id: Ifaf14facabd0b57f45431c874cfd6fcc1e991282
2023-11-10 02:31:25 +00:00
Wilfred Asomani
98234e76b7 satellite/{payment,console} add legal hold user status
This change introduces a new user status, LegalHold to be used to pause
an account while it is under legal review. It also modifies the
condition whether to generate invoices for a user to apply to this new
status.

Issue: storj/storj-private#492

Change-Id: Idc9a6166cc96178a95e45cf7c0f2e982631ca021
2023-11-09 23:42:26 +00:00
Wilfred Asomani
76594466ef web/satellite/vuetify-poc: add pagination to browser card view
This change adds pagination, sort and search to the object browser card
view.

Issue: #6427

Change-Id: I4cc42f3062a7cbd06d9f253e4864478f0b430fc8
2023-11-09 22:54:51 +00:00
Tome Boshevski
83ea3772e2 web/satellite/vuetify-poc: ui ux improvements
This change improves the satellite v2 user interface and overall
experience.

Change-Id: I702a6aa6b0b1a676bb2c404ab54f0ecef3b1ad7a
2023-11-09 20:25:34 +00:00
Tome Boshevski
07e2a9af06 web/satellite: update charts styling
This change updates the styling of the satellite UI dashboard charts
to prepare for V2.

Change-Id: Ic329963a6b825e3e4aaecab0696080a152a41c5f
2023-11-09 13:31:50 -06:00
paul cannon
c246d36adf satellite/metabase: tests for versioning in TestIterateObjectsWithStatus
Credit to the tests in TestListObjectsVersioned(), which (since
ListObjects is logically a pretty thin wrapper around
iterateAllVersionsWithStatus()) were able to be translated to tests in
TestIterateObjectsWithStatus with only minor changes.

Change-Id: I6e68675b24fee614e44baddf596703115554014e
2023-11-09 17:25:44 +00:00
Michal Niewrzal
c9430c22b5 satellite/metainfo: wire versioning with commit object operation
Change-Id: Ib19b5bade69dfb3f02256c638cc2f6281befa415
2023-11-09 11:21:58 +00:00
dlamarmorgan
539b32d01e satellite/metainfo: add UseBucketLevelObjectVersioning by project
This small feature flag will give us the ability to test object
versioning for specific projects without enabling it globally.

Change-Id: I78301f071b7b8079dd1bd4a561fce0800ce9f074
2023-11-09 11:21:06 +00:00
paul cannon
dc5ae6f4f6 satellite/gracefulexit: add test for GE through upgrade
This creates an automated test for the situation where a node initiates
graceful exit while TimeBased is off, and then TimeBased is turned on
before the node has completed graceful exit. The node should no longer
try to transfer any more pieces, but should instead sit and wait until
the graceful exit period has elapsed.

Change-Id: Iaf636f9247bc878bc20041221e1a8014c77806ad
2023-11-09 08:58:16 +00:00
Michal Niewrzal
3e1b108b84 satellite/metainfo: return correct version with ListObjects
ListObjects method will now return correct object version.

Change-Id: I663c506079b21f238026bd6ffac2384eae521635
2023-11-09 07:41:22 +00:00
Jeremy Wharton
404bddd2a4 cmd/storj-sim: increase satellite contact grace period
This change increases the grace period within which test satellites
are expected to respond after being instantiated. Our Jenkins build
pipeline for GitHub was failing because the grace period was too short.

Change-Id: I8bfd7c771660fc39f6eb988f95d706809f936d00
2023-11-08 22:46:41 +00:00
Moby von Briesen
b56a158100 satellite/analytics: Send signup captcha score to analytics
Send signup captcha score (if it exists) to Hubspot and Segment, so that
we can implement logic based on this in the analytics platforms.

Change-Id: Ic4e166639c9ab8e872a212e7466e82433c9ea6d4
2023-11-08 21:56:11 +00:00
Clement Sam
e27381f3af private/version: use minimum key in new sem version
Much evident on the storagenode dashboard, the minimum
version shown is a very old version and that is taken
from the deprecated part of version info from the
version control server, and we no longer update the
deprecated part on the server.

This change forces it to use the new sem version, and
checks for the old version if the server is probably
running an old version of the version control system.

Also fixes a bug where the suggested version returned
for all processes is taken from the storagenode part.

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

Change-Id: I57b7358c2826a6e25f441dfa9579a1aef50a7e89
2023-11-08 21:08:01 +00:00
JT Olio
98032f2b1f satellite/payments/stripe: another loop variable capture
Change-Id: I9ec7226befb8ebe18c7833b1c1d7ee8661bd9032
2023-11-08 20:43:54 +00:00
Márton Elek
7d8f0845fd
satellite/durability: calculate busfactor for classes
WARNING: THIS COMMIT IS ACCIDENTALLY MERGED WITH THE PREVIOUS ONE. BUT I KEEP THE COMMIT MESSAGE FOR IT’S VALUE. CODE IS IN THE PARENT

As Wikipedia defines, bus fator is "the minimum number of team members that have to suddenly
disappear from a project before the project stalls due to lack of knowledgeable or competent personnel."

We use similar definition, but instead of team members, we check the pieces of one segments.

For example, if we have a segment with 10 pieces in US, 8 pieces in DE and 3 pieces in other countries,
traditional bus factor (50) is 2, as we need two contry down (10 + 8) two loose at least 50% of the pieces (10.5).
Loosing just one contry, we will have <50% of th pieces.

In our implementation we are not interested about the 50% threshold, but a configurable value.

As a default we use the repairThreshold - minimalNumber.

With the usual defaults (54 - 29) it's 25. So bus factor can be defined sg. like this:

How many GROUP should disappear from the network to drop the healthy count from repair threshold to the minimum number.

This is critical, as we don't repair anything above the repair threshold, but heatlhy piece number can drop
if the given amount of groups (subnets, countries...) live the network...

Change-Id: I606f091469b45e90f3a9eb8fcff65a834ff27a14
2023-11-08 21:17:54 +01:00
Márton Elek
0ef3247d44 satellite/durability: make benchmark even quicker
To make sure that Benchmark tests are good, we run them with -short flag, eg:

```
go test -short -run=BenchmarkDurabilityProcess
```

Durability benchmark already supports this, but we can make it slightly more faster with
using less sgements and pieces during the `-short` run.

Change-Id: I9547ca1e3cd0178eb395a7a388f2e7936a9862d7
2023-11-08 19:00:30 +00:00