Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[Bug] Pot file generation runs on every git push and updates timestamp without other changes #320

Closed
1 task
sarayourfriend opened this issue Oct 14, 2021 · 2 comments · Fixed by #323
Closed
1 task
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work
Projects

Comments

@sarayourfriend
Copy link
Contributor

Description

Any git push will run the pot file generation script which will always update the timestamp even if there are no other changes, causing a dirty git status after pushing.

Reproduction

  1. Make a change on a branch with the latest main branch
  2. Commit everything and git push successfully
  3. Run git status and note the updated timestamp on the generated pot file

Expectation

Status should be clean, there should be no changes unless they block a git push

Additional context

I think this was caused by the changes that fixed pot file generation in #318

Resolution

  • 🙋 I would be interested in resolving this bug.
@sarayourfriend sarayourfriend added 🟧 priority: high Stalls work on the project or its dependents 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work 🛠 goal: fix Bug fix 🤖 aspect: dx Concerns developers' experience with the codebase labels Oct 14, 2021
@sarayourfriend sarayourfriend added this to Backlog in Openverse via automation Oct 14, 2021
@sarayourfriend
Copy link
Contributor Author

cc @obulat who probably knows best how to fix this 🙂

@obulat
Copy link
Contributor

obulat commented Oct 15, 2021

I had some fun debugging this issue, @sarayourfriend :) We had the pot file generation helper functions, and the script creating the pot file in the top level in the same file. So, when husky was running npm run test during the pre-push checks, it was importing functions from the json-to-pot.js, and, as a side effect, running the createPotFile from it on every push.

@dhruvkb dhruvkb moved this from Backlog to In progress in Openverse Oct 15, 2021
Openverse automation moved this from In progress to Done! Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work
Projects
No open projects
Openverse
  
Done!
Development

Successfully merging a pull request may close this issue.

2 participants