Verify app in deployment request with auction when deploying
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 36s
Webapp Test / Run webapp test suite (pull_request) Successful in 5m23s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m36s
Smoke Test / Run basic test suite (pull_request) Successful in 5m17s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 15m12s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 15m27s
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 36s
Webapp Test / Run webapp test suite (pull_request) Successful in 5m23s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m36s
Smoke Test / Run basic test suite (pull_request) Successful in 5m17s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 15m12s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 15m27s
This commit is contained in:
parent
67599898dc
commit
4e4d498913
@ -882,6 +882,21 @@ def confirm_auction(laconic: LaconicRegistryClient, record, deployer_lrn, paymen
|
||||
auction_id = record.attributes.auction
|
||||
auction = laconic.get_auction(auction_id)
|
||||
|
||||
# Fetch auction record for given auction
|
||||
auction_records_by_id = laconic.app_deployment_auctions({"auction": auction_id})
|
||||
if len(auction_records_by_id) == 0:
|
||||
logger.log(f"{record.id}: unable to locate record for auction {auction_id}")
|
||||
return False
|
||||
|
||||
# Cross check app against application in the auction record
|
||||
requested_app = record.attributes.application
|
||||
auction_app = auction_records_by_id[0].attributes.application
|
||||
if requested_app != auction_app:
|
||||
logger.log(
|
||||
f"{record.id}: requested application {requested_app} does not match application from auction record {auction_app}"
|
||||
)
|
||||
return False
|
||||
|
||||
if not auction:
|
||||
logger.log(f"{record.id}: unable to locate auction {auction_id}")
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user