Skip to content

Conversation

@s3cube
Copy link
Contributor

@s3cube s3cube commented Nov 25, 2025

In this PR:

  • Requiring the serviceName on the input since the GitHub Action does not store state, and would break if we had to re-use it across requests

Satej Sawant added 2 commits November 25, 2025 15:51
Move service-name to the top of required input validations
since it's now a required parameter. This provides faster
feedback to users if the service name is missing.

Changes:
- Read and validate service-name first among required inputs
- Remove duplicate service-name declarations
- Fix test mocks that had duplicate service-name entries
- All 17 tests passing
Move service-name to be the first input in action.yml since
it's now a required parameter. This makes the action.yml
structure consistent with the validation order in index.js.

Changes:
- Move service-name from 'Service identification' section to top
- Place it as the first required input
- Simplify description to match index.js comment
- All 17 tests passing
@s3cube s3cube requested a review from omkhegde November 25, 2025 20:55
@s3cube s3cube requested a review from amazreech November 25, 2025 20:58
@s3cube s3cube merged commit 4fe4c1d into main Nov 25, 2025
2 checks passed
@s3cube s3cube deleted the feature/require-service-name branch November 25, 2025 21:04
core.info('Checking if service exists...');
const describeCommand = new DescribeServicesCommand({
cluster: clusterName,
services: [serviceName]

Choose a reason for hiding this comment

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

Should we still trim() here?

core.info('Service does not exist, will create new service');
}
} catch (error) {
if (error.name === 'ServiceNotFoundException' || error.name === 'ClusterNotFoundException') {

Choose a reason for hiding this comment

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

Doesn't look like ServiceNotFoundException is ever thrown: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeServices.html

} else {
throw error;
core.info('Service exists but is INACTIVE, will create new service');
}

Choose a reason for hiding this comment

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

Do we want to handle the case where service is in DRAINING state here? Prolly an error if a service is DRAINING

https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Service.html#ECS-Type-Service-status

s3cube added a commit that referenced this pull request Nov 26, 2025
In this PR:

    Requiring the serviceName on the input since the GitHub Action does not store state, and would break if we had to re-use it across requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants