Skip to content

Conversation

manastasova
Copy link
Contributor

@manastasova manastasova commented Aug 27, 2025

Add support for checking out specific commits in s2n-bignum import.sh

Example usage:
GITHUB_REPOSITORY=awslabs/s2n-bignum COMMIT_HASH=717b57a ./import.sh

Issues:

Addresses: Allow to choose s2n-bignum specific commit

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@manastasova manastasova requested a review from a team as a code owner August 27, 2025 23:13
@codecov-commenter
Copy link

codecov-commenter commented Aug 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.83%. Comparing base (154edc9) to head (4f9ee1e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2646      +/-   ##
==========================================
+ Coverage   78.81%   78.83%   +0.01%     
==========================================
  Files         667      667              
  Lines      114088   114088              
  Branches    16063    16063              
==========================================
+ Hits        89923    89940      +17     
+ Misses      23390    23373      -17     
  Partials      775      775              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

echo "Fetching repository ..."
git clone ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${TMP} --branch ${GITHUB_TARGET} --single-branch > /dev/null
GITHUB_COMMIT=$(cd ${TMP} >/dev/null; git rev-parse HEAD)
GITHUB_COMMIT=$(cd ${TMP} > /dev/null; git checkout ${COMMIT_HASH} > /dev/null; git rev-parse HEAD)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Follow the mlkem-native importer and only import the exact commit you care about. At the same time, remove distinction between GITHUB_TARGET and COMMIT_HASH:

git init >/dev/null
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY >/dev/null
git fetch origin --depth 1 $GITHUB_SHA >/dev/null
git checkout FETCH_HEAD >/dev/null

@hanno-becker
Copy link
Contributor

@manastasova What's the status of this PR? Are you going to keep working on it, or should it be closed?

Example usage:
GITHUB_REPOSITORY=awslabs/s2n-bignum GITHUB_TARGET=main COMMIT_HASH=717b57a ./import.sh
@manastasova manastasova force-pushed the s2n-bignum_import_script branch from 1b3f308 to 6ca18fc Compare October 2, 2025 18:29
Short commit hashes are no longer supported to avoid fetch complexity
@manastasova
Copy link
Contributor Author

Thanks, @hanno-becker. I just updated the import file.

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.

4 participants