Граф коммитов

48 Коммитов

Автор SHA1 Сообщение Дата
kimorris27 7448b3db41 `make validate-go` to format stuff and make CI happy 2024-09-26 09:00:11 -05:00
kimorris27 086f532624 Replace all references to the golang mock repo with references to the
Uber fork, then `go mod tidy` and `go mod vendor`

Note the change to `deps.go`
2024-09-26 09:00:11 -05:00
Ayato Tokubi c3e324c7c9
fix typo (#3779) 2024-08-19 08:12:24 -05:00
Amber Brown e57930cfbd add better comments 2024-06-13 14:53:47 +10:00
Amber Brown ec12eb5f50 cleanups 2024-06-13 14:53:47 +10:00
Amber Brown a33264f005 use an instantiated struct for this test, like the real steps 2024-06-13 14:53:47 +10:00
Amber Brown da4b09a2f1 fixes 2024-06-13 14:53:47 +10:00
Amber Brown 0de597a07f reduce the amount of package names in the logs 2024-06-13 14:53:47 +10:00
Tanmay Satam 02cbe54766
Retry failed ARM template deployments during cluster installation when FPSP is missing roleassignments (#3590)
* Retry InvalidTemplateDeployment errors when the underlying error is Authorization Failed
* Remove short-circuit nil err check in DeployTemplate
2024-06-05 08:59:09 -06:00
Edison Cardenas 8878b0d460
ARO-5325: Propagate install error to user (#3509)
* ARO-5325: Propagate error to user and add unit test.

* Refactor: Revert  double quote
2024-04-15 11:48:25 +05:30
Amber Brown 0b31fe7560 fix local dev not building a cluster successfully because of network issues, plus fix a bug in the authorisation logging 2024-02-21 10:59:54 +11:00
kimorris27 3b2db9c121 Added space and fixed grammar in user-facing error messages 2023-12-20 15:56:59 -05:00
kimorris27 d7377e7d67 Capitalize `Azure` in customer-facing error message 2023-12-20 15:56:59 -05:00
kimorris27 adb1f0c4c8 Update attachNSGs cluster install step to retry if Azure complains that NSG is not yet ready 2023-12-20 15:56:59 -05:00
Amber Brown afa28a3789
fix not returning arm template errors (#3288) 2023-11-27 13:52:49 -05:00
Caden Marchese 4e00e297ef
Return actionable service principal errors to the user (#3231)
* revert changes made in #3222 to ensureAccessTokenClaims

* after timeout, return any actionable errors to the user

* combine / improve error messages

* still log err in RP logs if not nil

* fix nil pointer
2023-10-25 15:29:25 -04:00
Caden Marchese cd81ce9073
Return errors from AuthorizationRetryingAction if timeout is reached (#3222) 2023-10-23 16:21:30 +02:00
Amber Brown ccc157e63f update code to use our generated msgraph sdk 2023-09-04 10:35:48 +10:00
Srinivas Atmakuri 644f8b8579
Remove install word in Condition error messages (#3044)
* Removed install word in the error messages
2023-08-25 13:15:59 -04:00
Tanmay Satam 39fb55db0c
Update error enrichment in Condition step to return original error if condition function is unknown (#3046) 2023-07-20 09:22:08 +10:00
Srinivas Atmakuri 9dadd3c314 Refactor conditions to return error
Currently, all conditions steps return InternalServerError and only
looking at the RP logs will give detailed understanding on the failure,
this PR attempts to change this by adding a wrapper function to exiting
poll function to return readable error.
2023-07-19 12:04:57 +02:00
Tanmay Satam a3b0cc0909
Wrap Timeout errors within Condition steps (#3005) 2023-07-18 09:57:55 -06:00
Matthew Barnes 156383c4a6
Migrate RP from Azure AD Graph to Microsoft Graph (#1970)
* go.mod: Add github.com/microsoftgraph/msgraph-sdk-go

* azureclient: Add NewGraphServiceClient

Creates a GraphServiceClient with scope and graph endpoint set
appropriately for the cloud environment (public or US government).

* pkg/util/graph: Add GetServicePrincipalIDByAppID

* armhelper: Use MS Graph to obtain service principal ID

* armhelper: Remove unused authorizer parameter

* Use MS Graph endpoint to validate service principal

I don't think it matters for the purpose of validation, but the
AD Graph endpoint is nearing its end-of-life.

* pkg/cluster: Use MS Graph to obtain service principal ID

* pkg/util/cluster: Use MS Graph to create and delete clusters

* Pretty-print OData errors from MS Graph

To aid debugging failed MS Graph requests.

MS Graph's top-level APIError message is hard-coded and only says
"error status code received from the API".  Further details have
to be extracted from the "ODataErrorable" interface type.

* azureclient: Remove ActiveDirectoryGraphScope

No longer used.

* Remove pkg/util/azureclient/graphrbac

No longer used.

* pipelines: Run CodeQL analysis for Go on 1ES Hosted Pool

Vendoring the Microsoft Graph SDK for Go causes memory consumption
during CodeQL analysis to double due to its enormous API surface,
putting it well beyond the memory limit of standard GitHub Action
runners.

I inquired with the Azure organization admins about provisioning
larger GitHub runners, but was directed instead to use the 1ES
Hosted Pool which runs our other CI checks. Since ARO controls
the VM type for Hosted Pool agents, we can use a VM type with
adequate memory for CodeQL analysis with the Graph SDK.

Note: Implemented CodeQL commands in a template in case we
      ever decide to move Javascript or Python analysis to
      1ES Hosted Pool as well.
2023-06-14 11:10:37 -06:00
Amber Brown dcd513f142 minimal refreshing for SP checks 2023-05-09 20:46:12 +10:00
Jeremy Facchetti b735392f76
fix refresher (#2898) 2023-05-09 10:48:20 +10:00
Amber Brown 3e8fe29630
Attempt to refresh credentials if we get access exceptions (#2890)
* restore the old refreshing step

* try a mechanism to refresh credentials

* widen the scope a little
2023-05-04 13:38:24 -04:00
Matthew Barnes 025f0e5cbc pkg/util/steps: Remove AuthorizationRefreshingAction
No longer used.
2023-04-11 16:32:49 -04:00
Aldo Fuster Turpin fb5683dfb3
create test functions for error comparison (#2614)
refactor: create functions for error comparison in test files
2023-04-06 14:15:15 +02:00
Aldo Fuster Turpin 1af9c38047 add param names to Emitter's interface methods and unify naming 2023-04-05 13:08:29 +02:00
Arris Li e43a468fcf remove outdated comment 2022-09-01 18:12:52 +12:00
Arris Li 5b8d93dc31 more unit test cases, cleanups 2022-09-01 18:10:29 +12:00
Arris Li ae6e5bbc69 auto generate short func name 2022-09-01 13:41:09 +12:00
Arris Li e8b2a141ed add now() func 2022-08-11 09:50:05 +12:00
Arris Li 7eb84c0f67 add comments for metricsTopic param 2022-07-20 12:24:08 +12:00
Arris Li e70df1d40f currentTime param update 2022-07-11 11:13:00 +12:00
Arris Li 648943e155 polish dryrun logic 2022-07-07 20:21:41 +12:00
Arris Li 68bd9d2e9f fix linter issue 2022-07-07 12:32:46 +12:00
Arris Li 8668276465 resolve conficts 2022-07-07 12:07:33 +12:00
Arris Li 390c7e4084 implement step time run metrics logic 2022-07-07 11:47:53 +12:00
Aldo Fuster Turpin 3250e66ef6 refactor: use function friendlyName that already exists
Co-authored-by: Petr Kotas <petrkotas@users.noreply.github.com>
Co-authored-by: Daniel Bizau <dbizau@users.noreply.github.com>
2022-06-29 12:31:36 +02:00
Mikalai Radchuk edfbfe396a Return Step interface from exported functions 2021-10-25 09:26:50 +01:00
Mangirdas Judeikis c350a2f101
nit 2021-08-19 12:07:42 +01:00
Mangirdas Judeikis cf8a7ed161
Add condition support best-effort and change order 2021-08-18 11:08:40 +01:00
Jim Minter 54884d46be remove authorizer refreshing from validateActions 2021-01-08 13:56:19 -05:00
Jim Minter f60a93115a
refresh auth on quota 2020-12-08 19:39:25 -06:00
Nils Elde a03f8f1306 Improve token refresh error handling 2020-10-12 19:03:42 -04:00
Jim Minter 20af47f0e6
refactor test/util/log to allow matching of arbitrary log fields 2020-10-09 09:55:43 -05:00
Amber Brown adaa2ed06a util/steps: a set of steps, and a runner to execute them in series. 2020-08-03 15:02:55 +10:00