Skip to content

Conversation

cotti
Copy link
Contributor

@cotti cotti commented Sep 25, 2025

update-redirects should verify the output at each stage - an empty string is not parsed as a valid empty JSON response. We should fail the workflow step, but not crash.

@cotti cotti self-assigned this Sep 25, 2025
@cotti cotti requested a review from a team as a code owner September 25, 2025 06:49
@cotti cotti requested a review from reakaleek September 25, 2025 06:49
@cotti cotti added fix ci and removed fix labels Sep 25, 2025
_logger.LogInformation("Describing KeyValueStore");
try
{
var json = CaptureMultiple("aws", "cloudfront", "describe-key-value-store", "--name", kvsName);
Copy link
Member

Choose a reason for hiding this comment

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

Can we have a retry mechanism here? It seems like this is a temporary error that only happens occasionally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm... We have a retry mechanism on ExternalCommandExecutor, defaulting to 10 tries. Since we don't rethrow from it, It seems the mechanism is working. Is it worth it to have another? Each cycle can take up to 30s, accounting for the execution timeout.
I'll add individual error logging as well, that can be interesting too.

Copy link
Member

Choose a reason for hiding this comment

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

I see.

Kinda unrelated.. but I'm starting to wonder how do we handle paging for describe-key-valiue-store?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Paging is sort of handled partially by the AWS CLI itself. max-items determines the amount of items the CLI will output in the end, and page-size determines the internal paging in the CLI when communicating with AWS.

This means that if we had --max-items 50 --page-size 10, the CLI would call AWS up to 5 times before giving us the answer. The eTag it gives us as part of the output determines where in the query we are, and if it is null we have reached the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are now logging as warnings when exceptions occur in an execution attempt loop. They shouldn't be errors since later attempts might be successful.

@cotti cotti requested a review from reakaleek September 26, 2025 17:13
Copy link
Member

@reakaleek reakaleek left a comment

Choose a reason for hiding this comment

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

So if I understand correctly, this will still exit with a non-zero code, right?

it will just error gracefully instead of throwing an exception?

@cotti
Copy link
Contributor Author

cotti commented Sep 29, 2025

So if I understand correctly, this will still exit with a non-zero code, right?

it will just error gracefully instead of throwing an exception?

Yep, if we can't reliably get the data from AWS even after all attempts, we still exit with non-zero, but cleanly.

@cotti cotti enabled auto-merge (squash) September 29, 2025 13:27
@cotti cotti merged commit 1fad31b into main Sep 29, 2025
19 checks passed
@cotti cotti deleted the fix/kvs_update_resiliency branch September 29, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants