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

Remove smoke-related scripts #144

Conversation

jeffwidman
Copy link
Member

@jeffwidman jeffwidman commented Jul 11, 2023

These now live in the smoke tests repo:
https://github.com/dependabot/smoke-tests/tree/cd5c5b5d8fb9abbd0f6db98c347dd9f7d065c6d4/script

There's no reason for them to continue to have a copy here in the cli
repo. They've only been touched once, on initial commit.

  1. The run-all.sh script is now outdated, as it doesn't list the most
    recent tests we've added. And it's not even called anywhere in this
    repo, so only useful for local development, where we'd just pull down
    the latest from the smoke test repo anyway.
  2. The download-cache.sh file is super simple, and in the other
    consumers of the smoke tests we've simply inlined it, for example: https://github.com/dependabot/dependabot-core/blob/6e39f38df76e941bc84541a806d6c82ff4f2cbf2/.github/workflows/smoke.yml#L244-L250
    So inline it here as well.

@jeffwidman jeffwidman requested a review from a team as a code owner July 11, 2023 15:29
@jeffwidman jeffwidman force-pushed the delete-smoke-related-scripts-that-now-live-in-smoke-tests-repo branch from 6a4a25f to 50e74b4 Compare July 11, 2023 15:30
@jeffwidman jeffwidman marked this pull request as draft July 11, 2023 15:32
@jeffwidman jeffwidman force-pushed the delete-smoke-related-scripts-that-now-live-in-smoke-tests-repo branch 2 times, most recently from e4f8dab to 97440d6 Compare July 11, 2023 16:17
@@ -42,9 +42,6 @@ jobs:
exit 1
fi

- name: Run shellcheck
run: shellcheck **/*.sh
Copy link
Member Author

Choose a reason for hiding this comment

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

As a result of this PR, we no longer have any shell scripts, so this started complaining... I looked into making the running of it conditional upon finding a file, but the resulting bash had to switch to find in order to avoid nullglob, and pretty soon it looked more complex than it needed to be given we're simply trying to run shellcheck on a file.

Better IMO to just delete for now and then re-add once we actually have a shell script. Alternatively, I'm fine with commenting out. I realize it might get missed when someone re-adds a shell script, but I still think prefer the clarity of avoiding convoluted bash whose only purpose is to protect against non-existent shell scripts.

@jeffwidman jeffwidman marked this pull request as ready for review July 11, 2023 16:23
declare -a arr=("actions" "bundler" "cargo" "composer" "docker" "elm" "go" "gradle" "hex" "maven" "npm" "nuget" "pip" "pip-compile" "pipenv" "poetry" "pub" "submodules" "terraform")
for eco in "${arr[@]}"
do
go run cmd/dependabot/dependabot.go test -f "testdata/smoke-$eco.yaml" -o "testdata/smoke-$eco.yaml"
Copy link
Member Author

Choose a reason for hiding this comment

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

These testdata/smoke-* files don't exist in this repo anymore, they now live here: https://github.com/dependabot/smoke-tests/tree/cd5c5b5d8fb9abbd0f6db98c347dd9f7d065c6d4/tests

Copy link
Contributor

@pavera pavera left a comment

Choose a reason for hiding this comment

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

LGTM

These now live in the smoke tests repo:
https://github.com/dependabot/smoke-tests/tree/cd5c5b5d8fb9abbd0f6db98c347dd9f7d065c6d4/script

There's no reason for them to continue to have a copy here in the `cli`
repo. They've only been touched once, on initial commit.

1. The `run-all.sh` script is now outdated, as it doesn't list the most
   recent tests we've added. And it's not even called anywhere in this
   repo, so only useful for local development, where we'd just pull down
   the latest from the smoke test repo anyway.
2. The `download-cache.sh` file is super simple, and in the other
   consumers of the smoke tests we've simply inlined it, for example: https://github.com/dependabot/dependabot-core/blob/6e39f38df76e941bc84541a806d6c82ff4f2cbf2/.github/workflows/smoke.yml#L244-L250
   So inline it here as well.
@jeffwidman jeffwidman force-pushed the delete-smoke-related-scripts-that-now-live-in-smoke-tests-repo branch from 97440d6 to b12a7a3 Compare July 11, 2023 18:47
@jeffwidman jeffwidman enabled auto-merge (squash) July 11, 2023 18:47
@jeffwidman jeffwidman merged commit 12f9c3a into main Jul 11, 2023
@jeffwidman jeffwidman deleted the delete-smoke-related-scripts-that-now-live-in-smoke-tests-repo branch July 11, 2023 18:48
@jakecoffman
Copy link
Member

Looks like this PR broke the smoke tests in this repo. I think the cache directory is not right now.

@jeffwidman
Copy link
Member Author

Oof, just saw this. I'll get to work on fixing that. Great to have you back @jakecoffman I missed you!

@jakecoffman
Copy link
Member

@jeffwidman No prob, fixed in #148.

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.

3 participants