Skip to content
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

Revert to using stash apply instead of merge #360

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

fcollonval
Copy link
Member

In #358, the logic to create the changelog PR was updated to use git merge instead git stash (presumably to be more robust in case of changes are pulled from the upstream branch).

In JupyterLab, this results in the bump by lerna of node packages to be committed with the Changelog changes as a commit is done automatically by lerna in the bump version step. The reason is that the merge command on the stash branch is bringing in more than the change stashed.

Failing PR example: jupyterlab/jupyterlab#12932

@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2022

Codecov Report

Merging #360 (f584ed5) into main (03e5899) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #360   +/-   ##
=======================================
  Coverage   78.60%   78.60%           
=======================================
  Files          21       21           
  Lines        2734     2734           
  Branches      352      352           
=======================================
  Hits         2149     2149           
  Misses        467      467           
  Partials      118      118           
Impacted Files Coverage Δ
jupyter_releaser/lib.py 80.69% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@fcollonval
Copy link
Member Author

Other issue related to the use of git merge:

Just tried with a simple extension and while the changelog PR is correctly generated: jupyterlab-contrib/jupyterlab-cell-flash#32

The check release workflow fails with the following: https://github.com/jupyterlab-contrib/jupyterlab-cell-flash/runs/7766995009?check_suite_focus=true

COMMAND: git checkout -b changelog-f910df6e18aa11ed9f1611ea265f32fd origin/main
Switched to a new branch 'changelog-f910df6e18aa11ed9f1611ea265f32fd'
branch 'changelog-f910df6e18aa11ed9f1611ea265f32fd' set up to track 'origin/main'.
COMMAND: git merge --squash --strategy-option=theirs stash
merge: stash - not something we can merge

So yeah probably #360 will help with this.

Originally posted by @jtpio in jupyterlab/jupyterlab#12932 (comment)

@jtpio
Copy link
Member

jtpio commented Aug 10, 2022

This should also help fix other failures happening in the check_release workflow as mentioned in jupyterlab/jupyterlab#12932 (comment).

@fcollonval
Copy link
Member Author

This patch does fix the changelog generation for JupyterLab: jupyterlab/jupyterlab#12933

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the git stash was failing when making an automated changelog PR to releaser itself, but we'll have to accept that limitation considering the effect it is having on JupyterLab.

@blink1073 blink1073 merged commit 87b32ed into jupyter-server:main Aug 10, 2022
@jtpio
Copy link
Member

jtpio commented Aug 11, 2022

Just tried with a simple extension and while the changelog PR is correctly generated: jupyterlab-contrib/jupyterlab-cell-flash#32

Re-running the failed workflow, the git stash apply now gives the following: https://github.com/jupyterlab-contrib/jupyterlab-cell-flash/runs/7781697685?check_suite_focus=true

COMMAND: git stash apply
Auto-merging CHANGELOG.md
CONFLICT (content): Merge conflict in CHANGELOG.md
On branch changelog-f286a812194111eda8add14d98809210
Your branch is up to date with 'origin/main'.

Unmerged paths:
  (use "git restore --staged <file>..." to unstage)
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md

no changes added to commit (use "git add" and/or "git commit -a")

@fcollonval fcollonval deleted the patch-1 branch August 11, 2022 07:49
@fcollonval
Copy link
Member Author

@blink1073
Copy link
Contributor

Okay, this approach is problematic, I'm just going to revert to what we had originally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants