Hello, Not sure if this is the correct channel but...
# aws
e
Hello, Not sure if this is the correct channel but i could not find relating to `CICD`/`Github Actions`. I am deploying to
AWS
and in one of the workflows i am using the
preview
command.
Copy code
- name: Preview changes to Infra  🚀
  uses: pulumi/actions@v4
  id: pulumi
  with:
    command: preview
    stack-name: ${{ env.PULUMY_XXXX }}
    work-dir: ${{ env.PULUMY_XXXXX }}
    color: always
  env:
    PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_XXXXXX }}
This works fine but the output looks is very verbose and like this:
Matched version: v3.55.0
Install destination is /home/runner/.pulumi
Successfully deleted pre-existing /home/runner/.pulumi/bin
/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/.pulumi -f /home/runner/work/_temp/6726a8cc-1cb3-41ec-b817-25afe86c25a2
pulumi preview on dev
Previewing update (dev):
Creating virtual environment...
Finished creating virtual environment
Updating pip, setuptools, and wheel in virtual environment...
Requirement already satisfied: pip in ./venv/lib/python3.11/site-packages (22.3.1)
Collecting pip
Downloading pip-23.0.1-py3-none-any.whl (2.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 24.5 MB/s eta 0:00:00
Requirement already satisfied: setuptools in ./venv/lib/python3.11/site-packages (65.5.0)
Collecting setuptools
Downloading setuptools-67.4.0-py3-none-any.whl (1.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 80.9 MB/s eta 0:00:00
Collecting wheel
Downloading wheel-0.38.4-py3-none-any.whl (36 kB)
Cutting out allot of output ...........
Configured range: ^3
Successfully built pulumi-aws
Installing collected packages: arpeggio, six, semver, pyyaml, protobuf, dill, attrs, parver, grpcio, pulumi, pulumi-aws
@ previewing update....
Successfully installed arpeggio-2.0.0 attrs-22.2.0 dill-0.3.6 grpcio-1.50.0 parver-0.4 protobuf-4.22.0 pulumi-3.55.0 pulumi-aws-5.30.0 pyyaml-6.0 semver-2.13.0 six-1.16.0
Finished installing dependencies
pulumi:pulumi:Stack: (same)
[urn=urn:pulumi:dev::infra::pulumi:pulumi:Stack::infra-dev]
+ aws:s3/bucket:bucket: (create)
[urn=urn:pulumi:dev::infra::aws:s3/bucket:bucket::my-bucket2]
[provider=urn:pulumi:dev::infra::pulumi:providers:aws::default_5_30_0::ba1943d5-aa7e-478e-be4d-e00ca96278e9]
acl         : "private"
bucket      : "my-bucket2-6e404a3"
forceDestroy: false
Resources:
+ 1 to create
2 unchanged
is there a way to reduce all the noise ? would it be possible to just see the changes that will be made without all the python dependency details ? for example just:
pulumi:pulumi:Stack: (same)
[urn=urn:pulumi:dev::infra::pulumi:pulumi:Stack::infra-dev]
+ aws:s3/bucket:bucket: (create)
[urn=urn:pulumi:dev::infra::aws:s3/bucket:bucket::my-bucket2]
[provider=urn:pulumi:dev::infra::pulumi:providers:aws::default_5_30_0::ba1943d5-aa7e-478e-be4d-e00ca96278e9]
acl         : "private"
bucket      : "my-bucket2-6e404a3"
forceDestroy: false
Resources:
+ 1 to create
2 unchanged
thanks for the time and help
l
The changes should be added as a comment to your PR (assuming this is kicked off from a PR?)
The detailed stuff is very useful when something goes wrong, it's probably best to leave it on if you can..
If it's not working, you could try explicitly setting
comment-on-pr: true
in the
with
section.
e
thanks for the suggestion. This is a
push
to a feature branch. The idea of the
github action
flow been a developer will do a
push
then they
review
the changes that will be made and then they can decide if they want to go ahead with it. Your right, the output is very useful when debugging but i was hopping there would be a debug flag or something like that. At the moment output is pages long of information that feels like noise when you want to just see the changes that will be made. Using the
preview
command on the
terminal
is great and was hopping for something similar when it come to this. Also thanks for the
comment-on-pr: true
I will use that with
pull
request 👍
Just a small update on this. Using
comment-on-pr: true
puts all the information in a PR comment. This includes all the debugging info. I am either doing something wrong or this is not very useful
l
It didn't, last time I checked. Something must have changed... The GitHub action doesn't do anything magical. You can replace it with a regular script and get more control, which might sit you better.
e
yip thats what i ended up doing. When with setup-pulumi and got it to working with a script this is what
comment-on-pr: true
looks like in github. Its also been raised as an enhancement in the pulumi/actions repo