Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/build-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
AWS_REGION: us-east-1
CLUSTER_NAME: maker-prod
DOCKER_IMAGE_REGISTRY: makerdao/cage-keeper
DOCKER_IMAGE_TAG: latest

steps:
- name: Checkout
Expand All @@ -33,17 +32,21 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set short git commit SHA
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Build, tag, and push image to Dockerhub
id: build-image
run: |
docker build -t ${{ env.DOCKER_IMAGE_REGISTRY }} .
docker tag ${{ env.DOCKER_IMAGE_REGISTRY }} ${{ env.DOCKER_IMAGE_REGISTRY }}:${{ env.DOCKER_IMAGE_TAG }}
docker push ${{ env.DOCKER_IMAGE_REGISTRY }}:${{ env.DOCKER_IMAGE_TAG }}
docker tag ${{ env.DOCKER_IMAGE_REGISTRY }} ${{ env.DOCKER_IMAGE_REGISTRY }}:${{ steps.vars.outputs.sha_short }}
docker push ${{ env.DOCKER_IMAGE_REGISTRY }}:${{ steps.vars.outputs.sha_short }}

- name: Deploying app to Kubernetes with Helm
uses: bitovi/github-actions-deploy-eks-helm@v1.2.4
with:
values: image.repository=${{ env.DOCKER_IMAGE_REGISTRY }},image.tag=${{ env.DOCKER_IMAGE_TAG }}
values: image.repository=${{ env.DOCKER_IMAGE_REGISTRY }},image.tag=${{ steps.vars.outputs.sha_short }}
cluster-name: ${{ env.CLUSTER_NAME }}
config-files: deploy/production/cage-keeper.yaml
chart-path: techops-services/common
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
url = https://github.com/makerdao/pymaker.git
[submodule "lib/auction-keeper"]
path = lib/auction-keeper
url = https://github.com/makerdao/auction-keeper.git
url = https://github.com/chong-techops/auction-keeper.git
Copy link
Copy Markdown
Contributor

@sanbotto sanbotto May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this was a change done for testing purposes and it should be rolled back now.

Suggested change
url = https://github.com/chong-techops/auction-keeper.git
url = https://github.com/makerdao/auction-keeper.git

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The upstream was archived.
image

[submodule "lib/pygasprice-client"]
path = lib/pygasprice-client
url = https://github.com/makerdao/pygasprice-client.git
url = https://github.com/chong-techops/pygasprice-client.git
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Suggested change
url = https://github.com/chong-techops/pygasprice-client.git
url = https://github.com/makerdao/pygasprice-client.git

2 changes: 1 addition & 1 deletion lib/auction-keeper
2 changes: 1 addition & 1 deletion lib/pygasprice-client
2 changes: 1 addition & 1 deletion lib/pymaker
21 changes: 18 additions & 3 deletions src/cage_keeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ def __init__(self, args: list, **kwargs):
help="Enable debug output")

parser.add_argument("--etherscan-api-key", type=str, default=None, help="Etherscan API key for gas price oracle")
parser.add_argument("--gas-initial-multiplier", type=str, default=1.0, help="Gas price multiplier for first try")
parser.add_argument("--gas-reactive-multiplier", type=str, default=2.25, help="Gas price multiplier for subsequent tries")
parser.add_argument("--gas-maximum", type=str, default=5000, help="Maximum gas price in Gwei")
parser.add_argument("--oracle-gas-price", dest='oracle_gas_price', action='store_true', default=True,
help="Use gas price oracle for gas price discovery (default: True)")
parser.add_argument("--gas-initial-multiplier", type=float, default=1.0, help="Gas price multiplier for first try")
parser.add_argument("--gas-reactive-multiplier", type=float, default=2.25, help="Gas price multiplier for subsequent tries")
parser.add_argument("--gas-maximum", type=float, default=5000, help="Maximum gas price in Gwei")

parser.set_defaults(cageFacilitated=False)
self.arguments = parser.parse_args(args)
Expand All @@ -117,9 +119,22 @@ def __init__(self, args: list, **kwargs):
self.confirmations = 0

# Create gas strategy
# Set default values for missing arguments to avoid AttributeError
if not hasattr(self.arguments, 'ethgasstation_api_key'):
self.arguments.ethgasstation_api_key = None
if not hasattr(self.arguments, 'poanetwork_url'):
self.arguments.poanetwork_url = None
if not hasattr(self.arguments, 'blocknative_api_key'):
self.arguments.blocknative_api_key = None
if not hasattr(self.arguments, 'fixed_gas_price'):
self.arguments.fixed_gas_price = None

if self.arguments.etherscan_api_key:
# Use Etherscan for gas price
self.gas_price = DynamicGasPrice(self.arguments, self.web3)
else:
# If no Etherscan API key is provided, set oracle_gas_price to False to avoid the error
self.arguments.oracle_gas_price = False
self.gas_price = DefaultGasPrice()


Expand Down
Loading