Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition for Docker local tests (cartography-cncf#1384)
## Summary > Describe your changes. ### Before: 1. Pull down a fresh cartography from github ![Screenshot 2024-11-14 at 2 16 51 PM](https://github.com/user-attachments/assets/ad7a5706-c670-45a2-894d-44329eed28a4) 2. Build the container with `docker build -t cartography-cncf/cartography-dev -f dev.Dockerfile ./` (I forgot to screenshot this step) 3. Running the docker-compose linter works on the first try because the initialization step takes a while: ![Screenshot 2024-11-14 at 2 17 23 PM](https://github.com/user-attachments/assets/148c5efa-799a-425d-b52c-0fca33f28d5a) 4. [Failure] But subsequent linter runs fail with "is this a git repository?" ![Screenshot 2024-11-14 at 2 17 33 PM](https://github.com/user-attachments/assets/2447c0aa-26ac-447a-85bb-ade408db9d21) ### After: 1. Pull down fresh cartography from github and checkout this fix branch (fixdcwait) ![image](https://github.com/user-attachments/assets/1fbafca6-6b6e-4e9f-a43c-7df2efbfbc03) 2. Build container ![image](https://github.com/user-attachments/assets/60b93567-85bc-4b24-97c9-879adab49ee2) 3. Run linter on the first try ![image](https://github.com/user-attachments/assets/7d8d9a52-9f3c-4501-82a0-60abfb3f29d7) 4. [SUCCESS] Subsequent linter runs work because we've added a waiting mechanism ![Screenshot 2024-11-14 at 2 25 59 PM](https://github.com/user-attachments/assets/a8dfe235-95e4-4a40-83ec-c9c758928e8b) ### Related issues or links > Include links to relevant issues or other pages. - https://github.com/lyft/cartography/issues/... ### Checklist Provide proof that this works (this makes reviews move faster). Please perform one or more of the following: - [ ] Update/add unit or integration tests. - [x] Include a screenshot showing what the graph looked like before and after your changes. - [x] Include console log trace showing what happened before and after your changes. --------- Signed-off-by: Alex Chantavy <[email protected]> Signed-off-by: chandanchowdhury <[email protected]>
- Loading branch information