-
Notifications
You must be signed in to change notification settings - Fork 1.7k
infra(all): Introduce generic script for integration tests #15415
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
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this. It does add a lot more code than the current decryption approach, but it's easier to fine tune in Swift than bash (IMO) and this will hopefully scale better with additional subcommands (build, etc.).
Per b/450976183,
This adds a generic command for SDK teams to decrypt their secret files for integration tests. Note that I also (locally) have subcommands for
encrypt
andrun
, but have not included those in this PR to keep the diff small.More broadly, this PR introduces a new swift package called
repo
which is intended to be a point of migration for our larger bash scripts that are harder to maintain in bash form. Currently, it only includes thetests
target for integration tests, but it's intended to be expanded upon as we deem necessary. The main point of this PR is to discuss whether we find this valuable or not. I felt it would be easier to integrate the generic commands for testing if I could take advantage ofArgumentParser
, which led me to the idea of centralizing our larger bash scripts here. @ncooke3 greenlit the idea, but also felt it would be worth having further discussion in the PR.As far as the specifics on
decrypt
, I have expanded it from #15398 to be more generic. You can now call it inline with generic parameters specifying the secret files and passphrase, or use a predefined JSON file to specify the secrets, and defer to an environment variable for the passphrase. You can also toggle the overwrite behavior (whether to leave existing decrypted files alone, or overwrite them).Example usage of doing everything inline:
./scripts/repo tests decrypt --password "super_secret" \ scripts/gha-encrypted/FirebaseAI/TestApp-GoogleService-Info.plist.gpg:FirebaseAI/Tests/TestApp/Resources/GoogleService-Info.plist \ scripts/gha-encrypted/FirebaseAI/TestApp-GoogleService-Info-Spark.plist.gpg:FirebaseAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist
Example usage of using a JSON file and an environment variable for the passphrase:
#no-changelog