Skip to content

fix: test on minimal and stable golang versions#183

Merged
mariocandela merged 6 commits intobeelzebub-labs:mainfrom
yaleman:update-golang
Mar 19, 2025
Merged

fix: test on minimal and stable golang versions#183
mariocandela merged 6 commits intobeelzebub-labs:mainfrom
yaleman:update-golang

Conversation

@yaleman
Copy link
Copy Markdown
Contributor

@yaleman yaleman commented Mar 16, 2025

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

@yaleman
Copy link
Copy Markdown
Contributor Author

yaleman commented Mar 17, 2025

Recent golang exposes more coverage info, and that's why test coverage was failing until I bumped it down to 55% due to golang/go#59590

@mariocandela
Copy link
Copy Markdown
Contributor

Recent golang exposes more coverage info, and that's why test coverage was failing until I bumped it down to 55% due to golang/go#59590

Very strange, perhaps the exclusion of the package “strategies” from the unit tests isn’t working. These are tested by the integration tests.

Have you tried testing it locally by replicating the continuous integration pipeline?🙂

@yaleman
Copy link
Copy Markdown
Contributor Author

yaleman commented Mar 19, 2025

Yep, and it throws the exact same errors.

@yaleman
Copy link
Copy Markdown
Contributor Author

yaleman commented Mar 19, 2025

Looks to be all the builder stuff that's bringing it down:

# go tool cover -func=coverage.out
github.com/mariocandela/beelzebub/v3/builder/builder.go:31:			setTraceStrategy		0.0%
github.com/mariocandela/beelzebub/v3/builder/builder.go:35:			buildLogger			0.0%
github.com/mariocandela/beelzebub/v3/builder/builder.go:56:			buildRabbitMQ			0.0%
github.com/mariocandela/beelzebub/v3/builder/builder.go:76:			Close				0.0%
github.com/mariocandela/beelzebub/v3/builder/builder.go:88:			Run				0.0%
github.com/mariocandela/beelzebub/v3/builder/builder.go:155:			build				0.0%
github.com/mariocandela/beelzebub/v3/builder/builder.go:163:			NewBuilder			0.0%
github.com/mariocandela/beelzebub/v3/builder/director.go:18:			NewDirector			0.0%
github.com/mariocandela/beelzebub/v3/builder/director.go:24:			BuildBeelzebub			0.0%
github.com/mariocandela/beelzebub/v3/builder/director.go:48:			standardOutStrategy		0.0%
github.com/mariocandela/beelzebub/v3/builder/director.go:55:			beelzebubCloudStrategy		0.0%
github.com/mariocandela/beelzebub/v3/builder/director.go:76:			rabbitMQTraceStrategy		0.0%
github.com/mariocandela/beelzebub/v3/main.go:11:				main				0.0%
github.com/mariocandela/beelzebub/v3/main.go:45:				failOnError			0.0%
github.com/mariocandela/beelzebub/v3/parser/configurations_parser.go:97:	Init				100.0%
github.com/mariocandela/beelzebub/v3/parser/configurations_parser.go:107:	ReadConfigurationsCore		100.0%
github.com/mariocandela/beelzebub/v3/parser/configurations_parser.go:123:	ReadConfigurationsServices	87.5%
github.com/mariocandela/beelzebub/v3/parser/configurations_parser.go:148:	gelAllFilesNameByDirName	100.0%
github.com/mariocandela/beelzebub/v3/parser/configurations_parser.go:163:	readFileBytesByFilePath		100.0%
github.com/mariocandela/beelzebub/v3/plugins/beelzebub-cloud.go:27:		InitBeelzebubCloud		100.0%
github.com/mariocandela/beelzebub/v3/plugins/beelzebub-cloud.go:35:		SendEvent			90.0%
github.com/mariocandela/beelzebub/v3/plugins/beelzebub-cloud.go:61:		GetHoneypotsConfigurations	94.4%
github.com/mariocandela/beelzebub/v3/plugins/llm-integration.go:72:		String				100.0%
github.com/mariocandela/beelzebub/v3/plugins/llm-integration.go:83:		FromStringToLLMProvider		100.0%
github.com/mariocandela/beelzebub/v3/plugins/llm-integration.go:94:		InitLLMHoneypot			100.0%
github.com/mariocandela/beelzebub/v3/plugins/llm-integration.go:101:		buildPrompt			100.0%
github.com/mariocandela/beelzebub/v3/plugins/llm-integration.go:154:		openAICaller			87.5%
github.com/mariocandela/beelzebub/v3/plugins/llm-integration.go:193:		ollamaCaller			83.3%
github.com/mariocandela/beelzebub/v3/plugins/llm-integration.go:224:		ExecuteModel			100.0%
github.com/mariocandela/beelzebub/v3/plugins/llm-integration.go:244:		removeQuotes			100.0%
github.com/mariocandela/beelzebub/v3/protocols/protocol_manager.go:20:		InitProtocolManager		100.0%
github.com/mariocandela/beelzebub/v3/protocols/protocol_manager.go:27:		SetProtocolStrategy		100.0%
github.com/mariocandela/beelzebub/v3/protocols/protocol_manager.go:32:		InitService			100.0%
github.com/mariocandela/beelzebub/v3/tracer/tracer.go:54:			String				100.0%
github.com/mariocandela/beelzebub/v3/tracer/tracer.go:65:			String				100.0%
github.com/mariocandela/beelzebub/v3/tracer/tracer.go:87:			GetInstance			100.0%
github.com/mariocandela/beelzebub/v3/tracer/tracer.go:132:			setStrategy			100.0%
github.com/mariocandela/beelzebub/v3/tracer/tracer.go:136:			TraceEvent			100.0%
github.com/mariocandela/beelzebub/v3/tracer/tracer.go:144:			updatePrometheusCounters	100.0%
total:										(statements)			55.1%

@beelzebub-labs beelzebub-labs deleted a comment from codecov bot Mar 19, 2025
yaleman and others added 5 commits March 19, 2025 15:56
Excluded from unite test code coverage builder and director,  because covered by integration tests.

Signed-off-by: Mario Candela <mario.candela.personal@gmail.com>
codecov exclude temporary code coverage

Signed-off-by: Mario Candela <mario.candela.personal@gmail.com>
@yaleman
Copy link
Copy Markdown
Contributor Author

yaleman commented Mar 19, 2025

Looks like it brought that up to ~85%

Signed-off-by: James Hodgkinson <james@terminaloutcomes.com>
@mariocandela
Copy link
Copy Markdown
Contributor

Looks like it brought that up to ~85%

Awesome! I will merge that after the rate limit by codecov:
[2025-03-19T06:02:51.600Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 429 - {"message":"Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 2483s."}

Thanks for your time mate 🥇

Copy link
Copy Markdown
Contributor

@mariocandela mariocandela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mariocandela mariocandela merged commit 16b0127 into beelzebub-labs:main Mar 19, 2025
9 of 10 checks passed
@yaleman yaleman deleted the update-golang branch March 19, 2025 10:17
@yaleman
Copy link
Copy Markdown
Contributor Author

yaleman commented Mar 19, 2025

Glad to help 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants