Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
I'm writing a small tool to visualize plans from Atlantis (if there are dozens of them, it's inconvenient to view in PR comments). It needs to have access to list of locks and jobs to correctly show plan statuses (e.g. whether stack is locked by some other PR, or errored) and include output log links. Currently, I'm using raw access to Atlantis bbolt DB for locks and parsing HTML of / for jobs. This is inconvenient and unstable.
Describe the solution you'd like
Add two endpoints:
GET /api/locksGET /api/jobs
They will return JSON-encoded data from locking.Locker.List() and jobs.ProjectCommandOutputHandler.GetPullToJobMapping()
The solution looks pretty easy, and I'd be happy to contribute a PR.
Describe the drawbacks of your solution
This way some previously inner APIs are exposed, and someone might base their expectations about these APIs and data formats that they return. This might complicate future refactorings.
Describe alternatives you've considered
As I mentioned earlier, parsing HTML or using raw DB access, but that is not good in the long run. Alternatively, job log URLs could be retrieved from VCS, but it's not universal.
Community Note
Describe the user story
I'm writing a small tool to visualize plans from Atlantis (if there are dozens of them, it's inconvenient to view in PR comments). It needs to have access to list of locks and jobs to correctly show plan statuses (e.g. whether stack is locked by some other PR, or errored) and include output log links. Currently, I'm using raw access to Atlantis bbolt DB for locks and parsing HTML of
/
for jobs. This is inconvenient and unstable.Describe the solution you'd like
Add two endpoints:
GET /api/locks
GET /api/jobs
They will return JSON-encoded data from
locking.Locker.List()
andjobs.ProjectCommandOutputHandler.GetPullToJobMapping()
The solution looks pretty easy, and I'd be happy to contribute a PR.
Describe the drawbacks of your solution
This way some previously inner APIs are exposed, and someone might base their expectations about these APIs and data formats that they return. This might complicate future refactorings.
Describe alternatives you've considered
As I mentioned earlier, parsing HTML or using raw DB access, but that is not good in the long run. Alternatively, job log URLs could be retrieved from VCS, but it's not universal.