dag-andersen / argocd-diff-preview

Tool for rendering manifest changes on pull requests.
Apache License 2.0
156 stars 10 forks source link

fix: install argocd before apply secret #53

Closed ponkio-o closed 3 weeks ago

ponkio-o commented 3 weeks ago

Hi @dag-andersen Thank you for developing a great tool!

I fixed a bug to failed to apply secrets to local cluster. This error occur when exists secret that retrieve Git repository.

[2024-10-26T08:57:36Z INFO  argocd_diff_preview::kind] 🚀 Creating cluster...
[2024-10-26T08:58:13Z INFO  argocd_diff_preview::kind] 🚀 Cluster created successfully
[2024-10-26T08:58:13Z ERROR argocd_diff_preview] ❌ Failed to apply secrets
thread 'main' panicked at src/main.rs:357:13:

When applying secrets, argocd namespace must be created first. However, the following commit changed the order of these. https://github.com/dag-andersen/argocd-diff-preview/commit/b7c9b4205f143ce41e00a57c8779f95190d2ffea#diff-42cb6807ad74b3e201c5a7ca98b911c5fa08380e942be6e4ac5807f8377f87fc