Skip to content

introduce testscript-examples updater, and update the examples #1438

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

Merged
merged 4 commits into from
Aug 31, 2023

Conversation

savil
Copy link
Collaborator

@savil savil commented Aug 31, 2023

Summary

This PR adds testscripts/testrunner/updater/main.go that walks the examples/
directory and updates projects that have a run_test script defined.

In the future, perhaps we want this to run on other (non run_test) projects as
well, but that is left as an exercise for future contributors.

Also includes a fix for devbox update for insecure packages.

How was it tested?

export DEVBOX_FEATURE_REMOVE_NIXPKGS=1

devbox run update-examples

Note: this adds info to devbox.lock for the Remove Nixpkgs feature that
is not turned on. However, things should continue to work.

Copy link
Collaborator Author

savil commented Aug 31, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@savil savil requested review from ipince and LucilleH August 31, 2023 13:21
@savil
Copy link
Collaborator Author

savil commented Aug 31, 2023

error is because devbox update doesn't work properly for "insecure packages" i.e. it loses the "allow_insecure": true, from the devbox.lock.

// If it is a directory, then we don't continue.
if dirEntry.IsDir() {
// Skip if it is a directory that we don't want to process at all.
skippedDirs := []string{".devbox", "node_modules"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we read .gitignore? I remember a similar function in launchpad for walking with .gitignore

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, that would be a good idea if we run into issues. For now, this works fairly fine, so will avoid over-engineering :)

@savil savil merged commit 09f326a into main Aug 31, 2023
@savil savil deleted the savil/update-examples branch August 31, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants