Repository: Azure/ARO-RP
Pull request #1770 (2021-10-01 16:03:39)

Checkout rp config always
### Which issue this PR addresses:

Fixes (https://dev.azure.com/msazure/AzureRedHatOpenShift/_workitems/edit/11049871/)

### What this PR does / why we need it:

This PR allows checking out of the RP Config to happen to for all ev2 generator pipelines. It Removes the one off checkout in the mirroring / deployment generations. It also removes the not needed dev pipelines.

### Test plan for issue:

I tested that this PR works by running the generator pipelines based of this branch. 

### Is there any documentation that needs to be updated for this PR?

Not that I'm aware of... tech debt cleanup/ increasing the number of pipelines that pull from the RP Config.

Verifying with team to see if there is documentation on where the generators pull their configs.



Patch:
diff --git a/.pipelines/onebranch/pipeline.buildrp.dev.yml b/.pipelines/onebranch/pipeline.buildrp.dev.yml
deleted file mode 100644
index 989681f19..000000000
--- a/.pipelines/onebranch/pipeline.buildrp.dev.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-#################################################################################
-#                               OneBranch Pipelines                             #
-# This pipeline was created by EasyStart from a sample located at:              #
-#   https://aka.ms/obpipelines/easystart/samples                                #
-# Documentation:  https://aka.ms/obpipelines                                    #
-# Yaml Schema:    https://aka.ms/obpipelines/yaml/schema                        #
-# Retail Tasks:   https://aka.ms/obpipelines/tasks                              #
-# Support:        https://aka.ms/onebranchsup                                   #
-#################################################################################
-
-trigger: none
-pr: none
-
-variables:
-  Cdp_Definition_Build_Count: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
-  LinuxContainerImage: cdpxlinux.azurecr.io/global/ubuntu-1804-all:5.0   # Docker image which is used to build the project https://aka.ms/obpipelines/containers
-  Debian_Frontend: noninteractive
-
-resources:
-  repositories:
-  - repository: templates
-    type: git
-    name: OneBranch.Pipelines/GovernedTemplates
-    ref: refs/heads/main
-  - repository: rhado
-    type: git
-    name: ARO.Pipelines
-  - repository: rpconfig
-    type: git
-    name: RP-Config
-
-extends:
-  template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates
-  parameters:
-    globalSdl: # https://aka.ms/obpipelines/sdl
-      # tsa:
-      #  enabled: true # SDL results of non-official builds aren't uploaded to TSA by default.
-      # credscan:
-      #   suppressionsFile: $(Build.SourcesDirectory)\.config\CredScanSuppressions.json
-      policheck:
-        break: true # always break the build on policheck issues. You can disable it by setting to 'false'
-      suppression:
-        suppressionFile: $(Build.SourcesDirectory)\.gdn\.gdnsuppress
-        suppressionSet: default
-
-    stages:
-    - stage: Build_Ev2_Artifacts
-      jobs:
-      - job: Build_Ev2_Artifacts
-        pool:
-          type: linux
-
-        variables: # More settings at https://aka.ms/obpipelines/yaml/jobs
-          ob_outputDirectory: $(Build.SourcesDirectory)/out   # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts
-
-        steps:
-        - template: .pipelines/onebranch/templates/template-generate-ev2-manifests.yml@self
-          parameters:
-            generationType: deployment
-
-    - stage: Build_Docker_Image
-      jobs:
-      - job: Build_Docker_Image
-        pool:
-          type: docker
-          os: linux
-
-        variables:
-          ob_git_checkout: true
-
-        steps:
-        - template: .pipelines/onebranch/templates/template-buildrp-builddocker.yml@self
-
-
-    - stage: Build_ARO
-      jobs:
-      - job: Build_ARO
-        pool:
-          type: linux
-
-        variables: # More settings at https://aka.ms/obpipelines/yaml/jobs
-          ob_outputDirectory: $(Build.SourcesDirectory)/out   # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts
-
-        steps:
-        - template: .pipelines/onebranch/templates/template-buildrp-buildaro.yml@self
diff --git a/.pipelines/onebranch/pipeline.image.mirror.dev.yml b/.pipelines/onebranch/pipeline.image.mirror.dev.yml
deleted file mode 100644
index effba9554..000000000
--- a/.pipelines/onebranch/pipeline.image.mirror.dev.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-#################################################################################
-#                               OneBranch Pipelines                             #
-# This pipeline was created by EasyStart from a sample located at:              #
-#   https://aka.ms/obpipelines/easystart/samples                                #
-# Documentation:  https://aka.ms/obpipelines                                    #
-# Yaml Schema:    https://aka.ms/obpipelines/yaml/schema                        #
-# Retail Tasks:   https://aka.ms/obpipelines/tasks                              #
-# Support:        https://aka.ms/onebranchsup                                   #
-#################################################################################
-
-trigger: none
-pr: none
-
-parameters:
-- name: vsoDeployerBuildID
-  type: string
-  default: latest
-
-variables:
-  Cdp_Definition_Build_Count: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
-  LinuxContainerImage: centos:centos7   # Docker image which is used to build the project https://aka.ms/obpipelines/containers
-  Debian_Frontend: noninteractive
-
-resources:
-  repositories:
-  - repository: templates
-    type: git
-    name: OneBranch.Pipelines/GovernedTemplates
-    ref: refs/heads/main
-  - repository: rhado
-    type: git
-    name: ARO.Pipelines
-
-extends:
-  template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates
-  parameters:
-    globalSdl: # https://aka.ms/obpipelines/sdl
-      # tsa:
-      #  enabled: true # SDL results of non-official builds aren't uploaded to TSA by default.
-      # credscan:
-      #   suppressionsFile: $(Build.SourcesDirectory)\.config\CredScanSuppressions.json
-      policheck:
-        break: true # always break the build on policheck issues. You can disable it by setting to 'false'
-      suppression:
-        suppressionFile: $(Build.SourcesDirectory)\.gdn\.gdnsuppress
-        suppressionSet: default
-
-    stages:
-    - stage: Mirror_Images
-      jobs:
-      - template: .pipelines/onebranch/templates/template-image-mirror.yml@self
diff --git a/.pipelines/onebranch/templates/template-generate-ev2-manifests.yml b/.pipelines/onebranch/templates/template-generate-ev2-manifests.yml
index fa6e1ec28..122b7470b 100644
--- a/.pipelines/onebranch/templates/template-generate-ev2-manifests.yml
+++ b/.pipelines/onebranch/templates/template-generate-ev2-manifests.yml
@@ -12,8 +12,7 @@ parameters:
 
 steps:
 - checkout: rhado
-- ${{ if eq(parameters.generationType, 'deployment') }}:
-  - checkout: rpconfig
+- checkout: rpconfig
 - task: GoTool@0
   displayName: Use Go 1.16.2
   inputs:
diff --git a/.pipelines/onebranch/templates/template-image-mirror.yml b/.pipelines/onebranch/templates/template-image-mirror.yml
index 4a517b418..4f5776012 100644
--- a/.pipelines/onebranch/templates/template-image-mirror.yml
+++ b/.pipelines/onebranch/templates/template-image-mirror.yml
@@ -11,7 +11,6 @@ jobs:
 
   steps:
   - checkout: rhado
-  - checkout: rpconfig
   - task: DownloadPipelineArtifact@2
     displayName: Download Deployer
     inputs:
diff --git a/Makefile b/Makefile
index 70344d802..b2f2ee2f6 100644
--- a/Makefile
+++ b/Makefile
@@ -12,13 +12,10 @@ ifneq ($(shell uname -s),Darwin)
 endif
 
 build-all:
-	go build -tags aro,containers_image_openpgp ./...
+	go build -tags containers_image_openpgp ./...
 
 aro: generate
-	go build -tags aro,containers_image_openpgp,codec.safe -ldflags "-X github.com/Azure/ARO-RP/pkg/util/version.GitCommit=$(COMMIT)" ./cmd/aro
-
-runlocal-rp:
-	go run -tags aro ./cmd/aro rp
+	go build -tags containers_image_openpgp,codec.safe -ldflags "-X github.com/Azure/ARO-RP/pkg/util/version.GitCommit=$(COMMIT)" ./cmd/aro
 
 az: pyenv
 	. pyenv/bin/activate && \
@@ -146,7 +143,7 @@ validate-go:
 	go test -tags e2e -run ^$$ ./test/e2e/...
 
 unit-test-go:
-	go run ./vendor/gotest.tools/gotestsum/main.go --format pkgname --junitfile report.xml -- -tags=aro -coverprofile=cover.out ./...
+	go run ./vendor/gotest.tools/gotestsum/main.go --format pkgname --junitfile report.xml -- -coverprofile=cover.out ./...
 
 lint-go:
 	go run ./vendor/github.com/golangci/golangci-lint/cmd/golangci-lint run
@@ -164,4 +161,4 @@ vendor:
 	# See comments in the script for background on why we need it
 	hack/update-go-module-dependencies.sh
 
-.PHONY: admin.kubeconfig aro az clean client deploy dev-config.yaml discoverycache generate image-aro image-aro-multistage image-fluentbit image-proxy lint-go runlocal-rp proxy publish-image-aro publish-image-aro-multistage publish-image-fluentbit publish-image-proxy secrets secrets-update e2e.test tunnel test-e2e test-go test-python vendor build-all validate-go  unit-test-go coverage-go
+.PHONY: admin.kubeconfig aro az clean client deploy dev-config.yaml discoverycache generate image-aro image-aro-multistage image-fluentbit image-proxy lint-go proxy publish-image-aro publish-image-aro-multistage publish-image-fluentbit publish-image-proxy secrets secrets-update e2e.test tunnel test-e2e test-go test-python vendor build-all validate-go  unit-test-go coverage-go
diff --git a/README.md b/README.md
index 444df2181..abc4b601c 100644
--- a/README.md
+++ b/README.md
@@ -89,6 +89,7 @@ questions or comments.
       aro-operator-master.openshift-azure-operator:8080, to avoid the
       `AlertmanagerReceiversNotConfigured` warning.
 
+    * azurensg: Ensures that the Network Security Groups (NSGs) are correct, and updates the Azure Machine Provider spec with subnet, vnet, and Network Resource Group.
 
     * checker: Watches the `Cluster` resource for changes and updates conditions
       of the resource based on checks mentioned below
@@ -127,8 +128,6 @@ questions or comments.
     * routefix: Ensures all the routefix resources in the namespace
       `openshift-azure-routefix` remain on the cluster.
 
-    * subnets: Ensures that the Network Security Groups (NSGs) are correct, and updates the Azure Machine Provider spec with subnet, vnet, and Network Resource Group.
-
     * workaround: Applies a set of temporay workarounds to the ARO cluster.
 
   * pkg/portal: Portal for running promql queries against a cluster or requesting a kubeconfig for a cluster.
diff --git a/cmd/aro/ensurebuildtag.go b/cmd/aro/ensurebuildtag.go
deleted file mode 100644
index 265710d09..000000000
--- a/cmd/aro/ensurebuildtag.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package main
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the Apache License 2.0.
-
-var platformIsAro bool
diff --git a/cmd/aro/ensurebuildtag_aro.go b/cmd/aro/ensurebuildtag_aro.go
deleted file mode 100644
index 584d85f95..000000000
--- a/cmd/aro/ensurebuildtag_aro.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// +build aro
-
-package main
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the Apache License 2.0.
-
-func init() {
-	platformIsAro = true
-}
diff --git a/cmd/aro/main.go b/cmd/aro/main.go
index 1fc73b251..57e6b28f7 100644
--- a/cmd/aro/main.go
+++ b/cmd/aro/main.go
@@ -42,11 +42,6 @@ func main() {
 	audit := utillog.GetAuditEntry()
 	log := utillog.GetLogger()
 
-	// TODO: Use `azuretypes.Platform.IsARO()` from github.com/openshift/installer/pkg/types/azure
-	if !platformIsAro {
-		log.Fatal("ARO-RP must be built, run, and tested with '-tags aro' to support github.com/openshift/installer, see https://github.com/openshift/installer/pull/4843/files")
-	}
-
 	go func() {
 		log.Warn(http.ListenAndServe("localhost:6060", nil))
 	}()
diff --git a/docs/deploy-development-rp.md b/docs/deploy-development-rp.md
index f3de4ce9c..f02a9d558 100644
--- a/docs/deploy-development-rp.md
+++ b/docs/deploy-development-rp.md
@@ -88,7 +88,7 @@
 1. Run the RP
 
    ```bash
-   make runlocal-rp
+   go run ./cmd/aro rp
    ```
 
 1. To create a cluster, EITHER follow the instructions in [Create, access, and
diff --git a/pkg/cluster/install.go b/pkg/cluster/install.go
index e0fa4746f..aedcd7212 100644
--- a/pkg/cluster/install.go
+++ b/pkg/cluster/install.go
@@ -35,9 +35,9 @@ func (m *manager) AdminUpdate(ctx context.Context) error {
 		steps.Action(m.ensureDefaults),
 		steps.AuthorizationRefreshingAction(m.fpAuthorizer, steps.Action(m.ensureResourceGroup)), // re-create RP RBAC if needed after tenant migration
 		steps.Action(m.createOrUpdateDenyAssignment),
+		steps.Action(m.populateRegistryStorageAccountName),
 		steps.Action(m.startVMs),
 		steps.Condition(m.apiServersReady, 30*time.Minute, false),
-		steps.Action(m.populateRegistryStorageAccountName),
 		steps.Action(m.ensureBillingRecord), // belt and braces
 		steps.Action(m.configureAPIServerCertificate),
 		steps.Action(m.configureIngressCertificate),
diff --git a/pkg/util/log/audit/audit.go b/pkg/util/log/audit/audit.go
index 4b17b53f7..b85c0efd8 100644
--- a/pkg/util/log/audit/audit.go
+++ b/pkg/util/log/audit/audit.go
@@ -5,7 +5,6 @@ package audit
 
 import (
 	"encoding/json"
-	"fmt"
 	"sync"
 
 	"github.com/gofrs/uuid"
@@ -70,118 +69,125 @@ var (
 	seqNumMutex sync.Mutex
 )
 
-// PayloadHook, when fires, hydrates an IFxAudit log payload using data in a log
+// AddHook modifies logger by adding the payload hook to its list of hooks.
+func AddHook(logger *logrus.Logger) {
+	logger.AddHook(&payloadHook{
+		payload: &Payload{},
+	})
+}
+
+// payloadHook, when fires, hydrates an IFxAudit log payload using data in a log
 // entry.
-type PayloadHook struct {
-	Payload *Payload
+type payloadHook struct {
+	payload *Payload
 }
 
-func (PayloadHook) Levels() []logrus.Level {
+func (payloadHook) Levels() []logrus.Level {
 	return logrus.AllLevels
 }
 
-func (h *PayloadHook) Fire(entry *logrus.Entry) error {
-	h.Payload = &Payload{}
+func (h *payloadHook) Fire(entry *logrus.Entry) error {
+	h.payload = &Payload{}
 
 	// Part-A
-	h.Payload.EnvVer = IFXAuditVersion
-	h.Payload.EnvName = IFXAuditName
+	h.payload.EnvVer = IFXAuditVersion
+	h.payload.EnvName = IFXAuditName
 
 	if v, ok := entry.Data[MetadataCreatedTime].(string); ok {
-		h.Payload.EnvTime = v
+		h.payload.EnvTime = v
 	}
 
-	h.Payload.EnvEpoch = epoch
-	h.Payload.EnvSeqNum = nextSeqNum()
+	h.payload.EnvEpoch = epoch
+	h.payload.EnvSeqNum = nextSeqNum()
 
-	if v, ok := entry.Data[EnvKeyIKey]; ok {
-		h.Payload.EnvIKey = fmt.Sprint(v)
+	if v, ok := entry.Data[EnvKeyIKey].(string); ok {
+		h.payload.EnvIKey = v
 		delete(entry.Data, EnvKeyIKey)
 	}
 
-	h.Payload.EnvFlags = ifxAuditFlags
+	h.payload.EnvFlags = ifxAuditFlags
 
-	if v, ok := entry.Data[EnvKeyAppID]; ok {
-		h.Payload.EnvAppID = fmt.Sprint(v)
+	if v, ok := entry.Data[EnvKeyAppID].(string); ok {
+		h.payload.EnvAppID = v
 		delete(entry.Data, EnvKeyAppID)
 	}
 
-	if v, ok := entry.Data[EnvKeyAppVer]; ok {
-		h.Payload.EnvAppVer = fmt.Sprint(v)
+	if v, ok := entry.Data[EnvKeyAppVer].(string); ok {
+		h.payload.EnvAppVer = v
 		delete(entry.Data, EnvKeyAppVer)
 	}
 
-	if v, ok := entry.Data[EnvKeyCorrelationID]; ok {
-		h.Payload.EnvCV = fmt.Sprint(v)
+	if v, ok := entry.Data[EnvKeyCorrelationID].(string); ok {
+		h.payload.EnvCV = v
 		delete(entry.Data, EnvKeyCorrelationID)
 	}
 
-	if v, ok := entry.Data[EnvKeyEnvironment]; ok {
-		h.Payload.EnvCloudName = fmt.Sprint(v)
-		h.Payload.EnvCloudEnvironment = fmt.Sprint(v)
+	if v, ok := entry.Data[EnvKeyEnvironment].(string); ok {
+		h.payload.EnvCloudName = v
+		h.payload.EnvCloudEnvironment = v
 		delete(entry.Data, EnvKeyEnvironment)
 	}
 
-	if v, ok := entry.Data[EnvKeyCloudRole]; ok {
-		h.Payload.EnvCloudRole = fmt.Sprint(v)
+	if v, ok := entry.Data[EnvKeyCloudRole].(string); ok {
+		h.payload.EnvCloudRole = v
 		delete(entry.Data, EnvKeyCloudRole)
 	}
 
-	if v, ok := entry.Data[EnvKeyCloudRoleVer]; ok {
-		h.Payload.EnvCloudRoleVer = fmt.Sprint(v)
+	if v, ok := entry.Data[EnvKeyCloudRoleVer].(string); ok {
+		h.payload.EnvCloudRoleVer = v
 		delete(entry.Data, EnvKeyCloudRoleVer)
 	}
 
-	if v, ok := entry.Data[EnvKeyHostname]; ok {
-		h.Payload.EnvCloudRoleInstance = fmt.Sprint(v)
+	if v, ok := entry.Data[EnvKeyHostname].(string); ok {
+		h.payload.EnvCloudRoleInstance = v
 		delete(entry.Data, EnvKeyHostname)
 	}
 
-	if v, ok := entry.Data[EnvKeyLocation]; ok {
-		h.Payload.EnvCloudLocation = fmt.Sprint(v)
+	if v, ok := entry.Data[EnvKeyLocation].(string); ok {
+		h.payload.EnvCloudLocation = v
 		delete(entry.Data, EnvKeyLocation)
 	}
 
-	if v, ok := entry.Data[EnvKeyCloudDeploymentUnit]; ok {
-		h.Payload.EnvCloudDeploymentUnit = fmt.Sprint(v)
+	if v, ok := entry.Data[EnvKeyCloudDeploymentUnit].(string); ok {
+		h.payload.EnvCloudDeploymentUnit = v
 		delete(entry.Data, EnvKeyCloudDeploymentUnit)
 	}
 
-	h.Payload.EnvCloudVer = IFXAuditCloudVer
+	h.payload.EnvCloudVer = IFXAuditCloudVer
 
 	// Part-B
 	if ids, ok := entry.Data[PayloadKeyCallerIdentities].([]CallerIdentity); ok {
-		h.Payload.CallerIdentities = append(h.Payload.CallerIdentities, ids...)
+		h.payload.CallerIdentities = append(h.payload.CallerIdentities, ids...)
 		delete(entry.Data, PayloadKeyCallerIdentities)
 	}
 
-	if v, ok := entry.Data[PayloadKeyCategory]; ok {
-		h.Payload.Category = fmt.Sprint(v)
+	if v, ok := entry.Data[PayloadKeyCategory].(string); ok {
+		h.payload.Category = v
 		delete(entry.Data, PayloadKeyCategory)
 	}
 
-	if v, ok := entry.Data[PayloadKeyOperationName]; ok {
-		h.Payload.OperationName = fmt.Sprint(v)
+	if v, ok := entry.Data[PayloadKeyOperationName].(string); ok {
+		h.payload.OperationName = v
 		delete(entry.Data, PayloadKeyOperationName)
 	}
 
 	if v, ok := entry.Data[PayloadKeyResult].(Result); ok {
-		h.Payload.Result = v
+		h.payload.Result = v
 		delete(entry.Data, PayloadKeyResult)
 	}
 
-	if v, ok := entry.Data[PayloadKeyRequestID]; ok {
-		h.Payload.RequestID = fmt.Sprint(v)
+	if v, ok := entry.Data[PayloadKeyRequestID].(string); ok {
+		h.payload.RequestID = v
 		delete(entry.Data, PayloadKeyRequestID)
 	}
 
 	if rs, ok := entry.Data[PayloadKeyTargetResources].([]TargetResource); ok {
-		h.Payload.TargetResources = append(h.Payload.TargetResources, rs...)
+		h.payload.TargetResources = append(h.payload.TargetResources, rs...)
 		delete(entry.Data, PayloadKeyTargetResources)
 	}
 
 	// add the audit payload
-	b, err := json.Marshal(h.Payload)
+	b, err := json.Marshal(h.payload)
 	if err != nil {
 		return err
 	}
diff --git a/pkg/util/log/log.go b/pkg/util/log/log.go
index 112563e88..2a47ee109 100644
--- a/pkg/util/log/log.go
+++ b/pkg/util/log/log.go
@@ -45,31 +45,17 @@ func getBaseLogger() *logrus.Logger {
 		FullTimestamp: true,
 	})
 
-	logger.AddHook(&logrHook{})
+	if journal.Enabled() {
+		logger.AddHook(&journaldHook{})
+	}
 
 	return logger
 }
 
-// Important: Logger hooks loading order is important as they are executed in
-// such order (https://github.com/sirupsen/logrus/blob/master/hooks.go#L26-L34).
-//  This means we need to load all populating hooks (logrHook, auditHook)
-// first, and emitting hooks (journald) last. Otherwise enriched data is lost.
-// In addition to that we need to understand that in situations like this log output
-// in CMD might be not the same as in journald, because we emit directly to journald.
-// If to remove this, we would need additional layer for log parsing.
-
 // GetAuditEntry returns a consistently configured audit log entry
 func GetAuditEntry() *logrus.Entry {
 	auditLogger := getBaseLogger()
-
-	auditLogger.AddHook(&audit.PayloadHook{
-		Payload: &audit.Payload{},
-	})
-
-	if journal.Enabled() {
-		auditLogger.AddHook(&journaldHook{})
-	}
-
+	audit.AddHook(auditLogger)
 	return logrus.NewEntry(auditLogger)
 }
 
@@ -83,9 +69,7 @@ func GetLogger() *logrus.Entry {
 		CallerPrettyfier: relativeFilePathPrettier,
 	})
 
-	if journal.Enabled() {
-		logger.AddHook(&journaldHook{})
-	}
+	logger.AddHook(&logrHook{})
 
 	log := logrus.NewEntry(logger)
 


Test patch:
diff --git a/cmd/aro/ensurebuildtag_test.go b/cmd/aro/ensurebuildtag_test.go
deleted file mode 100644
index 39b1141bc..000000000
--- a/cmd/aro/ensurebuildtag_test.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package main
-
-// Copyright (c) Microsoft Corporation.
-// Licensed under the Apache License 2.0.
-
-import (
-	"testing"
-)
-
-func TestEnsureAroTag(t *testing.T) {
-	/*
-		This file should always fail this test when "+build !aro".
-		The 'aro' tag is required for the openshift/installer to disable certain
-		functionality which are valid for OpenShift on Azure, but not valid for ARO deployments.
-		Related: https://github.com/openshift/installer/pull/4843
-	*/
-	// TODO: Use `azuretypes.Platform.IsARO()` from github.com/openshift/installer/pkg/types/azure
-	if !platformIsAro {
-		t.Fatalf("ARO-RP must be built, run, and tested with '-tags aro' to support github.com/openshift/installer, see https://github.com/openshift/installer/pull/4843/files")
-	}
-}
diff --git a/test/util/log/log.go b/test/util/log/log.go
index bebc3768f..55a5a4dde 100644
--- a/test/util/log/log.go
+++ b/test/util/log/log.go
@@ -29,9 +29,7 @@ func New() (*test.Hook, *logrus.Entry) {
 // feature.
 func NewAudit() (*test.Hook, *logrus.Entry) {
 	logger, h := test.NewNullLogger()
-	logger.AddHook(&audit.PayloadHook{
-		Payload: &audit.Payload{},
-	})
+	audit.AddHook(logger)
 	return h, logrus.NewEntry(logger)
 }