-
Notifications
You must be signed in to change notification settings - Fork 40
fix(integ-runner): inconsistent and unexpected CWD in test app execution #720
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
Draft
mrgrain
wants to merge
1
commit into
main
Choose a base branch
from
kornherm/fix/integ-runner/git-directory-handling
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #720 +/- ##
==========================================
- Coverage 79.52% 79.47% -0.05%
==========================================
Files 50 51 +1
Lines 7291 7294 +3
Branches 826 824 -2
==========================================
- Hits 5798 5797 -1
- Misses 1474 1478 +4
Partials 19 19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
auto-merge was automatically disabled
July 16, 2025 12:27
Pull request was converted to draft
…ions Fixes issues with git operations by using the -C flag to specify the correct git repository directory. This ensures integ-runner works correctly when executed from outside the repository under test. Also standardizes the directory used for running CDK apps to always be the current working directory.
10a4550
to
d83463b
Compare
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.
Fixes an issue with the CWD being inconsistent and unexpected during execution of the test app. Previously we had two different behaviors: For regular execution we would execute the app from the directory of the test file, but for watch we would run it in the actual user's CWD. This is inconsistent behavior making it difficult to write integ test cases than can be executed across all modes. Additionally as reported in #638, languages likes python may rely on CWD to import modules. The CWD changing compared to library code and modes, makes it very difficult to use integ-runner in these languages.
The change aligns the CWD for test app execution to be the current CWD. Given the two existing choices, this is the less arbitrary one and aligns more with running a test app directly (
node integ.app-under-test.test.js
) would work.Related to the above change, git operations are now using the -C flag to specify the correct git repository directory instead of the CWD. This ensures integ-runner works correctly even when executed from outside the repository under test. Previously this worked because we change the working directory to the directory containing the test file. However in the error case this printed an incorrect reproduction command that assumed the repro would be run that directory.
Fixes #638
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license