Sign generated tests #1503

Closed
joevilches wants to merge 5 commits from export-D51966201 into main
joevilches commented 2023-12-08 17:14:27 -08:00 (Migrated from github.com)

Summary: This diff makes it so that our driver will sign all of the generated files to help ensure that they are not edited by hand. Next I will add CI to actually verify the signature

Differential Revision: D51966201

Summary: This diff makes it so that our driver will sign all of the generated files to help ensure that they are not edited by hand. Next I will add CI to actually verify the signature Differential Revision: D51966201
facebook-github-bot commented 2023-12-08 17:15:11 -08:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D51966201

This pull request was **exported** from Phabricator. Differential Revision: [D51966201](https://www.internalfb.com/diff/D51966201)
facebook-github-bot commented 2023-12-08 17:24:15 -08:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D51966201

This pull request was **exported** from Phabricator. Differential Revision: [D51966201](https://www.internalfb.com/diff/D51966201)
nicoburns commented 2023-12-10 15:51:16 -08:00 (Migrated from github.com)

In Taffy we run the test generation in CI and then use git to check for changes files and fail the check if there are any. IMO this is a better approach than signing the tests, as it also catches the case where someone has edited a fixture and has forgotten to run the test generator at all (in which case the test signature would be valid but would no longer match the fixture)

In Taffy we run the test generation in CI and then use git to check for changes files and fail the check if there are any. IMO this is a better approach than signing the tests, as it also catches the case where someone has edited a fixture and has forgotten to run the test generator at all (in which case the test signature would be valid but would no longer match the fixture)
joevilches commented 2023-12-11 09:06:57 -08:00 (Migrated from github.com)

I am also implementing a check for that, just not published yet. The signing has some extra internal benefits including changing the cursor in VS code so it is obvious the code should not be edited by hand, and internal CI checks from for free if you have a signature

I am also implementing a check for that, just not published yet. The signing has some extra internal benefits including changing the cursor in VS code so it is obvious the code should not be edited by hand, and internal CI checks from for free if you have a signature
facebook-github-bot commented 2023-12-11 10:48:31 -08:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D51966201

This pull request was **exported** from Phabricator. Differential Revision: [D51966201](https://www.internalfb.com/diff/D51966201)
facebook-github-bot commented 2023-12-14 11:53:53 -08:00 (Migrated from github.com)

This pull request has been merged in facebook/yoga@4743040d62.

This pull request has been merged in facebook/yoga@4743040d62d3eda87dbeab478866b6af223a9361.

Pull request closed

Sign in to join this conversation.
No description provided.