[BUILD-1048] Standarize request parsing for magnolia-mgmt's trigger API endpoint Created: 12/Apr/23  Updated: 13/Apr/23

Status: Open
Project: Build
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Roberto Gomez Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon BUILD-1049 Allow triggering of git repository mi... Selected
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Team: Foundation

 Description   

The magnolia-mgmt AP defines a trigger enpoint  to run any of the available fargate tasks defined in ApplicationRunnerTaskExecutor#ACTION.

This approach works because the samen ACTION enum entry name is used to task definitions in fragate.

The only drawback of the current approach is that the API lambda controller needs to parse the request body to set the specific environmnet params.

This can be improved if adhering to the mentioned convention and on top of that we guarantee that for any specific body param its name will be the same as the one defined in Spring config. For example, usgin body.refactoringSpecYaml request param for the
APP_COMMAND_REFACTOR_REFACTORINGSPECYAML environment config.
 
If every convention is followed the body can be parsed just convering from camelcase to UPPERCASE_SNAKE_CASE (or even using the propper case in the body request params).
 

 


Generated at Sun Feb 11 23:47:39 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.