question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic task modification

See original GitHub issue

In our use case, we need to modify some of our task definition parameters and use values that are known just during deployment. For example, We need to provide to our component env variable VERSION:

{
   "environment": [
        {
          "name": "VERSION",
          "value": "7.0.1476"
        }
      ],
}

Some general mechanism for replacing placeholders with wanted value would be really helpful. For example we could define

{
    "environment": [
        {
          "name": "VERSION",
          "value": "#VERSION#"
        }
      ],
}

And pass there the correct value:

    - name: Render Amazon ECS task definition
      id: render-task-definition
      uses: aws-actions/amazon-ecs-render-task-definition@v1
      with:
        task-definition: abc
        container-name: abc
        image: abc
        replacement_pattern: #VERSION#
        replacement_value: ${{steps.version.outputs.prop}}

The action would replace the replacement_pattern (regexp) with replacement_value.
Would be possible to add this or similar functionality ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
faraquetcommented, Aug 12, 2020

@neugeeug thanks for bringing up this topic. This would be a very useful feature, I was just looking for something similar right now!

1reaction
allisauruscommented, Aug 28, 2020

@neugeeug thanks very much for the suggestion and PR! We’ve seen similar requests re: interpolating stage/env specific-values into a task definition before, but so far haven’t landed on a choice re: implementation.

The linked approach (merging a task def ‘fragment’) strikes me as more extensible b/c you can apply a whole set of changes at once vs. a specific value. I understand the use cases may be somewhat different (to merge a JSON ‘fragment’ you need to have or add the JSON in a file, where for a single value creating a JSON string is more overhead), but I could be missing something. What do you think about a more general “merge” capability?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic Task Mapping — Airflow ... - Apache Airflow
Dynamic Task Mapping allows a way for a workflow to create a number of tasks at runtime based upon current data, rather than...
Read more >
Create dynamic Airflow tasks | Astronomer Documentation
The Airflow dynamic task mapping feature is based on the MapReduce programming model. Dynamic task mapping creates a single task for each input....
Read more >
Solved: How do I dynamically modify RITM & TASK short desc...
Solved: I'm trying to find a way to dynamically modify the short description for the related RITMs and TASKs records that get created...
Read more >
Dynamic Task Shaping for High Throughput Data Analysis ...
Dynamic Task Shaping for High Throughput Data ... size and properties, the analysis kernel may change in ways ... We show that the...
Read more >
Dynamic Modification rule in Functional task list QM/PM
Dynamic Modification rule in Functional task list QM/PM ... we are looking to use the plant maintenance functionality for environmental Monitoring ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found