Plugins Github Repo - Pull Request shows also old merged commits

Hi,

am more or less a Github user and updated my forked plugins repository to the newest state. Also I cannot do a rebase or something as my gh-pages branch is up to date. But if I compare or create a pull request against the original repository there are still merged commits shown with no files changed.

How can I reset this and drop old commits from the list?

Cheers,
Nils

Using the command on your fork's gh-pages branch, running git reset --hard upstream/gh-pages works for me to remove all the extra commits and make your branch the same as the upstream one. You would then need to do git push --force to push it to GitHub.

It can help to create separate branches off the gh-pages branch when you make PRs, since we are using 'Squash and Merge' for PRs most of the time the individual commits never make it merged just one single one for each PR.

1 Like

Worked...but accidentally reset my changes and closed Pull Request. :slight_smile: But anyhow integrating it into core would be better.

By the way...what are the changes you planned and what I should do if something happens like now that the maintenance branch is broken? Like to know because perhaps there are other topics I can contribute to the core development in the future.

As far as I know the current maintenance branch isn't broken, it runs fine for me.

This is very much news to me too. Please clarify.

Integrate what into core? This is basic git usage and nothing OctoPrint specific.

This was relating to the discussion I had over whether the GitHub credential setting should be a plugin or a core PR yesterday

Aaaah, gotcha, thanks for clarifying, I was seriously confused there.

Hi guys,

I checked out the maintenance branch and get this errors. Also the Web Frontend is not really working and throws errors. Other branches working fine...sorry for asking perhaps stupid questions but I am new in OctoPrint ans also large Github projects...was alone in my projects in the past. :wink:

2022-02-28 21:09:18,863 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):
  File "C:\Users\nrott\Documents\GitHub\OctoPrint\src\octoprint\server\util\flask.py", line 178, in fixed_wrap_cache
    content = func().getvalue()
  File "c:\Users\nrott\Documents\GitHub\OctoPrint\venv3\lib\site-packages\webassets\merge.py", line 250, in func
    data = StringIO(hunk.data())
  File "c:\Users\nrott\Documents\GitHub\OctoPrint\venv3\lib\site-packages\webassets\merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\nrott\\Documents\\GitHub\\OctoPrint\\src\\octoprint\\static\\plugin\\gcodeviewer\\js\\viewer\\renderer.js'
2022-02-28 21:09:18,863 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):
  File "C:\Users\nrott\Documents\GitHub\OctoPrint\src\octoprint\server\util\flask.py", line 178, in fixed_wrap_cache
    content = func().getvalue()
  File "c:\Users\nrott\Documents\GitHub\OctoPrint\venv3\lib\site-packages\webassets\merge.py", line 250, in func
    data = StringIO(hunk.data())
  File "c:\Users\nrott\Documents\GitHub\OctoPrint\venv3\lib\site-packages\webassets\merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\nrott\\Documents\\GitHub\\OctoPrint\\src\\octoprint\\static\\plugin\\logging\\js\\logging.js'
2022-02-28 21:09:18,864 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):
  File "C:\Users\nrott\Documents\GitHub\OctoPrint\src\octoprint\server\util\flask.py", line 178, in fixed_wrap_cache
    content = func().getvalue()
  File "c:\Users\nrott\Documents\GitHub\OctoPrint\venv3\lib\site-packages\webassets\merge.py", line 250, in func
    data = StringIO(hunk.data())
  File "c:\Users\nrott\Documents\GitHub\OctoPrint\venv3\lib\site-packages\webassets\merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\nrott\\Documents\\GitHub\\OctoPrint\\src\\octoprint\\static\\plugin\\pluginmanager\\js\\pluginmanager.js'
2022-02-28 21:09:18,864 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):
  File "C:\Users\nrott\Documents\GitHub\OctoPrint\src\octoprint\server\util\flask.py", line 178, in fixed_wrap_cache
    content = func().getvalue()
  File "c:\Users\nrott\Documents\GitHub\OctoPrint\venv3\lib\site-packages\webassets\merge.py", line 250, in func
    data = StringIO(hunk.data())
  File "c:\Users\nrott\Documents\GitHub\OctoPrint\venv3\lib\site-packages\webassets\merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\nrott\\Documents\\GitHub\\OctoPrint\\src\\octoprint\\static\\plugin\\softwareupdate\\js\\softwareupdate.js'
2022-02-28 21:09:18,864 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):
  File "C:\Users\nrott\Documents\GitHub\OctoPrint\src\octoprint\server\util\flask.py", line 178, in fixed_wrap_cache
    content = func().getvalue()
  File "c:\Users\nrott\Documents\GitHub\OctoPrint\venv3\lib\site-packages\webassets\merge.py", line 250, in func
    data = StringIO(hunk.data())
  File "c:\Users\nrott\Documents\GitHub\OctoPrint\venv3\lib\site-packages\webassets\merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\nrott\\Documents\\GitHub\\OctoPrint\\src\\octoprint\\static\\plugin\\tracking\\js\\usage.js'

Hm, can't reproduce this locally. The files it's looking for there also look weird, src/octoprint/static/plugin indeed doesn't exist. Try pulling a clean branch again (git reset --hard origin/maintenance after pulling if need be), then make sure to run pip install -e .[devel,plugins], then start again with octoprint serve --debug and report back.

pip install does it. Is it necessary if a branch is switched to run it again?

Yes, because I might change dependencies around and so on. It's never just "switch branch and go" when you deal with development versions, always run pip install -e. I actually have my launch config set up thus that it does it automatically on every single launch of the server. I thought that was also in the docs on how to set up a development environment, but apparently not, so I'll see that this gets changed.

1 Like

It's on the IDE steps as a pre-run step to run external program (at least for pycharm).

https://docs.octoprint.org/en/master/development/environment.html#pycharm

Using VSCode. This explains why it is missing. Did not compare the setup steps. Will add it…