Commit Graph

1741 Commits

Author SHA1 Message Date
Paulo Gomes 3635f44b5b
build: run darwin tests on macos 10.15, 11 and 12
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-06 13:52:53 +01:00
Sunny 15b6fedbd0
Merge pull request #812 from fluxcd/comments-update
Minor comment updates
2022-07-05 18:58:32 +05:30
Sunny e345e71eca
Minor comment updates
- Update the comments around artifact retention fields in Storage.
- Update the comments around reconcileStorage regarding artifact
  retention and garbage collection.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-07-04 19:58:26 +05:30
Paulo Gomes 665d43c7e7
Merge pull request #811 from pjbgf/speed-up-pr
Split GitHub workflows
2022-07-04 10:09:20 +01:00
Paulo Gomes 6981eba031
build: split GitHub workflows
By splitting workflows we can get the overall time
for all the checks to be decreased.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-01 11:58:08 +01:00
Paulo Gomes 3cbb9ca5f4
Merge pull request #801 from pjbgf/ssh-password
docs: Add password-protected SSH keys information
2022-07-01 11:36:13 +01:00
Paulo Gomes 87fba45aa2
docs: Add password-protected SSH keys information
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-01 11:19:41 +01:00
Paulo Gomes 02567049e6
Merge pull request #804 from fluxcd/go-yaml-v3.0.1
Update go-yaml to v3.0.1
2022-06-30 10:21:32 +01:00
Sunny f941f5ce24
Update go-yaml to v3.0.1
Fix CVE-2022-28948

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-06-30 00:21:59 +05:30
Stefan Prodan d1f0d239e1
Merge pull request #803 from fluxcd/release-v0.25.9
Release v0.25.9
2022-06-29 15:23:19 +03:00
Stefan Prodan 295c0b9804
Release v0.25.9
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-29 15:02:48 +03:00
Stefan Prodan 5356f72b03
Merge pull request #799 from souleb/issue-787
[helm-oci] disable cache in oci registry client
2022-06-29 14:56:50 +03:00
Soule BA 988fd1fba9
disable cache in oci registry client
If implemented, the oci registry client is created with cache disabled.

Signed-off-by: Soule BA <soule@weave.works>
2022-06-29 12:47:40 +02:00
Sunny baf79889e7
Merge pull request #792 from somtochiama/trailing-slash
Remove trailing slash in `spec.url` when getting tags for oci repository
2022-06-29 15:53:22 +05:30
Somtochi Onyekwere 35a7ea1efa Remove trailing slash
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-06-29 11:05:08 +01:00
Sunny 3dcb142076
Merge pull request #795 from aryan9600/release-v0.25.8
Release v0.25.8
2022-06-24 16:34:48 +05:30
Sanskar Jaiswal 3896911adb
Release v0.25.8
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-24 16:12:04 +05:30
Stefan Prodan 60cf11a0d1
Merge pull request #796 from fluxcd/libgit2-req-incomplete-auth-test
libgit2/managed/http: test for incomplete creds
2022-06-24 13:16:47 +03:00
Sunny 7325430bc9
libgit2/managed/http: test for incomplete creds
Add test for createClientRequest() where the credentials are incomplete.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-06-23 15:31:46 +05:30
Hidde Beydals bc28ad5d1b
Merge pull request #794 from aryan9600/fix-bitbucket-auth 2022-06-23 11:44:59 +02:00
Sanskar Jaiswal 7a708ac6d2 set request auth if both username and password are non empty
BitBucket servers don't accept a username with an empty password, so a
secret with no http auth creds will result in a 401, since we
fall back to "git" for the username and used to set basic auth with that
username without a password.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-23 14:44:57 +05:30
Sunny 7c07b7a03f
Merge pull request #789 from fluxcd/release-v0.25.7
Release v0.25.7
2022-06-22 15:51:10 +05:30
Sunny 56ae4d247c
Release v0.25.7
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-06-22 15:23:26 +05:30
Sunny ea516d8037
Merge pull request #783 from pjbgf/known_hosts_error
libgit2: improve known_hosts error messages
2022-06-22 14:54:03 +05:30
Paulo Gomes b490a6aae8 libgit2: improve known_hosts error messages
Known hosts can be a difficult problem to troubleshoot.
To make it easier for end users, the generic message has
now been changed with a much more user friendly one.

Now if a known_host is not set, an error message will be
returned, instead of it simply being ignored.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-21 20:01:29 +05:30
Sunny 22951347dd
Merge pull request #785 from fluxcd/mutexless
libgit2: remove deadlock
2022-06-21 19:51:23 +05:30
Sunny a530c5dee2
libgit2/ssh: Embed connection fields in Subtransport
The connection type was created to group the connection related fields
and use mutex to prevent race conditions. Since that's no longer the
case, this puts back those fields in sshSmartSubtransport.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-06-21 17:55:21 +05:30
Paulo Gomes 09fae634df
libgit2: remove deadlock
Some scenarios may lead to deadlocks, specially
in image automation controller.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-16 13:54:38 +01:00
Paulo Gomes 812f6e49dd
Merge pull request #784 from pjbgf/release-v0.25.6
Release v0.25.6
2022-06-14 18:03:04 +01:00
Paulo Gomes 305df79bc1
Release v0.25.6
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-14 15:44:03 +01:00
Paulo Gomes 0a993a8770
Merge pull request #615 from fluxcd/go-test-race
build: enable `-race` for `go test`
2022-06-14 15:14:01 +01:00
Paulo Gomes 230774cc80
build: disable go test -race for arm64
Race detection is not working properly in our arm64 runners.
It has been tested against both M1 and linux arm64 machines
and in both cases the results were aligned with the other
platforms.

