Commit Graph

148 Commits

Author SHA1 Message Date
Egon Elbre
0d981a6485 ci: check licenses
Change-Id: Ibe67bdb865fdb7c1059fe4bfb349299df86e2b62
2023-03-10 13:38:40 +00:00
Egon Elbre
873a202530 mod: bump storj.io/common
This bumps common, such that things build with Go 1.20.

Also, adds `go vet` checks for testsuite/storjscan and testsuite/ui.

The latest golang.org/x/bcrypt has a check that the new password is less
than 72 bytes, because bcrypt silently discarded them. This means our
own password validation has the same limitation. Old passwords should
still work fine.

Change-Id: Ibb8735b15eeb91460145906b81ae4e365e9ac418
2023-02-03 16:49:41 +02:00
Antonio Franco (He/Him)
9671851ef4
ci: removed ui artifacts (#5400)
This change removes the go mod download process for the UI tests, removes the commented out code block that once called the UI tests, and the duplicate web/wasm build step. The Build step for the web/wasm is now executed via a shell script and called much earlier in the tests.
2022-12-12 14:15:16 +01:00
Egon Elbre
954d703533 ci: use check-cross-compile tool
Change-Id: I2b858222c33eb0c9d1081ba8853a852ee14b32bd
2022-11-22 09:38:46 +00:00
Egon Elbre
bcbf30a333 ci: make go compatibility check parallel
Change-Id: I40162548305dcd181cfb702f72830d2c0a887cf4
2022-10-20 15:41:03 +00:00
Artur M. Wolff
fe85fefcc5 ci: add check-downgrades checks
Change-Id: Idfe81897dc701c24c0f81b0021cb1d640e8224ac
2022-09-23 11:15:27 +00:00
Márton Elek
96b88e286e build: fix conditional run of web builds
Jenkins doesn't do a very good job with identifying what has been changed.

While it has a syntax to defined patterns, it compares the current build with the previous build (in case of git-verify it can be a totally different branch) instead of checking the HEAD commit.

This patch introduces shell scripts to do this better:
 * It doesn't depend on Jenkins any more
 * It can be executed locally
 * It can detect web changes properly (see the relation change as an example).

Change-Id: I9d37775e3818c08c4aa96ffb78f84d57f28a2c95
2022-08-11 14:34:44 +00:00
Márton Elek
5a2e348b06 build: bump timeout for premerge/public
As we started to run integration tests one by one (instead of parallel). We need to bump the timeout as well.

(Later we can decrease it to a better value after understanding what is reasonable)

Change-Id: I4a7e18973311fe98b0ffb3d9ed496584b1697980
2022-08-04 09:33:48 +00:00
Márton Elek
2a3c821bd2 build: turn off parallel Verification for premerge/public
Our tests depend on timing (timeouts / sleeps). Therefore we must not overcommit the CPU with highly parallel execution as builds become flaky.

go test can do parallel execution (that's fine as it doesn't overcommit CPU, if only one job is running), but we shouldn't execute different type of
integration tests at the same time.

This commit changes only public (PR + main build) and pre-merge (one build per patch), which are less build time sensitive.

Change-Id: Ib9aaabd301cfa9cd3515a8aa4dd8ae82f58eb811
2022-08-03 11:34:58 +00:00
Egon Elbre
d0ca258925 build: increase npm install loglevel
The builds for npm still fail, however, `--timing` does not provide
sufficient data to debug the situation.

Change-Id: I7e618ba8cac775748ebea6145cd5c180d2dc7883
2022-07-06 18:13:53 +03:00
Egon Elbre
d162788489 build: use npm install
`npm ci` deletes the node_modules directory, which also removes go.mod
from that folder.

Add --loglevel timing, so we can debug install slowness, whenever it
happens.

Change-Id: Ide613c4124bfdca9ae978876b2deed8abf86f987
2022-07-01 17:54:18 +03:00
Egon Elbre
97e6e5a6a3 build: improve npm build
Add go.mod to node_modules folder, that way Go compiler doesn't
need to scan the node_module directories for any Go code.

Change-Id: I747909416490c847d6b4bfa3438fea66660fcd53
2022-07-01 10:51:53 +00:00
Egon Elbre
94ae196189 testsuite/ui: move go.mod
I would like to start moving some of the integration tests from scripts
folder into testsuite. This allows integration tests to easily have
other and fewer dependencies.

This will also be useful for https://github.com/storj/storj/issues/4823.

Change-Id: Idbdb5aefc0e42d091ad7f74dbdc096281c1dfcba
2022-06-21 14:12:35 +03:00
Michał Niewrzał
b662fc1ab2 Jenkinsfile: don't create separate db for metabase
We don't use separate DB for metabase tests anymore.

Change-Id: I31d60aa18aaa11a6facfd2f622b03fcd87d3d18c
2022-05-25 09:36:13 +00:00
Egon Elbre
5d6d5331f5 private/testplanet: don't cleanup cockroach
Márton found out that DROP DATABASE is rather slow on CRDB, and it makes
a significant impact when running the whole testsuite. In sum of test
times it's ~2.5h compared to ~2h. And the end-to-end ~20m to ~16m.

This adds a new flag STORJ_TEST_COCKROACH_NODROP for enabling this
behavior in the CI environment.

Fixes https://github.com/storj/dev-enablement/issues/6

Change-Id: I5a6616c32dc6596a96ba3d203f409368307d7438
2022-05-19 15:27:37 +03:00
Egon Elbre
d7cd3a0ff8 Jenkinsfile: mod-tidy doesn't need the initial file
Change-Id: I7f35157b5f5306a84817019e3b9613e40ac45f3f
2022-04-17 17:39:03 +00:00
Michał Niewrzał
61a76f35ef Jenkinsfile: enable 'Cockroach Backwards Compatibility' tests
We had an issue with CRDB where newer version forbid type
of SQL query we were using. We disabled CRDB bc tests until we
will have release without problematic query. Now we can enable
tests.

Change-Id: I275cbecebdcbfef587281f2daaf677d01860b23d
2022-04-12 13:15:43 +00:00
paul cannon
985ccbe721 satellite/repair: in dns redial, don't retry if CloseError
To save load on DNS servers, the repair code first tries to dial the
last known good ip and port for a node, and then falls back to a DNS
lookup only if we fail to connect to the last known good ip and port.

However, it looks like we are seeing errors during the client stream
Close() call (probably due to quic-go code), and those are classified
the same as errors encountered during Dial. The repairer code sees this
error, assumes that we failed to contact the node, and retries- but
since we did actually succeed in connecting the first time around, this
results in submitting the same order limit (with the same serial number)
to the storage node, which (rightfully) rejects it.

So together with change I055c186d5fd4e79560f67763175bc3130b9bc7d2 in
storj/uplink, this should avoid the double submission and avoid dinging
nodes' suspension scores unfairly.

See https://github.com/storj/storj/issues/4687.

Also, moving the testsuite directory check up above check-monkit in the
Jenkins Lint task, so that a non-tidy testsuite/go.mod can be recognized
and handled before everything breaks weirdly and seemingly randomly
later on.

Change-Id: Icb2b05aaff921d0af6aba10e450ac7e0a7bb2655
2022-04-04 17:01:09 +00:00
Egon Elbre
1f1f777d06 satellite/admin/ui,web/{multinode,storagenode}: build without embedding
Embedded files significantly increase the binary size for linking.
Add a tag that allows disabling embedding the build npm code.

Change-Id: I9d1fd7376d1fa035965c33d259faaa6c4770dfe1
2022-03-29 13:18:04 +03:00
Egon Elbre
19a2555126 private/testplanet: try using multiple localhosts
Rather than starting all servers on 127.0.0.1 start them
on a random local host to try avoid port exhaustion.
The port exhaustion is just a guess.

Change-Id: Ibf31d6a017852238d836291d703642b44ff66c0c
2022-03-29 05:24:35 +00:00
Egon Elbre
4a6c2e2a9c satellite/admin/ui: avoid needing an additional copy
This also fixes the build order. Unfortunately we need
to ensure that the web frontends are built before installing
Go binaries.

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

Change-Id: I5d1c83125fd3d1a454d3400b2cbdd44bd3f2250c
2022-03-25 11:42:22 +02:00
Michał Niewrzał
ba74cb17a9 satellite: adjust to latest CRDB version
We have an issue with latest CRDB. Single query cannot modify
the same table multiple times. Now build is blocked.
This change is unblocking build by:
* adjusting query for inserting into repair queue
* temporary removing code for deletion for server-side copy
* temporary disable backward compatibility tests for CRDB

Change-Id: Idd9744ebd228e5dc05bdaf65cfc8f779472a975d
2022-03-23 07:16:38 +00:00
Egon Elbre
49dcec02e5 Jenkinsfile: optimize build caching
Change-Id: If3fb973b2d75672e2bb2eb09c381d48f5b5cfd4a
2022-03-07 22:59:15 +02:00
Mya
56c668a2e3 private/testplanet: use info level logs in jenkins
Change-Id: Ie500a7bfcd23ca7470139341e961b2e9986d6a33
2022-02-10 11:47:06 -06:00
Jeff Wendling
9061dd309f cmd/uplinkng: become cmd/uplink
Change-Id: If426c32219d32044d715ab6dfa9718807f32cb9f
2022-02-09 17:02:21 +00:00
Egon Elbre
c58a81e7c2 testsuite/ui: disable flaky UI tests
Currently UI tests are always failing.

Disable them for now, since they do not add any useful signal to the result.

Change-Id: Ifa4a5c70cb6954e355fa9f26912fb0ce03a62ddc
2022-01-03 15:54:15 +02:00
Egon Elbre
5f39f20766 web/: add check for change to eslint import
Change-Id: Idf94c8e0c92d34e840db549e9e704eb3373762ac
2021-12-21 15:59:23 +00:00
Ivan Fraixedes
5573ece848 satellite/admin/ui: Migrate to SvelteKit
Migrate the satellite admin UI web app from the Svelte template used to
generate a Svelte App scaffolding to SvelteKit.

There aren't any functional changes in the  application, however, the
commit has a lot because:

1. SvelteKit uses a different directory layout and constraints to it, so
   the files have been moved.
2. The files have changed its formatting due to the new default linter
   configurations that SvelteKit uses.
3. The linter detected some issues with using `object` and `any` types
   in Typescript, so they have been replaced by better general types
   (e.g. Record).

The  migration allows to use the new tooling rather than Rollup
directly, besides that will empower the future of it when it needs more
features (e.g. different routes, etc.).

Change-Id: Ifa6736c13585708337f6c5a59388077b784eaddd
2021-12-17 10:27:13 +00:00
Egon Elbre
dfd2977a01 testsuite/ui: fixes to setup
* Remove "enable-logging", because it ends up spawning consoles on
  Windows.
* Remove "disable-gpu", if we have a GPU, then let's use it.
* Create custom client, so we can attach logging to CDP.
* Ignore potential context.Canceled.
* Fix onboarding wizard test for new objects browser.
* Return an error on a context cancellation.
* Wire all loggers to planet.

Change-Id: I67eb138ba31252f55ac5b383679d033bcf71f1b2
2021-11-15 15:56:35 +02:00
Ivan Fraixedes
ab425d4248 build: Consider the Admin UI assets
Add into the Makefile and Jenkins the operations to build the Admin UI
assets and lint them.

Change-Id: I687c1adec796fd591664e34eb73a465e53096b58
2021-11-12 08:48:28 +00:00
Gabriel De Almeida
5ed3846e16 testsuite/ui/satellite: add browser tests
Also, we have multiple tests that contain the same sign up
and login logic and refactoring them would make tests
cleaner and more readable.

Change-Id: I25bf95ca2fffb7f494a3c93a4a4afe429ece70d3
2021-11-11 15:03:07 -05:00
Egon Elbre
58916d8ba9 ci: don't trigger UI tests when go.mod changes
Currently testsuite/go.mod is being updated automatically and
we don't want to trigger UI tests, since they are a bit flaky.

Change-Id: Ie1c847e262ad723a006071f7a8f5cd7f26f4244e
2021-11-10 17:16:08 +00:00
Artur M. Wolff
785eb93cd7 ci: install gateway@latest instead of @main
Gateway-ST frequent release cycle has been resurrected, which means it's
safer to use the latest release tag in the storj repository's CI now.

Change-Id: I9df1c789a9b9418ba7cceaec9cfec3cc6c448284
2021-11-01 12:16:38 +00:00
Egon Elbre
431f55d53b ci: cross-compile storagenode-updater
Change-Id: I1db757b64e61f185ba710bf669f2e62441b9ab71
2021-11-01 11:21:06 +00:00
Egon Elbre
52c950e429 testsuite/ui/uitest: add Edge testing
Change-Id: I1e592ac755b582d4fa73e95fd999a35a27f8a116
2021-10-15 13:27:13 +00:00
Egon Elbre
8f4550d621 ci: fix using npm run build-wasm
Newer npm seems to invoke the command without the current user
privileges. However, Go already initializes its cache using root.

Change-Id: I23b32ca3bbd7db06515c2af86b1bb5adc8e38a8f
2021-10-14 15:10:40 +00:00
Egon Elbre
9fd091831d ci: optimize benchmarks
We are not using the benchmark results for anything, they are mostly
there to ensure that we don't break the benchmarks. So we can disable
CockroachDB for them.

Similarly add short versions of other tests.

Also try to precompile test/benchmark code.

Change-Id: I60b501789f70c289af68c37a052778dc75ae2b69
2021-10-08 19:42:40 +03:00
Egon Elbre
6ab2647adb ci: run UI tests
We have implemented few UI tests using go-rod, but haven't been running
them regularly.

Change-Id: I6c89365f719882431842a2026b426860f1293b8b
2021-10-06 15:54:06 +00:00
Egon Elbre
f52f5931da ci: don't fail when nothing to delete
Change-Id: Ided795c3b60f053dfaff89be6e944cf2cce5faba
2021-09-29 13:41:50 +03:00
Artur M. Wolff
cc9b845a83 ci: switch back to pulling gateway@main
Switch back to pulling gateway@main for continuous integration because
https://review.dev.storj.io/c/storj/gateway/+/5834 was merged. This
change is a partial revert of
https://review.dev.storj.io/c/storj/storj/+/5832.

Change-Id: I0a87f6f18a9a863fe92003b76c830335f9253ced
2021-09-28 15:01:04 +00:00
Egon Elbre
9c232cebe1 ci: make deletion a separate step
Deletion as a separate step so it's more understandable what's
actually happening.

Change-Id: Icb3cefe7e4093c56604af633ac0e02226bae42ac
2021-09-28 10:24:43 +00:00
Clement Sam
118e64fa15 jenkinsfile: bump build timeout
Jenkins build consistently times out due to the enormous tests we have now.
Bumping the timeout to 40 fixes it for now.

Change-Id: Ie96cc5ec3e452744d5a7873853d14befe367bd7e
2021-09-27 18:31:16 +00:00
Egon Elbre
8036644422 ci: try fix builds
This chmod is combined with "Clean before checkout" behaviour
that deletes everything, except .git. This should give us
the sufficient ordering to ensure that everything has the
correct permissions.

Story so far:

Checkout with "Wipe out repository & force clone" didn't work,
because the chmod would've run after trying to delete.

Deleting as a post action doesn't work, because during timeouts
the always steps don't get executed sometimes.

We cannot easily run docker with non root, due to how our ci
image works.

Change-Id: Id4c1605d39ae8d7722ba3dd1ab5df8618de3309b
2021-09-27 16:18:04 +00:00
Egon Elbre
7fd3466925 ci: remove deleting workspace steps
Moved the deleting workspace to pipeline configuration.

Change-Id: I7c94d1a9bac514f1824988d21dfb3a144b10ca7e
2021-09-27 15:49:34 +03:00
Egon Elbre
8ef03b0967 ci: cleanup ws before build, fix gateway install
Jenkins uses the same folder for different PR-s. Sometimes other runs do
not cleanup after themselves (e.g. timeout), hence add a cleanWs step to
ensure we delete files in the workspace.

gateway-st introduced a replace directive in go.mod, which does not work
with go install. Hardcode to the last version without the directive.
Using this fix to unblock ci builds.

Change-Id: I5e5d75bf47e30a5a8b6d835867c0c9176f25e08a
2021-09-23 15:57:47 +03:00
Egon Elbre
bd4017b2a6 ci: fix logical races between tools
Currently some building may generate some additional files,
similary, we want to run check-clean-directory after everything
has finished.

Change-Id: I4d700896094257e65cc5197c468f6d752024ddd9
2021-09-23 12:16:31 +03:00
Egon Elbre
6e660cecdd Jenkinsfile: test cross-compile and bump deps
Change-Id: I47091de2e80bd96fcada616f75e1db07a59fb0c1
2021-09-16 18:59:31 +03:00
Egon Elbre
25971c581f Jenkinsfile: clarify modfile linting
Change-Id: I0ac0bfa48386d3430eb8fb5a92b57daefc23998f
2021-08-31 15:13:45 +03:00
storj-antonio
3510bc036e testsuite: fix testsuite/go.mod and enable linters
This change implements verification of the testsuite
and resolves missing go.sum module errors.

Change-Id: I7b513e74532581b8878d50aa2c5ddca12bbef2d0
2021-08-31 12:10:18 +00:00
Sean Harvey
d22ecf9ec0 Jenkinsfile.public: pull latest ci image instead of building
Change-Id: Ia0e6863fdd00127336839d4d0b81306611aee177
2021-08-17 06:47:29 +12:00