Comments (12)
@Ari1009 I have opened a new PR to fix this issue, would you like to help verify that changes resolves the issue.
Yes, thank you. This fixes the issue that I faced.
from oppia.
@Shriyam-Avasthi It's strange .git isn't copied in Docker container, could you please rebuild it by following.
make clean
make build
Also, can you tell in which system this occurred. Also just to check, git diff <file>
gives expected output in local environment.
Also could you list files and folders in .git in Docker by running:
make run-devserver
docker compose exec -it dev-server /bin/bash
ls -al .git
(it should be run in bash of Docker container)
from oppia.
1. `make clean` 2. `make build`
Already done that, still the bug persists.
Also, can you tell in which system this occurred.
I am using WSL2.
Also just to check,
git diff <file>
gives expected output in local environment.
git diff core/feconf.py
runs without any output, however git diff --staged
returns the expected output
Also could you list files and folders in .git in Docker by running:
1. `make run-devserver` 2. `docker compose exec -it dev-server /bin/bash` 3. `ls -al .git` (it should be run in bash of Docker container)
from oppia.
@Shriyam-Avasthi I have confirmed bug occurs in WSL, thanks for bringing it. Being busy, I need some time to find proper fix to it. But till then I found temporary solution which you can use, so this issue doesn't stop you from contributing. Please do following:
make run-devserver
docker compose exec -it dev-server /bin/bash
git config --global --add safe.directory /app/oppia
(inside Docker container)
Please, reply if solution works or even if you need any further help.
from oppia.
@jayam04
Thank you for helping out. Following your instructions, I am able to commit changes locally. Now, I am facing another issue, running git push
leads to frontend tests failed error
, whereas if I run the tests using make run_tests.frontend
all tests work. I have worked on a very basic fix (just fixing a button) and I dont feel something like that should cause the frontend tests to fail. Here are the terminal outputs for reference:
- Using
git push
- Using
make run_tests.frontend
Additionally, just to be sure, I went ahead and created another branch and modified only the following piece of code, in essence, just adding a && true
condition, which should not lead to any functionality changes. But this also leads to the same frontend test failed error.
isDiagramCreated(): boolean {
// This function checks if any shape has been created or not.
return Boolean(
!this.isUserDrawing() &&
this.diagramStatus === this.STATUS_EDITING &&
this.canvas &&
this.canvas.getObjects().length > 0
);
}
to
isDiagramCreated(): boolean {
// This function checks if any shape has been created or not.
return Boolean(
!this.isUserDrawing() &&
this.diagramStatus === this.STATUS_EDITING &&
this.canvas &&
this.canvas.getObjects().length > 0 &&
true
);
}
from oppia.
I face the same issue. My OS is Arch Linux with Hyprland. I made a single CSS file change just to test, but when I try to commit it, an error pops up.
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
Running docker compose exec -T dev-server python3 ./.git/hooks/pre-commit-python
time="2024-05-23T17:29:18+05:30" level=warning msg="/run/media/deku09/fad336b5-383a-49f4-805c-1a9a3e3db54e1/lost+found/Contributions/oppia/docker-compose.yml: `version` is obsolete"
[STARTED] Preparing lint-staged...
[FAILED]
[FAILED] *** Please tell me who you are.
[FAILED]
[FAILED] Run
[FAILED]
[FAILED] git config --global user.email "[email protected]"
[FAILED] git config --global user.name "Your Name"
[FAILED]
[FAILED] to set your account's default identity.
[FAILED] Omit --global to set the identity only in this repository.
[FAILED]
[FAILED] fatal: unable to auto-detect email address (got 'unknown@c14d993fa07f.(none)')
[FAILED] Cannot save the current index state
[STARTED] Running tasks for staged files...
[SKIPPED] Running tasks for staged files...
[STARTED] Applying modifications from tasks...
[SKIPPED]
[SKIPPED] ✖ lint-staged failed due to a git error.
[STARTED] Cleaning up temporary files...
[SKIPPED]
[SKIPPED] ✖ lint-staged failed due to a git error.
✖ lint-staged failed due to a git error.
Any lost modifications can be restored from a git stash:
> git stash list
stash@{0}: automatic lint-staged backup
> git stash apply --index stash@{0}
Running pre-commit check for feconf and constants ...
Running pre-commit check for package-lock.json ...
Running prettier ...
Traceback (most recent call last):
File "./.git/hooks/pre-commit-python", line 229, in <module>
main()
File "./.git/hooks/pre-commit-python", line 221, in main
run_prettier()
File "./.git/hooks/pre-commit-python", line 189, in run_prettier
subprocess.run('npx lint-staged', shell=True, check=True)
File "/usr/local/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'npx lint-staged' returned non-zero exit status 1.
Python script exited with code 1
from oppia.
@Ari1009 Above issue is resolved in #19962 but not yet commited. Could you please update git username and email in Docker Container manually.
You can do it by running:
docker compose exec -T dev-server git config user.name $(git config user.name)
docker compose exec -T dev-server git config user.email $(git config user.email)
from oppia.
@Ari1009 You mentioned failing pre-push due to frontend tests, could you please tell if you are still facing it or not?
from oppia.
@Ari1009 Above issue is resolved in #19962 but not yet commited. Could you please update git username and email in Docker Container manually.
You can do it by running:
1. `docker compose exec -T dev-server git config user.name $(git config user.name)` 2. `docker compose exec -T dev-server git config user.email $(git config user.email)`
Thanks, this works
from oppia.
I'm also facing another issue. I made some changes in .assets/constants.ts, but when I try to commit, this error pops up.
Running docker compose exec -T dev-server python3 ./.git/hooks/pre-commit-python
WARN[0000] /run/media/deku09/fad336b5-383a-49f4-805c-1a9a3e3db54e1/lost+found/Contributions/oppia/docker-compose.yml: `version` is obsolete
Not a git repository
To compare two paths outside a working tree:
usage: git diff [--no-index] <path> <path>
Running pre-commit check for feconf and constants ...
Traceback (most recent call last):
File "./.git/hooks/pre-commit-python", line 229, in <module>
main()
File "./.git/hooks/pre-commit-python", line 206, in main
check_changes_in_config()
File "./.git/hooks/pre-commit-python", line 176, in check_changes_in_config
if not check_changes('feconf'):
File "./.git/hooks/pre-commit-python", line 160, in check_changes
diff_output = subprocess.check_output([
File "/usr/local/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'diff', 'core/feconf.py']' returned non-zero exit status 129.
Python script exited with code 1
from oppia.
@Ari1009 have you tried solution here
from oppia.
@Ari1009 I have opened a new PR to fix this issue, would you like to help verify that changes resolves the issue.
from oppia.
Related Issues (20)
- [Flake]: offscreen-images failure for minScore assertion HOT 4
- [Flake]: Expected 'chrome-error://chromewebdata/' to contain 'instagram.com'. HOT 2
- E0401: unable to import google.cloud.logging
- [BUG]: Discrepancy in the way RTL is handled
- [Feature Request]: Allow default-on feature flags HOT 1
- [BUG]: Unable to Link Skills to Questions in Skill's Question Editor
- [Flake]: waiting for selector `.e2e-test-skill-edit-box` failed: timeout 30000ms exceeded
- [Feature Request]: Deprecate legacy Google Analytics
- [BUG]: Schema validation for 'story_url_fragment' failed: Validation failed
- [Flake]: Lighthouse test fails for classroom page /learn/math HOT 1
- [BUG]: Not able to add image , link or video in body of blogpost. HOT 1
- [BUG]: Error in console is shown on most pages of the oppia website HOT 3
- [BUG]: Undo Translation Review Error
- [BUG]: Incorrect Logo HOT 1
- [Feature Request]: Disable action buttons of CD translation modal when validation errors exist
- [Flake]: Feature flag not found issue in CI when trying to enable a feature HOT 2
- [Flake]: "Error: Element JSHandle@node took too long to be clickable" in Misc tab of release coordinator.
- [Flake]: waiting for selector `span.oppia-unique-progress-id` failed: timeout 30000ms exceeded
- [Flake]: Expected totalKeysStored to be less than 10, but it was 52
- [BUG]: Blog post title not visible in the blog post editor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oppia.