Commit Graph

8590 Commits

Author SHA1 Message Date
Egon Elbre
27a13efb17 satellite/console/consoleweb/consoleapi: fix defer in loop
Change-Id: Ifdedad8a5556be47b5f99dc8d8a8ff67904e2688
2023-10-05 12:55:36 +03:00
Egon Elbre
800bba7a0e go.mod: bump uplink
This brings in 32bit arm bug fix.

Change-Id: I61b72abf2366643f58b1e670d2e02f4072aee0b5
2023-10-05 08:51:11 +00:00
Ivan Fraixedes
99c4359062 private/apigen: Avoid clashes of types names
The TypeScript generator create types of anonymous structs. When those
anonymous structs are in endpoints with the same name, but in different
endpoint groups, the generator panic because it create different types
with the same names.

This commit fixes that problem through using the endpoint group prefix
to create the types with different names.

Change-Id: Ibe87532609ce824b80951326f9777ed5b0cc2f7a
2023-10-05 07:30:09 +00:00
Ivan Fraixedes
3193ff9155 private/apigen: Don't force casing for API group name/prefix
The API generators rely on the Name and Prefix fields of the
EndpointGroup type to generate code.

Conventional naming code requires using upper or lower case for types,
functions, etc, however requiring the user to set this fields with the
correct casing seems cumbersome for them because they can be adjusted
depending where those values are used on the generated code.

This commit lifts the restriction for the user and adjust the casing of
them according to where they are used.

Change-Id: I700a879d13b4789b4d6ba0519b4d7508061eac73
2023-10-05 06:48:50 +00:00
Sean Harvey
7b50ece931
satellite/admin: add missing test assert to project geofence tests
the existing test was missing a case where deleting the geofencing
should set the placement back to default.

this also changes EveryCountry to DefaultPlacement, as the former is
deprecated.

Change-Id: I29f4f1c3ae1d05e8f5ecaa03a70ac4f17574a475
2023-10-05 18:21:48 +13:00
Vitalii
95958a3c5c web/satellite/vuetify-poc: emit success notification on access grant delete
Show success notification after access grant deletion.

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

Change-Id: Idebc4210ff5efbaab0c71ad519d34de4e1803420
2023-10-04 20:21:26 +00:00
Ethan Adams
6961d2e19d satellite/email: Add support for unauthenticated, cleartext SMTP connections
Change-Id: I11b4852122764c1ede188ca40d5edb14f2c4ee72
2023-10-04 16:55:55 +00:00
paul cannon
02899dfae2 satellite/{admin,console,satellitedb}: fix geofence removal
deleteGeofenceForProject wasn't able to work correctly, because
Console().Projects().Update() declines to update default_placement when
the input value is 0.

This introduces a Console().Projects().UpdateDefaultPlacement() method,
congruent to the method of the same name on Console().Users().
deleteGeofenceForProject now uses this new method, so that specifying a
new placement of 0 will work correctly.

Change-Id: I4589b36707f7e4f1cfdc66543520b0d4205c1a84
2023-10-04 16:14:29 +00:00
Moby von Briesen
a2acf359ad satellite/satellitedb: Remove dbx references to partner_id
This column is no longer used, but it is referenced in dbx. This change
removes those references and adds an exception to the migration test to
disregard this column in schema comparison.

After this change is deployed, we will need to follow up with a
migration to remove the column in a later release, and remove the
exception in the migration test.

Related to https://github.com/storj/storj/issues/5432

Change-Id: I168fb57244b347901d1ed9c7813c1338554ee644
2023-10-04 15:33:44 +00:00
paul cannon
c33475f63e storagenode/gracefulexit: fix flaky test (hopefully)
If the storagenode chore is left running and it has a chance to check in
again after we move time forward (line 139), then the satellite will
mark it as having finished GE before we check which nodes are still in
GE (line 149).

Change-Id: I350e1ef2e943f758d44132aaddd05fe248b30f3e
2023-10-04 09:53:51 -05:00
Ivan Fraixedes
47f344927d
private/apigen: Fix TS generator to apply naming conventions
Fix the TypeScript generator to generate code using the common
TypeScript conventions.

Closes https://github.com/storj/storj/issues/6360

Change-Id: I244896feea389670eca0df95d3ac58e25d600e14
2023-10-04 13:47:33 +02:00
Ivan Fraixedes
71c9547de5
private/apigen: Don't allow certain types for Request/Response
We cannot map certain types to TypeScript, hence we verify them in the
Endpoint.Validate method.

Even some types could be somehow mapped, we don't want to add more
complexity or allow types that don't make sense to be for a request or
response.

Change-Id: I51ecee286e637b1160e967d77f9ce6c7403ddfdc
2023-10-04 13:46:54 +02:00
Ivan Fraixedes
956109a097
private/apigen: Rename Endpoint fields
Rename the Endpoint fields MethodName and RequestName because they were
confusing for what they are used.

