Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Crypto binaries reporting tool #118

Draft
wants to merge 14 commits into
base: release/202311
Choose a base branch
from

Conversation

DorLevi95
Copy link

@DorLevi95 DorLevi95 commented Dec 23, 2024

Creating a reporting script to run in post build. This script will generate a report about the crypto binaries containing useful info like built binaries and their sizes, linked opensslLib*.inf and OpensslLib*.inf compilation flags.
The report will be placed in the build folder with the name "Report_"
The goal is to catch risky changes that can break functionality or influence the memory consumption (e.g. increase or decrease in flash size).
Moreover, this PR adds a comparison script to compare between 2 reports (the source and target branches of the PR) and warn against such risky changes.

This PR is marked for draft to test the report generation and comparison against a test report.
The goal is to generate a report in each release build and in each PR compare the source and target (release branch) branches reports.

@github-actions github-actions bot added the language:python Pull requests that update Python code label Dec 23, 2024
if binary not in source_sizes[arch]:
log_warning(f"A binary has been removed! - {binary} is not found in source report for architecture {arch}") # log warning - Missing Binary!

def comapre_linked_openssllib(source_linked_openssllib, target_linked_openssllib):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def comapre_linked_openssllib(source_linked_openssllib, target_linked_openssllib):
def compare_linked_openssllib(source_linked_openssllib, target_linked_openssllib):

TOOL_CHAIN_TAG=${{ parameters.toolchain }}

# Compare crypto report
Copy link
Contributor

@kenlautner kenlautner Jan 3, 2025

Choose a reason for hiding this comment

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

This is an okay place to put the report generating code. One thing to consider is how we're going to update the report we're using as a baseline. I think it would make sense as a pipeline or pipeline step to use the completed PRs report as the new baseline. Just something to think about.

Copy link
Author

Choose a reason for hiding this comment

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

My thought was to produce a report in each release build as part of the pipeline artifacts.
Then in the PR, if the target branch is "Release/*" to pull the latest report generated for that release branch and that will be the baseline. I will appreciate other opinions and suggestions.
Further research is needed on how to public and grab such the report artifact properly

Copy link
Contributor

Choose a reason for hiding this comment

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

That would work. The plan is to move to a main branch in the future but pulling the latest generated report for main would be fine.

@@ -0,0 +1,63 @@
#### RANDOM REPORT - NO REAL DATA! ####
Copy link
Contributor

@kenlautner kenlautner Jan 3, 2025

Choose a reason for hiding this comment

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

I would like the actual openssl submodule commit to be linked in the report as well. Any changes there needs to be monitored.

Copy link
Author

Choose a reason for hiding this comment

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

Good idea. I'll add submodules info as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language:python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants