Commit Graph

813 Commits

Author SHA1 Message Date
Alex Suraci
587081a643 postgres: refactor error handling to fix retrying
prior to this change, many of the functions in the ExecTx callback would
wrap the error before returning it. this made it impossible to check
for the error code.

instead, the error wrapping has been moved to be external to the
`ExecTx` callback, so that the error code can be checked and
serialization failures can be retried.
2018-11-20 10:50:55 -05:00
Alex Suraci
5d67da1472 bump lib/pq 2018-11-20 10:50:55 -05:00
Alex Suraci
aa068b667a postgres: improve readability of error check 2018-11-20 10:50:55 -05:00
Alex Suraci
9b9013a560 postgres: use stdlib to set serializable tx level
also use a context for the rollback, which is a bit cleaner since it
only results in one 'defer', rather than N from the loop
2018-11-20 10:50:55 -05:00
Alex Suraci
7e96021428 retry on serialization errors 2018-11-20 10:50:55 -05:00
Stephan Renatus
efb15205e9
Merge pull request #1352 from concourse/pr/support-pq-host-port
pg: support host:port for backwards-compatibility
2018-11-20 16:38:56 +01:00
Stephan Renatus
d40043808b
Merge pull request #1345 from concourse/pr/github-team-name-and-slug
Add 'both' option to use team name AND slug in TeamNameField

This allows the connector to be configured with both so that both team names and slugs can be returned in the groups. This makes configuring teams in an application a bit more foolproof; we would often have confusion over whether the team name or slug should be given by the user, so it's easier to just allow both, since collisions shouldn't be possible anyway.
2018-11-20 16:30:54 +01:00
Alex Suraci
0b856d1a75 pg: support host:port for backwards-compatibility 2018-11-20 10:22:39 -05:00
Josh Winters
bb11a1ebee github: add 'both' team name field option
this will result in both the team name *and* the team slug being
returned for each team, allowing a bit more flexibility in auth
validation.

Signed-off-by: Topher Bullock <tbullock@pivotal.io>
Signed-off-by: Alex Suraci <suraci.alex@gmail.com>
2018-11-20 10:12:44 -05:00
Stephan Renatus
b1fd2fa8b1
Merge pull request #1346 from concourse/pr/postgres-unix-sockets
Use pq connection parameters instead of URLs for postgres connections

This enables the use of socket paths like /var/run/postgresql for the 'host' instead of requiring TCP. Also, we know allow using a non-default port.
2018-11-20 15:52:40 +01:00
Divya Dadlani
f82b904d05 postgres: use connection string instead of url
otherwise it's impossible to use a Unix socket, as the path gets escaped
awkwardly.

Signed-off-by: Ciro S. Costa <cscosta@pivotal.io>
Signed-off-by: Alex Suraci <suraci.alex@gmail.com>
2018-11-20 09:32:44 -05:00
Stephan Renatus
7c8a22443a
Merge pull request #1349 from alexmt/1102-config-to-load-all-groups
Add config to explicitly enable loading all github groups

Follow-up for #1102.
2018-11-20 15:15:25 +01:00
Stephan Renatus
84ea412ca6
Merge pull request #1351 from CognotektGmbH/gypsydiver/1347-pr-gitlab-groups
Gitlab connector should not require the api scope.

Fixes #1347.
2018-11-20 14:49:11 +01:00
gypsydiver
f21e6a0f00 gypsydiver/1347-pr-gitlab-groups 2018-11-20 11:18:50 +01:00
Stephan Renatus
42997448a7
Merge pull request #1343 from concourse/pr/remove-mysql-cockroachdb-drivers
remove incomplete mysql and cockroachdb support
2018-11-20 10:01:17 +01:00
Stephan Renatus
4738070951
Merge pull request #1338 from srenatus/sr/update-go-ldap
update go-ldap, improve errors
2018-11-20 08:02:13 +01:00
Alexander Matyushentsev
7bd084bc07 Issue #1102 - Add config to explicitly enable loading all github groups 2018-11-19 10:14:38 -08:00
Alex Suraci
7c63be4104 remove incomplete mysql and cockroachdb support 2018-11-16 18:07:20 +00:00
Stephan Renatus
2425c6ea63
Merge pull request #1340 from alexmt/1184-github-groups
Issue #1184 - Github connector now returns a full group list when no org is specified
2018-11-16 15:48:33 +01:00
Stephan Renatus
13a1679892
Merge pull request #1344 from concourse/pr/fix-conformance-time-comparison
fix bogus conformance failure due to time zones
2018-11-16 08:52:40 +01:00
Alexander Matyushentsev
20bc6cd353 Full list of groups should include group names as well as group_name:team_name 2018-11-15 14:12:50 -08:00
Alex Suraci
dcca427592 fix bogus conformance failure due to time zones
this failed on my machine due to the unexported 'loc' field of the time
structure - it was nil in one and set to a ton of tiemzone data in the
other. instead let's just compare the unix timestamp value and zero it
out for the struct comparison.
2018-11-15 13:51:07 -05:00
Stephan Renatus
5236b2c819
Merge pull request #1339 from alexmt/1263-connector-error-message
Issue #1263 - Render error message provided by connector if user authentication failed
2018-11-15 19:06:30 +01:00
Alexander Matyushentsev
e5ebcf518a Update github connector documentation 2018-11-15 09:24:21 -08:00
Alexander Matyushentsev
ce3cd53a11 Bug fix: take into account 'teamNameField' settings while fetching all user groups 2018-11-15 09:23:57 -08:00
Alexander Matyushentsev
e876353128 Rename variables to stop shadowing package name 2018-11-15 09:00:37 -08:00
Alexander Matyushentsev
a9f71e378f Update getPagination method comment 2018-11-15 08:57:31 -08:00
Alexander Matyushentsev
e10b8232d1 Apply reviewer notes: style changes, make sure unit test verifies pagination 2018-11-15 08:12:28 -08:00
Alexander Matyushentsev
51d9b3d3ca Issue #1184 - Github connector now returns a full group list when no org is specified 2018-11-14 15:31:31 -08:00
Alexander Matyushentsev
ff8b44558e Issue #1263 - Render error message provided by connector if user authentication failed 2018-11-13 15:44:28 -08:00
Stephan Renatus
c14b2fd5a5
connector/ldap: slightly improve error output
Signed-off-by: Stephan Renatus <srenatus@chef.io>
2018-11-13 09:40:40 +01:00
Stephan Renatus
3295084236
deps: revendor
Signed-off-by: Stephan Renatus <srenatus@chef.io>
2018-11-13 07:54:16 +01:00
Stephan Renatus
1723e13fed
glide.yaml: bump gopkg.in/ldap.v2
Signed-off-by: Stephan Renatus <srenatus@chef.io>
2018-11-12 19:37:37 +01:00
Eric Chiang
57b1031352
Merge pull request #1334 from tmatias/patch-1
point users to storage/RBAC docs
2018-11-06 21:27:28 -08:00
Eric Chiang
505aac753d
Merge pull request #1333 from SongGithub/master
allow it to disable CRD creation
2018-11-05 18:40:53 -08:00
Song.Jin
5f0a03a06b modify log msg as per suggested 2018-11-06 11:18:55 +11:00
Tiago Matias
44e988fb41
point users to storage/RBAC docs 2018-11-05 17:43:23 -02:00
Song.Jin
9b5bec1ddf check if crd exist before try creating them 2018-11-04 11:43:28 +11:00
Song.Jin
d2daa4e2ac allow it to disable CRD creation 2018-11-02 21:13:37 +11:00
Stephan Renatus
65b0c91992
Merge pull request #1245 from scotthew1/mock-connector-refresh
add Refresh() to mock passwordConnector
2018-10-25 16:38:08 +02:00
Stephan Renatus
f903a2890e
Merge pull request #1329 from ericchiang/lint
*: vendor golint to prevent upstream changes from breaking the build
2018-10-25 10:56:00 +02:00
Eric Chiang
e11446aff0 vendor: make revendor 2018-10-24 14:59:44 -07:00
Eric Chiang
50b96564f5 *: vendor golint to prevent upstream changes from breaking the build
golint has updated or dropped support for old Go versions several times,
causing breaks in our build. Vendor it locally to prevent this.
2018-10-24 14:59:44 -07:00
Eric Chiang
867130e22e
Merge pull request #1325 from ericchiang/go
*: update go version
2018-10-24 14:16:23 -07:00
Eric Chiang
5514805cf0 *: update go version 2018-10-22 17:44:24 -07:00
Eric Chiang
9f91ae0255
Merge pull request #1319 from dannysauer/oidc_doc
Add mention of `scopes` parameter in OIDC doc
2018-10-17 09:16:25 -07:00
Danny Sauer
b9b21260bc
Add mention of scopes parameter in OIDC doc 2018-10-17 10:48:39 -05:00
Eric Chiang
0db538a4bb
Merge pull request #1316 from edtan/fix-broken-markdown-link
Fix broken link to Bitbucket Cloud documentation
2018-10-14 20:49:00 -07:00
Ed Tan
56eeb07e85 Fix broken link to Bitbucket Cloud documentation 2018-10-14 21:45:21 -04:00
Eric Chiang
fcf4371b1b
Merge pull request #1317 from ericchiang/fix-golint-import
.travis.yml: fix golint import
2018-10-14 18:30:50 -07:00