This commit also adds some validations for these fields values and other
validations for Endpoint and EndpointGroup to avoid generating invalid
code.

It also include some tests for these new validations.

Closes https://github.com/storj/storj/issues/6333

Change-Id: Iaabfc33935517889e3729c8b37be51a55eea366c
2023-10-04 13:46:54 +02:00
Ivan Fraixedes
ac86eb397a
private/apigen: Fix bug TypeScript optional class members
The TypesScript generator generates classes and checks for Go struct
field if the struct type is of a nullable type, however, it should check
if the field types is nullable because it doesn't make sense to check
that struct field for each field nor to assign to the field if it's
nullable or not depending on it.

Change-Id: Ia22a609a17752f520233c006cba17685fe142b32
2023-10-04 13:46:08 +02:00
Sean Harvey
bc7f621073
satellite/satellitedb: fix DefaultPlacement overwritten on user
this fixes cases where it's possible to update a user and the
DefaultPlacement field gets overwritten to the zero value.

it also adds UpdateDefaultPlacement which can be used to set
DefaultPlacement directly. This is needed for the geofencing
endpoints in satellite admin to set the DefaultPlacement back
to zero to delete geofencing for a user.

Change-Id: If2c798dabfa6773ed6023fb8257bf00ec7bc2e68
2023-10-04 15:17:35 +13:00
Márton Elek
6304046e80 satellite/nodeselection: read email + wallet from db to SelectedNode
NodeSelection struct is used to make decisions (and assertions) related to node selection.

Usually we don't use email and wallet for placement decision, as they are not reliable.

