`mage notice` command hangs infinitely
ChrsMark opened this issue · comments
From latest main
the mage notice
command hangs forever like below:
➜ elastic-agent git:(hints_based_autodiscovery_mappings) ✗ mage notice
>> Generating NOTICE
>> fmt - go mod tidy
>> fmt - go mod download
>> fmt - go list
>> fmt - go run
This blocks us from updating any dependencies cause we cannot update the NOTICE.txt
file accordingly and the CI will fail in any case (ie at #698).
I did some investigating and found two issues:
- There is a race condition when calling
go-licence-detector
- There is an issue with the arguments to
go-licence-detector
, or it's not behaving as expected.
I'll create a PR fixing at least the first issue.
I know very little about go-licence-detector
, so I can't help much to fix the issue with it. Maybe @cmacknz knows more or could help to find someone to look at it.
This problem feels familiar and I suspect it might have been fixed in the magefile of another project, let me try to track that down.
We also implement this different in elastic-agent-libs which is what most of the new repositories use: https://github.com/elastic/elastic-agent-libs/blob/ee6ce69b6f17a29307878527768f687d4d77faef/magefile.go#L83
Thanks @cmacknz! I had looked at the magefile.go
from Beats/Filebeat and it looks to be the same as the Elastic-Agent is doing in terms of parameters to go-licence-detector
:/
Anyway, I'll give it another shot.