By disabling this we can ensure race detection is being
enforced on the other platforms, and we can later review
this position.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-14 11:33:36 +01:00
Paulo Gomes f1799dcb6b
git: fix reconcileSource_authStrategy
Co-authored-by: Sunny <darkowlzz@protonmail.com>
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-14 09:25:54 +01:00
Paulo Gomes a7ffb8c8aa
git: Update proxy tests
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-14 09:25:53 +01:00
Sunny d72a189e88
internal/helm/getter: remove transport reuse test
Since the transport reuse is dependent on the garbage collection, the
result is inconsistent. It fails frequently when running the tests with
the go race detector. Remove the test.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-06-14 09:25:52 +01:00
Sunny d38086bd72
Fix race condition in git proxy tests
The variable used to store the information about proxied request was
being written to in the proxy server request handler and read for
assertion at the end of the test.
Replace the boolean variable with an atomic counter to count the number
of requests proxied, preventing the race condition.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-06-14 09:25:52 +01:00
Hidde Beydals 7a5f0ccd89
build: enable `-race` for `go test`
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-06-14 09:25:51 +01:00
Paulo Gomes 19292d468c
Merge pull request #778 from pjbgf/improved-logging
libgit2: add contextual logging to subtransports
2022-06-14 09:22:23 +01:00
Paulo Gomes 42dcb87345
Add reconcileID to all reconcilers
GitRepository introduced correlation ID to improve
transport level logging. This change aligns the other
reconcilers to the same approach.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-14 08:59:44 +01:00
Paulo Gomes cea9ea9142
libgit2: improve subtransport logging
Debugging connection issues can be extremely difficult, even more so at scale or when
concurrent connections are required to trigger specific issues.

Changes:
- Add a correlation identifier for each reconciliation, which allows for greater traceability when
going through all the reconciliation operations - including at transport level.
- Add transportType to segregate HTTP and SSH transport logging.
- SSH operations are now enriched with addr containing server address, and HTTP url.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-13 07:35:12 +01:00
Paulo Gomes 7a797e3b57
Merge pull request #781 from aryan9600/fix-enabled
libgit2: fix managed transport enabled flag updation
2022-06-10 14:28:04 +01:00
Sanskar Jaiswal 590aa325b0 libgit2: fix managed transport enabled flag updation
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-10 18:12:58 +05:30
Sunny f6a389ce57
Merge pull request #777 from aryan9600/refactor-tests
libgit2: refactor tests to use managed and unmanaged transport cleanly
2022-06-09 22:42:18 +05:30
Sanskar Jaiswal 45ee564e27 assert state of managed transport acc for each test
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-09 22:21:10 +05:30
Sanskar Jaiswal 4ce31319ee libgit2: refactor tests to use managed and unmanaged transport cleanly
Refactors libgit2 checkout tests to test managed and unmanaged
transport by making sure the tests requiring unmanaged transport are run
before, any tests that require managed transport (since disabling
managed transport isn't possible). This is done via arranging the tests
carefully in alphabetically sorted names, i.e. the tests with unmanaged
transport go in `checkout_test.go`, which forces golang to run the tests
in that file before any other tests.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-09 21:01:17 +05:30
Paulo Gomes 1faa547dad
Merge pull request #775 from pjbgf/leak-conns
libgit2: dispose connections in SubTransport.Close
2022-06-09 08:53:59 +01:00
Paulo Gomes bfa4e38b84
libgit2: dispose connections in SubTransport.Close
The average SubTransport lifecycle encompass two Actions calls. Previously,
it was attempted to share the same connection across both calls. That did
not work as some Git Servers do not support multiple sessions from the same
connection. The implementation was not fully transitioned into the
"one connection per action" model, which led to connection being leaked.

The transition to RW mutex was to avoid the unnecessary blocking in the
goroutine at the start of the second action call.

It is worth mentioning that now when the context is done,  the client level
resources (connection) will also be freed. This ensures that SSH connections
will not outlive the subtransport.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-08 19:39:50 +01:00
Stefan Prodan a00d0edcd7
Merge pull request #774 from fluxcd/release-v0.25.5
Release v0.25.5
2022-06-08 13:32:17 +03:00
Stefan Prodan b120c299a5
Release v0.25.5
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-08 13:15:41 +03:00
Paulo Gomes 6e44c8c4fb
Merge pull request #773 from pjbgf/update-deps
Update dependencies
2022-06-08 10:48:11 +01:00