But there are cases, when we know that the email address is confirmed. Also, it can be used for upper-bound estimations (if same wallet is used for too many pieces in a segment, it's a sign of a risk, even if not all the risks can be detected with this approach, as one owner can use different wallets).

Long story short: let's put wallet and email to the SelectedNode.

Change-Id: I922185e3769d43eb7762b8d60d88ecd3d50991bb
2023-10-03 18:15:56 +00:00
paul cannon
a06735c1b6 satellite/gracefulexit: add missing test cases
These test cases are the parts of the testplan for the Graceful Exit
Revamp which are automateable but not yet automated.

I'm not entirely sure why we have to reject graceful exit from nodes
that are suspended, but implementing that was probably easier than
convincing everybody that it's not necessary.

Refs: https://github.com/storj/storj/issues/6369
Change-Id: I0261b37f7e010d72d84332cde5dd8689f7c41580
2023-10-03 17:35:20 +00:00
Clement Sam
a2c162db9b storagenode/trust: ensure trust pool updates satellite status on Refresh
Fixes https://github.com/storj/storj/issues/6261

Change-Id: Ic01ce423156058dd4676fb073c0de3d768991d0e
2023-10-03 16:54:00 +00:00
dlamarmorgan
8a1bedd367 satellite/payments/{billing,stripe}: handle pending invoice payments
Currently, pending invoice payments that are made using a users token
balance can get stuck in a pending state if the invoice is not able
to be paid appropriately in stripe. This change addresses these stuck
token invoice payments by attempting to transition them to failed
if the invoice cannot be paid.

Change-Id: I2b70a11c97ae5c733d05c918a1082e85bb7f73f3
2023-10-03 16:12:39 +00:00
Wilfred Asomani
2e87df380d satellite/{web,console}: return empty payments list on no wallet error
This change modifies wallet payments endpoints to return empty lists
instead of returning a 404 error if a wallet is not found for a user.

Change-Id: Ic765fecbc8183d14f179ce1d510ae512d8e0c4a9
2023-10-03 14:53:17 +00:00
Tome Boshevski
512e063a79
web/satellite: ui updates (#6366)
* web/satellite: ui updates

Updating global styles, theme, ui components, charts design, actions and dialogs.
Added new icons and replaced current to use icon components with consistent width.
Changed project card with new details button.
Updated the same button for actions across the tables and the actions dialog that it shows.
Changed the account menu with the account type displayed on top.
Add notification in invite team members dialog to explain passphrase.

* web/satellite: ui updates lint fix
2023-10-03 10:51:27 -04:00
Vitalii
487ac17870 web/satellite/vuetify-poc: updates for dashboard limit cards
Updated segment card CTA behavior.
Updated coupon card title, used label and CTA behavior.

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

Change-Id: I86f242208cd4f17ab9d5d61967b22ff740c4edd4
2023-10-03 13:05:23 +00:00
Michal Niewrzal
2c76c1e6ae satellite/satellitedb: alter bucket_metainfos primary key
Current bucket_metainfos table schema was far from optimal. All
operations are using project_id and name to find bucket but primary key
was on id field which is completely not used. Turns out that secondary
index was not as fast as it could be because each select was also joining
primary index which was slowing down whole query.

Primary key is changed to project_id/name. Other indexes are dropped
and id column is now nullable which gives us space for dropping it
completely from schema and code later.

Change-Id: I477056a4243d39e39489f1473de01ded1ed24bbb
2023-10-03 12:23:00 +00:00
Vitalii
eddfacc2e9 web/satellite/vuetify-poc: remove project member feature
Implemented remove project member functionality.
Also, fixed project members search/pagination/sort functionality to work through backend.

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

Change-Id: I0a8df1578a8c7ab9b7d6ce8e2687a3a02cf6be57
2023-10-03 11:41:51 +00:00
Jeremy Wharton
fd835859d5 go.mod: bump stripe-go from v73 to v75
This change updates the version of the stripe-go dependency from v73 to
v75 in order to improve performance (see stripe/stripe-go#1728).

Resolves #6287

Change-Id: I727ac08dcaa90d7138ba30d907711cc44daf0b7a
2023-10-03 10:12:29 +00:00
Vitalii
a7c246badc web/satellite: reworked delete bucket modal
Reworked delete bucket modal:
- updated styling
- added bucket name label which is supposed to be deleted

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

Change-Id: I0d254d45a11878c86847020e2f8c172c2dfbec98
2023-10-03 12:31:30 +03:00
Jeremy Wharton
2f19636eb3 go.mod,satellite/payments/stripe: bump stripe-go from v72 to v73
This change updates the version of the stripe-go dependency from v72 to
v73. This is part of a process to reach v75, which contains performance
improvements.

References #6287

Change-Id: I95f132378fe05e506f0388a0fe039cb1c2db58e2
2023-10-03 07:38:07 +00:00
Cameron
4d5335dbe9 web/satellite: use project limits for upgrade modal
use project limits instead of user limits for upgrade modal in case the
project limits were increased manually.

issue: https://github.com/storj/storj-private/issues/435

Change-Id: Ib70386b390527e96a78461354996ce9a74caa61b
2023-10-03 01:44:34 +00:00
Vitalii
25ffa3ad11 satellite/analytics: stop sending normal account activity events directly to Hubspot
Removed code which was responsible for tracking regular user activity in hubspot.
The only direct event we send to Hubspot is 'user created'.

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

Change-Id: Ia6da30374f91369372af8fe5b5990ec5672fc03b
2023-10-02 22:48:15 +00:00
Vitalii
5295afb2da web/satellite: use modal instead of old create project view
Use newer modal instead of old create project view.
Also, created new composable to handle create project click.

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

Change-Id: I50fce95924c5511c4a31e8f6e7ad271d3ff7081c
2023-10-02 22:07:12 +00:00
Ivan Fraixedes
9d7ef17a26
private/apigen: Fix code generation for slices & arrays
Fix the API generator to generate valid TypeScript code when using
slices an arrays of any type (base types, struct types, anonymous struct
types, etc.).

Closes https://github.com/storj/storj/issues/6323

Change-Id: I580ae5305c58f65c2e4f4a35d14ca4ee509a9250
2023-10-02 17:05:35 +02:00
Igor
bde3e48842
docs/testplan: Adding a testplan for GE revamp (#6355) 2023-10-02 16:56:09 +02:00
Egon Elbre
c6436e1500 satellite/metabase: rename BeginObjectExactVersion method
With the upcoming versioning changes `BeginObjectExactVersion` makes
only sense for testing. Currently this does not rename the options
struct or move it into `metabasetest`, because it would create a
significant amount of merge/rebase noise.

Change-Id: Iafa2f81a05ae66320bc6a839828217ec94c63e1f
2023-10-02 16:17:13 +03:00
Michal Niewrzal
bec981aa7a gc-bf: add live count observer to loop
To live count observer is emitting metric with number of segments
already processed. It's handy to see current progress.

Change-Id: Id6766b5ec9b05bce8f6376e9afcae91fcf7df6fd
2023-10-02 12:35:27 +00:00
Wilfred Asomani
33fe731620 satellite/{payment,console} rename freeze events and add violation event
This change introduces a new freeze event, ViolationFreeze, for ToS
violations and also prepends other events with Billing to clarify what
they signify.

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

Change-Id: Ieef2abbbb03d06377dc7a73ba5ef0742ada75e8e
2023-09-29 16:52:23 +00:00
Jeremy Wharton
4dbf26e153 web/satellite/vuetify-poc: shorten project ID in URLs
This change shortens the project ID path segment in Vuetify URLs in
order to make the URLs more aesthetically pleasing and allow users to
see more of the URL in the address bar. The ID path segment is now 11
characters long instead of the previous 36, but in rare cases where a
user is a member of multiple projects with the same ID prefix, it
expands to preserve uniqueness.

Resolves #6308

Change-Id: I25a51d05b72d2cc701c0aa2cd3a6d070080c4b1e
2023-09-29 16:11:21 +00:00
Wilfred Asomani
b069b9b038 web/satellite: patch listing token history issue
This change patches an issue where a user who has not claimed a wallet
would see the error "Can not list token payment history" on the all
projects dashboard.

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

Change-Id: I0783fae2c4441be4495b9c8bd82cf6dbe6eea557
2023-09-29 13:57:25 +00:00
Vitalii
c34202f5e2 web/satellite/vuetify-poc: localize big numbers
Localized number formatting (e.g. dots, commas, spaces)

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

Change-Id: Ia1f6ba781fe0089803717aa0e2a9eb5da6ab2946
2023-09-29 12:11:03 +00:00
Ivan Fraixedes
1f400a2750
satellite/admin/back-office/ui: Delete yarn.lock file
The yarn.lock file came from the former repository where the back office
UI was developed.

It seems that our build process complains about some dirty state related
to this file. Because we don't use Yarn, we delete the file, hoping to
resolve the build issues.

Change-Id: I5febd8292657289d0fc67e08151c6c8b5ac8b5dc
2023-09-29 12:48:17 +02:00
Wilfred Asomani
46ee1c1414 satellite/{payment,console} add pending deletion user status
This change introduces a new user status, PendingDeletion to be used to
mark users before they're actually deleted. It also skips users with
this status or Deleted status when generating invoices.

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

Change-Id: I6a80d0ed1fe4f223ae00e0961f18f2f62f9b5213
2023-09-28 22:23:46 +00:00
Tome Boshevski
a14a18185b
Update logo in README.md (#6354)
Update logo to the newest one, and also add a dark mode version of the logo.
2023-09-28 19:44:11 +02:00
Jeremy Wharton
ae91fa3ce4 {satellite/console,web/satellite}: change invite text in register page
This change removes the project name and inviter name from the
registration page's invitation text in order to prevent phishing
attempts using these values from succeeding.

Resolves storj-private#431

Change-Id: I08636d712b6b273d484cf0594d395c9d7c02ebfa
2023-09-28 16:19:22 +00:00
Jeremy Wharton
9587e09c78 cmd/satellite: copy Vuetify distribution folder to satellite
This change ensures that files generated by building the Vuetify
project are copied to the satellite container.

References #6251

Change-Id: If56fe754d51f1487a3b3c2cf98c40e3010539121
2023-09-28 10:21:58 -05:00
Jeremy Wharton
e5f6be2f02 web/satellite/vuetify-poc: prepend icons to dashboard card titles
This change adds icons before the titles of cards in the project
dashboard.

Resolves #6294

Change-Id: I65a0e3be5433bd156568a76a875552ace8905a91
2023-09-28 09:18:55 -05:00
Michal Niewrzal
4737e912f0 satellite/metabase: simplify main commit object query
Simplifying over complicated SQL query for committing object while
upload.

Change-Id: I99b918192c292288e6b9397d0f9ccf9b81838f4f
2023-09-28 13:20:41 +00:00
Márton Elek
b28439be24 cmd/tools/placement-test: cli to test placement configuration
Change-Id: I7308fbf8fcd740fc136e87d9c2c08eaeb461a106
2023-09-28 10:01:53 +00:00
Wilfred Asomani
41799ef86f web/satellite/vuetify-poc: add pricing plan steps
This change adds the ability to upgrade using a custom pricing plan.

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

Change-Id: I866de25e47cb315d107201b1ccaca2cbdad6cf3c
2023-09-28 07:31:21 +00:00
Sean Harvey
31d42bb136
satellite/metainfo: fix inconsistency with auth check error
This fixes an inconsistency with error returned on copy and move
endpoints to match other endpoints. validateAuth() is already
wrapping the RPC status around the error, so this shouldn't be
doing it again.

This also ensures that rate limit errors for FinishCopyObject and
FinishMoveObject are correctly returned as rpcstatus.ResourceExhausted
so uplink can correctly map these to uplink.ErrTooManyRequests.

Change-Id: I6bf6185b456d6774b99d56cf3d7d8f8aa2afa0e8
2023-09-28 18:38:53 +13:00
Jeremy Wharton
b3d12a2436 web/satellite/vuetify-poc: include project and route name in page title
This change adds the name of the current route and the name of the
currently-selected project to the webpage title.

Resolves #6331

Change-Id: Ia42f6a5f9411e92a8217b21757ff7581bac2c3be
2023-09-27 22:52:07 +00:00
Jeremy Wharton
f40954c7b6 satellite/admin: return burst limit in API response
The satellite admin API endpoint responsible for returning project
limits now includes the burst limit in its responses.

Resolves #6276

Change-Id: Ibb3f1fdebf2f9ffd62de2d7e7a60d978c25bb22a
2023-09-27 22:11:00 +00:00