Skip to content

Commit

Permalink
Merge pull request #279 from DEFRA/tf-svc-workflow-improvements
Browse files Browse the repository at this point in the history
fixes lookupTenantService call with wrong param
  • Loading branch information
christopherjturner authored Aug 29, 2024
2 parents e1eb932 + b8dbbc1 commit 992c2c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
6 changes: 1 addition & 5 deletions src/api/deploy/controllers/deploy-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ const deployServiceController = {
)
request.logger.info('Deployment registered')

const service = await lookupTenantService(
imageName,
environment,
request.logger
)
const service = await lookupTenantService(imageName, environment)

if (!service) {
const message =
Expand Down
6 changes: 1 addition & 5 deletions src/api/deploy/controllers/existing-service-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ const existingServiceInfoController = {
const environment = request.params.environment
const imageName = request.params.imageName

const service = await lookupTenantService(
imageName,
environment,
request.logger
)
const service = await lookupTenantService(imageName, environment)

const filePath = `environments/${environment}/${service?.zone}/${imageName}.json`

Expand Down
2 changes: 1 addition & 1 deletion src/api/deploy/helpers/lookup-tenant-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function lookupTenantService(service, environment, ref = 'main') {
return service
} catch (error) {
logger.error(
`Error attempting to retrieve ${filePath} from GitHub - Falling back to tenant_services.json`
`Error attempting to retrieve ${filePath} from GitHub - Falling back to tenant_services.json, ${error}`
)
return await lookupLegacyTenantService(service, environment, org, repo, ref)
}
Expand Down

0 comments on commit 992c2c0

Please sign in to comment.