aws / codecatalyst-blueprints

Apache License 2.0
48 stars 18 forks source link

feat(blueprint-cli): add retry logic for blueprint publishing #552

Closed michaellandi closed 1 month ago

michaellandi commented 1 month ago

Description

This change allows the CLI publishing client to retry package upload on failed publishing attempts. If the server returns a retry-able error, the client will automatically retry two additional times to publish the package.

Testing

Locally, I created a test server to test a couple of different failure modes:

const express = require('express');
const app = express();
const port = 3000;

app.put('/', (req, res) => {
  console.log('yikes!');
  res.status(500).send('internal error');
});

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`);
});

Additional context

N/A


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.