Repository navigation
fix: push the single-instance indexer image to a repository that exists - #124
Merged
Merged
Conversation
The single-instance deploy pushed to atp-indexer-<env>-atp-indexer, the ECS fleet's ECR repository. The fleet's terraform owns that repository with force_delete, so it only exists while the fleet does: prod still has it, but testnet's went with the retired testnet fleet. The first testnet single-instance deploy built the image and then failed at the push: name unknown: The repository with name 'atp-indexer-testnet-atp-indexer' does not exist Resolve the repository at deploy time instead: use atp-indexer-<env>-atp-indexer or staking-dashboard-<env>-atp-indexer (the name the single-instance README deploys from), whichever exists, and create the fleet name only if neither does. The box's IAM role can pull from any repository in the account, so the box needs no change. Prod resolves to the repository it uses today.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The first testnet run of the single-instance indexer deploy (run 40290129437) built the image, with the testnet provider metadata from #123, and then failed at the push:
The workflow pushes to
atp-indexer-<env>-atp-indexer, the ECS fleet's ECR repository. The fleet's terraform owns that repository withforce_delete = true, so it only exists while the fleet does:The single-instance README deploys testnet from
staking-dashboard-testnet-atp-indexerinstead.Fix
Resolve the repository at deploy time:
atp-indexer-<env>-atp-indexerorstaking-dashboard-<env>-atp-indexer, whichever exists.atp-indexer-<env>-atp-indexerwith the old terraform's settings: mutable tags, scan on push.The box's role allows
ecr:BatchGetImageonrepository/*in the account, so the box can pull from whichever repository is chosen. Prod resolves to the repository it uses today, so it's unchanged.If the workflow role can't create repositories, the step fails with an explicit AccessDenied instead of the push error.
After merge
Rerun
Deploy ATP Indexerfortestnet(single instance,new_schemaempty). Then/api/providers/50should returnTestIncinstead of mainnet'sStaker Space.