-
Notifications
You must be signed in to change notification settings - Fork 239
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
fix(tests): Re-add directory prune to int build config #514
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rogerthatdev
changed the title
Int patch
fix(tests): Re-add directory prune to int build config
Oct 13, 2023
CICD test are running fast. Nice work. To be sure, can you do any minor edits to one of the existing code? |
See this build job which ran against this commit that changed a sample under the functions subdirectory. |
gericdong
approved these changes
Oct 16, 2023
msampathkumar
approved these changes
Oct 19, 2023
msampathkumar
added a commit
to msampathkumar/terraform-docs-samples
that referenced
this pull request
Dec 7, 2023
…gle-modules#514) * fix: add directory prune to int build config * exclude test/ * also prune from lint test * nevermind lint * Update build/int.cloudbuild.yaml Co-authored-by: Sampath Kumar <[email protected]> * whitespace * don't use _HEAD_BRANCH in diff * a test change * undo test change --------- Co-authored-by: Sampath Kumar <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a 2nd attempt at #508 which was reverted via #512
Reason for reverting the first PR was that the cloud build step used the following to identify what files have changed in the branch corresponding with the PR:
git diff origin/${_BASE_BRANCH}..origin/${_HEAD_BRANCH} --name-only > _changed_files
This did not take into account changes coming from forks. A change from from a fork resulted in an error like this one when identifying changed files:
fatal: ambiguous argument 'origin/main..origin/update-object-table-sample': unknown revision or path not in the working tree.
This is due to the hardcoded
origin
in the second half of the diff. This error would not cause the test to fail it would assume no files were changed and the int test would skip all files (resulting in a false positive test pass).This PR simply uses
git diff origin/${_BASE_BRANCH} --name-only > _changed_files
which in my testing works for changes coming from clones and forks.