Open pcartas opened 2 years ago
Hi @pcartas thanks for reporting!
We recently released a new version of the CLI that introduced some changes on the init command.
We're currently in the process of updating the GitHub actions to work with the new init command.
Admittedly, we should've updated the actions simultaneously, sorry for the disruption!
We'll push a new release for the GitHub actions that fixes the problem tomorrow, I'll report back here once it's available 👍
@pcartas the new actions are out and you should be ready to roll!
Please make sure to update to v1.3.0 of our actions and check out the docs. There have been a few small changes. You now need to pass in an org ID and a project ID. There are a few ways to set this up, they are outlined here in point no. 3.
In your case, if you want to keep passing parameters directly inside the action, the new snipped would look something like this (don't forget to set PLURALITH_ORG_ID
in your action secret settings):
- name: Pluralith Init
uses: Pluralith/actions/init@v1.3.0
with:
terraform-path: ${{env.TF_ACTION_WORKING_DIR}}
api-key: ${{ secrets.PLURALITH_API_KEY }}
org-id: ${{ secrets.PLURALITH_ORG_ID }}
project-id: ${{ secrets.PLURALITH_PROJECT_ID }}
It worked great while testing on my end, but let me know if you run into any issues!
How long does this part usually take? i made a big refactor, there are many changes
It actually shouldn't take that long! So I'm assuming something is off
Before the refactor did it usually run in reasonable time?
is the first time im using Pluralith so i dont know :(
Gotcha!
Then I'm assuming its an issue on our end. Is the project a large/complex one?
i guess is a mid size project, it has 4 vpc/clusters/load_balancers and 3 microservices for now, we are migrating to terraform and im doing the initial devops of the project, im also new at terraform, i can show you the github action/job if you need
Hm ok thanks for the info! I'm thinking this might be an issue with our graphing algorithm getting caught in some loop.
Do you have the chance to run pluralith locally and see if you get a diagram there?
You can simply download our desktop app here, should be super quick to get installed, simply hit the download button here: https://docs.pluralith.com/docs/get-started/run-locally
After that you could run pluralith plan
in your terraform project. If it takes a very long time there as well, then its a graphing issue for sure!
Apologies for the inconvenience btw, we really appreciate the help in debugging! :+1:
thanx for the support! and for the patience the file downloaded is extensionless, how do i install it? im using ubuntu 20.04 and chrome 107.0.5304.87
Ah yes, our Linux setup is still a bit weird, we have to change that!
It is actually a command line executable. So if you open a terminal, run chmod +x
on the file and then just run it as if it was a bash script (simply ./pluralith_linux_installer_amd64_0.1.1
) then it should install and the desktop app should open automatically.
If it doesn't open automatically (we've had some issues with that before) simply open the AppImage manually at ~/Pluralith/bin/Pluralith.AppImage
i guess a confirmation button must appear in the UI
Ok I'm assuming it stays stuck on the "Generating Diagram" screen right?
yes
Ok then it is definitely a graphing problem, meaning the action itself should be fine!
Now to debug our graphing algorithm we built a dedicated command into our CLI that completely anonymises your plan state and strips out all secrets. Would you be up for running pluralith strip
in the same terraform project you just ran pluralith plan
in and sharing the stripped and hashed plan state? The file we'd be interested in is in your terraform project in .pluralith/pluralith.state.hashed
. Feel free to look over it before to make sure it's all hashed and anonymised!
If you'd send the file to my man @PhiWeber he's the one working on the graphing algorithm and this would be super helpful for him to debug. His email is: phi@pluralith.com
Sended!
Awesome thanks a lot! We'll report back here when we found something!
Haven't seen that happen on macOS or Windows lately, I think it must be a Linux-specific bug. I'll dig into it!
We really appreciate the help! 👍
Btw, which Linux distro are you running?
if it helps, i tried colsing the UI and running pluralith plan, this error appears when it tries to open the UI after that it never release the lock and i have force-unlock im using ubuntu Ubuntu 20.04.5 LTS (ubuntu focal)
i guess github actions now are using ubuntu 22.04
Yeah I think because you never actually get to the step where the UI draws the diagram, it never sends the signal to the CLI to confirm or cancel the apply (depending on what you would choose in the UI, the prompt to do this only become available after the graph shows up), so the CLI never tells Terraform to terminate. With remote state that means Terraform doesn't get to let go of the lock.
We need to build a fail-safe into the CLI so terraform can terminate properly to avoid the locking issue!
That's actually great input, gotta fix that up, thanks a lot!
thnx to you! this tool seems very useful, here we are just starting with IaC and a visual tool is a big step to "evangelize" the rest of the team, when they see their own changes graphed they will freak out
Yes that's exactly the idea behind the product, let people see what they are working with and at the same time always have updated documentation so you never need to draw and maintain it manually 👍
Glad you like where the tool is going! We're still early, so lots of work to do to improve things, but bug reports and feedback like yours help a lot! 🚀
@pcartas we've made some good progress debugging the project so far. I have a question regarding the plan: is this a pre-apply plan? By that I mean you haven't run terraform apply
yet and the infrastructure hasn't been deployed.
It would be very helpful if you could create a post-apply plan (first run terraform apply
and then run pluralith plan
) and send me the hashed plan (run pluralith strip
again). Thank you!
@PhiWeber Hi! i've made a lot of changes too. Indeed its a pre-apply plan, i've send you the pre-apply plan because the action is a PR action (so the changes are not aproved yet, so there arent applied). I can send you the actual post-apply plan (which is a bit diferent of the previous one)
@pcartas would be awesome if you could send the pluralith strip
-ed post-apply plan to Phi again (phi@pluralith.com) 👍
Edit: Phi just told me you already sent it haha, nevermind and thanks!
Hi! im using Pluralith with the CI/CD integration for Github Actions, with my personal account. I dont know if it its a billed feature When the job runs this it never finish
and when i stop the job seems like it was expecting for "Org Id" input