Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Mika Fonsén
    @mfonsen
    As mentioned in issues, I was able to take first project to production. Thank you very much. Everyone involved were delighted how easy it was and how many improvements there were over earlier Sceptre.
    I created some issues, but there were many other observervations. Maybe I'll write some down here
    It seems like Takomo fails deleting a stack that has termination protection set. Haven't had time to reproduce.
    Would be nice if there were an option that would return 0 if no changes are needed to stacks and 1 if Takomo would change something. In essence this would be the same as answering yes to first question and then failing if there are subsequent prompts
    1 reply
    Seems like Takomo retry gets stuck if credentials expire along during deployment
    Mika Fonsén
    @mfonsen
    I was planning to write something about how to migrate from Sceptre to Takomo. It wouldn't be perfect as there are so many ways how to use Takomo. I wonder it would make sense to create a documentation PR on this?
    Henri Meltaus
    @hmeltaus
    Hi, I'm really glad to hear that you've been able to complete some migrations already. Lots of improvements are still needed as you have noticed, especially error handling isn't perfect. I'll try to fix any issues you find and also implement new features, just keep 'em coming =) Documentation PRs are welcome. I've just recently switched from VuePress to Docusaurus. The current docs are in this repo https://github.com/takomo-io/takomo-docs .
    Henri Meltaus
    @hmeltaus
    regarding deleting stacks that have deletion protection on. Currently there's no support to enable/disable deletion protection. So, when Takomo fails to delete a stack with deletion protection on, it works as expected. I created a new issue to add support for this takomo-io/takomo#86
    Mika Fonsén
    @mfonsen
    It would be quite enough if the error message would indicate that deletion cant’t be done due to protection. It was really easy to use command hook with aws cli to implement the manipulation part. Or to create a custom hook. Anyway, a really minor issue
    I’ll take a look at the migration docs PR at some point.
    Mika Fonsén
    @mfonsen
    Thank you for all those improvements recently merged. I’ll try to upgrade to 1.5.0 once it’s out. Everything seems to be running nicely atm
    Henri Meltaus
    @hmeltaus
    ok, I'll do the releases tonight
    Mika Fonsén
    @mfonsen
    Maybe I could tag a PR with #assertnochanges to ensure that for example a Takomo upgrade does not change the stacks. Or some other refactoring. And the same from my own machine if necessary
    Or the recently done migration from Sceptre to Takomo. Nothing was supposed to be changes. On CI I had to use —yes which could have changed something
    If you use —yes and cloud side SAM Takomo always reports updates complete even though nothing was changed. This is probably a Cloudformation feature
    Henri Meltaus
    @hmeltaus
    ok, I'll look into this
    Mika Fonsén
    @mfonsen
    Something I noticed this week, but haven't had time to study enoughl. Happens with 1.5.1 in deploy: a dependency list contains one undefined item. The .find() assumes each item in the list is an object. If I find the cause, I'll create an issue.
    https://github.com/takomo-io/takomo/blob/f77899f53755c7386815d1dcfc76f29a298ba047/packages/stacks-commands/src/stacks/deploy/wait.ts#L23
    2020-10-08 14:40:12 +0300 [error] - /foo/eu-west-1/bar/bar.yml/eu-west-1 - An error occurred while waiting dependencies to complete TypeError: Cannot read property 'success' of undefined
    at /bar/node_modules/@takomo/stacks-commands/dist/stacks/deploy/wait.js:13:75
    at Array.find (<anonymous>)
    at Object.exports.waitForDependenciesToComplete (/bar/node_modules/@takomo/stacks-commands/dist/stacks/deploy/wait.js:13:60)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    2020-10-08 14:40:12 +0300 [debug] - /foo/eu-west-1/foo2/foo2.yml/eu-west-1 - Some dependencies failed
    Mika Fonsén
    @mfonsen
    There are five dependencies in the failing stack and for one the array item is that undefined
    Mika Fonsén
    @mfonsen
    In the bottom of the dependency chain the stack says: Request failed with error code 'ValidationError', aborting
    Mika Fonsén
    @mfonsen
    The problem seems to be that this error is not caught, but the stack returns status=SKIPPED and the whole deployment says: Completed in 4.6s with status: SUCCESS
    Mika Fonsén
    @mfonsen
    And if you dig the error message, it seems the problem is something else: "No updates are to be performed."
    Henri Meltaus
    @hmeltaus
    Hi, I have a hunch of what could cause this. I'll try to fix it asap
    Mika Fonsén
    @mfonsen
    Oh, that sounds great!
    I bumped into this problem after adding one more stack to bottom of the dependency chain. It might have something to do with it. I'll have to check tomorrow.
    Henri Meltaus
    @hmeltaus
    You couldn't upgrade to takomo v2 because you have some lambdas that require node 12, right? Did you have time to research if you could use node 14 in the same project?
    Mika Fonsén
    @mfonsen
    True. I didn’t figure out any idea other than moving all the files in the monorepo. Maybe completely separate tool installation would work.
    Mika Fonsén
    @mfonsen
    It would seem like the node version management tool Volta that we are using supports tool specific node versions. According to documentation it finds the correct node version automatically. I’ll try it out tomorrow. It’s a great cross platform tool by the way
    Henri Meltaus
    @hmeltaus
    sound interesting, I'll need to check Volta. I've been using asdf to manage multiple versions of node and other tools https://asdf-vm.com/#/
    Mika Fonsén
    @mfonsen
    "volta install takomo@2.8.0" in postinstall and running takomo command after that seemed to resolve the node version problem. I still get "Cannot read property 'success' of undefined" though
    Henri Meltaus
    @hmeltaus
    ok, please create an issue with some more details
    Mika Fonsén
    @mfonsen
    Sure, thank you for helping to investigate this
    Mika Fonsén
    @mfonsen
    The issue has now been created. Unfortunately I did not find much useful additional information about the problem.
    Henri Meltaus
    @hmeltaus
    thanks, let's hope I can find a way to reproduce the problem quickly.
    Mika Fonsén
    @mfonsen
    I've continued my investigations. I've found two issues:
    • in 1.4.1 the issue was resolved by removing the new dependency. It wasn't really needed.
    • in 2.8.0 unlike I wrote, I was not able to get even the original configuration to work. I'm pretty sure some error gets swallowed somewhere and produces that 'undefined' that was visible in 1.4.1. Now as I can't see that possible error, it's really hard to debug. This also makes it difficult to create an example configuration that reproduces the error.
    Mika Fonsén
    @mfonsen
    I updated the issue after testing this with 1.5.1 and after noticing that on 2.8.0 there were multiple problems
    Mika Fonsén
    @mfonsen
    I noticed there was a fix for cloudformation transformations. Many stacks in the problematic application use sam transformations. Maybe it’s related
    Henri Meltaus
    @hmeltaus
    yes, there's one bug related to reviewing of stacks that use transformations. There were no integration tests for such stacks.
    Mika Fonsén
    @mfonsen
    This was by the way one working solution with Volta to use different Node version for Takomo. In package.json postinstall: $VOLTA_HOME/bin/volta install takomo@2.11.1. This was a bit tricky because Volta removes itself from the path when it executes a tool such as yarn or npm. Works with latest Volta.
    Mika Fonsén
    @mfonsen
    I wonder if there's a way to access template parameters from Handlebars code from within a .hbs template? I tried doing {{log this}} but I only see what the stack config gets but not what it produces. The documentation in https://takomo.io/docs/stacks/templating-with-handlebars#stack-configuration doesn't seem to mention this. Maybe something like this.template.parameters?
    use case: iterate over all shards of a kinesis data stream
    Mika Fonsén
    @mfonsen
    It seems that the solution is a custom hook that mutates variables
    Mika Fonsén
    @mfonsen
    yes, that was the solution
    Maybe I'll create an issue so that someone else can find this
    Henri Meltaus
    @hmeltaus
    Currently, the template is processed before the parameters, and that's why parameters are not available in templates. It should be possible to change this ordering and expose resolved parameters to the template.
    jonatcorus
    @jonatcorus
    Hi, cool project. Is there a larger example of something more complete then the examples in takomo-examples?
    17 replies
    Henri Meltaus
    @hmeltaus
    This message was deleted
    jonatcorus
    @jonatcorus
    Any opinions on pulumi?
    1 reply
    Mika Fonsén
    @mfonsen

    I tried takomo@3.0.0-alpha.5. The first thing I bumped into was the following error:
    2021-01-21 11:25:44 +0200 [debug] - Init resolver 'my-resolver' for stack: '/events/eu-north-1/a.yml', parameter: 'myParameter' with properties:

    resolver: my-resolver
    functionName: my-function
    role: 'arn:aws:iam::00000:role/b-eu-north-1-c-role'
    region: eu-north-1
    immutable: false

    ERROR

    TypeError: Cannot read property 'keys' of undefined
    at Object.schema (/project/aws/resolvers/upload.js:6:19)
    at ResolverRegistry.initResolver (/packages/takomo/3.0.0-alpha.5/node_modules/@takomo/stacks-resolvers/dist/resolver-registry.js:33:41)
    at initializeResolver (/packages/takomo/3.0.0-alpha.5/node_modules/@takomo/stacks-context/dist/config/parameters.js:17:45)
    at Object.buildParameters (/packages/takomo/3.0.0-alpha.5/node_modules/@takomo/stacks-context/dist/config/parameters.js:28:36)
    at async Object.buildStack (/packages/takomo/3.0.0-alpha.5/node_modules/@takomo/stacks-context/dist/config/build-stack.js:39:24)
    at async Promise.all (index 2)
    at async processStackGroupConfigNode (/packages/takomo/3.0.0-alpha.5/node_modules/@takomo/stacks-context/dist/config/process-config-tree.js:93:29)
    at async Promise.all (index 0)
    at async processStackGroupConfigNode (/packages/takomo/3.0.0-alpha.5/node_modules/@takomo/stacks-context/dist/config/process-config-tree.js:96:5)
    at async Promise.all (index 0)

    OTHER INFO

    Your environment:
    OS: darwin
    Node version: v14.15.4
    Takomo version: 3.0.0-alpha.5

    Get support:
    Docs: https://takomo.io
    Bugs: https://github.com/takomo-io/takomo/issues

    Related code:
    module.exports = {
    name: "my-resolver",
    schema: (joi, schema) => {
    return schema.keys({
    functionName: joi.string().required(),
    region: joi.string().required(),
    role: joi.string().required(),
    })
    },
    init: async props => {
    ...

    No issues with takomo@2.12.0

    7 replies