Hey! I'm trying to make the GitHub workflow <Compo...
# atmos
m
Hey! I'm trying to make the GitHub workflow Component Updater to work but it's not working for me and I think maybe the docs are a bit outdated is there any examples of this working? Here is my workflow:
Copy code
name: πŸ‘½ Component Updater

on:
  workflow_dispatch:
  schedule:
    - cron: '0 8 * * *'

permissions:
  contents: write
  issues: write
  pull-requests: write

jobs:
  update:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Update Atmos Components
        uses: cloudposse/github-action-atmos-component-updater@v2
        with:
          max-number-of-prs: 5
          github-access-token: ${{ secrets.GITHUB_TOKEN }}
          include: |
            vendor/*
            cloudflare/*
            eks/*
          exclude: |
            aws/*
The components that I use are under the
vendor/
directory this is inside the components path `components/terraform/`and my components file is call
vendor.yaml
it's on root and it's set on the
atmos.yaml
file as follow:
Copy code
vendor:
  base_path: "./vendor.yaml"
it's also set the same way on the `rootfs/usr/local/etc/atmos/atmos.yaml`but when I run this actions it do not found any components. Any idea why this is not working for me?
e
@Igor Rodionov
i
Component updater supports only 'component.yaml'. It is not support 'vendor.yaml' pattern
m
@Igor Rodionov maybe I'm missing something but is it the same file just with a different name?
i
not exactly
component.yaml
contains info about a single component and placed in the components dir
vendor.yaml
is a single file for all components and placed somewhere near the root
m
I see, are there any examples of
component.yaml
? Or are there any plans to add support for
vendor.yaml
? I'm struggling to see the benefits of using
component.yaml
instead of
vendor.yaml
i
no benefit. it’s legacy. we have plans to make components-updater deal with
vendor.yaml
@Erik Osterman (Cloud Posse), where is this task in our backlog from a priority point of view?
m
Oh yeah that will be awesome
g
@Erik Osterman (Cloud Posse) what is the priority for this?
e
We will probably add this in the atmos core, rather than rely on an external action. However, no update on priority right now.
m
Ah that will be awesome
@Erik Osterman (Cloud Posse) I saw that there is a disable diff for the vendor cmd on the code so I was testing this and I manage to make it work but for sources of types git since getting the version for that is pretty simple, this is how it looks:
Copy code
atmos vendor diff
Checking for vendor updates...

βœ… terraform-null-label: 0.25.0 (up to date)
βœ… terraform-aws-tfstate-backend: v1.7.0 (up to date)
βœ… terraform-aws-vpc: v6.2.0 (up to date)
βœ… terraform-aws-security-group: v5.3.0 (up to date)
πŸ“¦ terraform-aws-iam-assumable-role: v5.59.0 β†’ v6.2.1
πŸ“¦ terraform-aws-iam-assumable-roles: v5.59.0 β†’ v6.2.1
πŸ“¦ terraform-aws-iam-group-with-assumable-roles-policy: v5.59.0 β†’ v6.2.1
πŸ“¦ terraform-aws-iam-group-with-policies: v5.59.0 β†’ v6.2.1
πŸ“¦ terraform-aws-iam-github-oidc-role: v5.59.0 β†’ v6.2.1
πŸ“¦ terraform-aws-iam-github-oidc-provider: v5.59.0 β†’ v6.2.1
πŸ“¦ terraform-aws-alb: v2.3.0 β†’ v2.3.1
βœ… terraform-aws-ecs-alb-service-task: v0.78.0 (up to date)
πŸ“¦ terraform-aws-ecs-container-definition: 0.61.1 β†’ v0.61.2
βœ… terraform-aws-ec2-instance: v6.1.1 (up to date)
πŸ“¦ terraform-aws-ecr: v2.3.1 β†’ v3.1.0
βœ… terraform-aws-opensearch: v2.1.1 (up to date)
βœ… terraform-aws-s3-bucket: v5.7.0 (up to date)
πŸ“¦ terraform-aws-cloudfront: v3.4.1 β†’ v5.0.0
βœ… terraform-aws-dynamodb-table: v0.37.0 (up to date)
βœ… terraform-aws-sns-topic: v1.2.0 (up to date)
βœ… terraform-aws-lambda: v8.1.0 (up to date)
βœ… terraform-aws-rds: 1.1.2 (up to date)
πŸ“¦ terraform-aws-rds-aurora: v9.13.0 β†’ v9.15.0
πŸ“¦ terraform-aws-elasticache-redis: v1.7.0 β†’ v1.10.0
πŸ“¦ terraform-aws-waf: v1.12.0 β†’ v1.13.0
βœ… terraform-aws-cloudtrail: 0.24.0 (up to date)
βœ… terraform-aws-kms-key: 0.12.2 (up to date)
βœ… terraform-aws-guardduty: v0.6.0 (up to date)
βœ… terraform-aws-security-hub: 0.12.2 (up to date)
βœ… terraform-aws-config: v1.5.3 (up to date)
βœ… terraform-aws-cloudwatch: v5.7.1 (up to date)
πŸ“¦ terraform-aws-acm: v5.1.1 β†’ v6.1.0
πŸ“¦ terraform-aws-route53-zones: v5.0.0 β†’ v6.0.1
βœ… terraform-aws-route53-records: v6.0.1 (up to date)

Found 15 updates. Use --update flag to update the vendor configuration file.
I also added a
--outdated
flag to show only the outdated components and a
--update
flag that well it will update your vendor.yaml file to the latest version (it will only update the version section so it will not update formating and it will respect if you use quotes or not) but here is my issue did you already had a plan to get the latest version for sources like OICD or S3? https/http should also be straight forward when using something like github but if we are using something else how have you guys handle it? also cheking just the tags can be tricky bc for example you guys have a lates release of
v0.2.0
of a td module but you have a tag
v0
that in theory is the latest but it's not in this case and also if we get the newest that can be a pre-release so adding regex might be an option but we should take into account that some people use prefix
v
and some don't but this might be me just rambling hahaha I just wanted to know if there was already a plan to handle all the sources that go-getter handles for checking the latest version
e
That's pretty cool. Do you want to open up a PR for that? And we can see what we can maybe accelerate that.
m
Yeah I will do the Pr later today
@Erik Osterman (Cloud Posse) here is my PR: https://github.com/cloudposse/atmos/pull/1519 sorry it took a bit more time bc I had some urgen work stuff to attend and I wanted to fix/improved some of the code, like I know re-use the
vendor pull
UI. I think there are still changes to be made and improved but I wanted to at least had the pr up to show the progress
e
My plan, if it's okay with you, is to merge this into
devel
and then polish it off, tweaking the ui, adding tests and docs.
m
yeah that sounds perfect