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

Improved Temp File Handling #1107

Merged
merged 6 commits into from
Jan 12, 2021
Merged

Conversation

phcreery
Copy link
Contributor

@phcreery phcreery commented Jan 12, 2021

This aligns with #1076 and is mentioned in #1103
This should resolve: #1104 & #1103

Summary:

Resources

Windows Special Chars: https://ss64.com/nt/syntax-esc.html
Linux Special Chars: https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_03.html#:~:text=Escape%20characters%20are%20used%20to,with%20the%20exception%20of%20newline.

@phcreery phcreery requested review from Silverarmor and a user January 12, 2021 05:09
Copy link
Contributor

@aklajnert aklajnert left a comment

Choose a reason for hiding this comment

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

Good job in general, thanks for working on it.

spotdl/download/downloader.py Outdated Show resolved Hide resolved
spotdl/download/downloader.py Outdated Show resolved Hide resolved
spotdl/download/downloader.py Outdated Show resolved Hide resolved
spotdl/download/downloader.py Outdated Show resolved Hide resolved
spotdl/download/downloader.py Outdated Show resolved Hide resolved
@phcreery
Copy link
Contributor Author

Good job in general, thanks for working on it.

Sure thing

spotdl/download/downloader.py Outdated Show resolved Hide resolved
Copy link
Member

@Silverarmor Silverarmor left a comment

Choose a reason for hiding this comment

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

Should this possibly go into a new branch hotfix or similar? We would want to push this kind of change to PyPi ASAP. Not right now, but a possible scenario is that dev has some changes not yet ready for merging (in a future scenario).

Possibly we should have a hotfix branch where we push this type of bugfix to? - Or maybe it can go straight to master?

@Silverarmor Silverarmor added the Bug Fix PRs that fix bugs label Jan 12, 2021
@ghost
Copy link

ghost commented Jan 12, 2021

Hotfix branch is better. Pushing hotfixes to master can make a mess.

One the hotfix is published, we can take time to rework the code (if required) and then push the changes to Dev and eventually master.

@Silverarmor
Copy link
Member

Also want to say a massive thank you for your hard work, especially having a well structured PR message that explains everything!

@Silverarmor
Copy link
Member

Hotfix branch is better. Pushing hotfixes to master can make a mess.

One the hotfix is published, we can take time to rework the code (if required) and then push the changes to Dev and eventually master.

That would defeat the purpose of a hotfix branch.
The purpose is to bypass the dev branch, since the dev branch could have other unrelated changes. E.g, switching to rich could be on the dev branch, and not yet ready to go to master.

A PR like this ("urgent" bug fix), should go into hotfix (where version no is changed and code is tested), before being pushed to master as a patch (e.g. v3.2.2)

(PR --> `hotfix` --> `master`)

@aklajnert
Copy link
Contributor

I guess in this case we need to create the hotfix branch from master first.

@Silverarmor Silverarmor changed the base branch from dev to hotfix January 12, 2021 08:55
@ghost
Copy link

ghost commented Jan 12, 2021

That would defeat the purpose of a hotfix branch.
The purpose is to bypass the dev branch, since the dev branch could have other unrelated changes. E.g, switching to rich could be on the dev branch, and not yet ready to go to master.

A PR like this ("urgent" bug fix), should go into hotfix (where version no is changed and code is tested), before being pushed to master as a patch (e.g. v3.2.2)

(PR --> `hotfix` --> `master`)

Exactly what was meant:
- PR --> hotfix --> master
- later, reworked hotfix code (if rework is required) --> dev --> master

Yes, we need to create a hotfix branch from master

@Silverarmor
Copy link
Member

Wait that wont work @MikhailZex @aklajnert - This PR's branch was made off dev, so it would add the new CI checks & any other changes that were on dev.

How do we fix this? We want the branch not to have the changes from dev

@aklajnert
Copy link
Contributor

I think this branch should be rebased with master first.

@ghost
Copy link

ghost commented Jan 12, 2021

or simpler, copy your changes to a separate folder, fork master, copy back the changes int0 master-fork, force push that to phcreery:save_file_handling_pt2, not elegant, probably riddled with problems but it works & is considerably easier than a rebase.

@Silverarmor Silverarmor added the High Priority Indicates an issue that requires immediate attention and should be addressed as soon as possible label Jan 12, 2021
@phcreery
Copy link
Contributor Author

phcreery commented Jan 12, 2021

I am not sure a hotfix branch is even necessary. If you can test and review a PR directly, what is the need for testing and reviewing the branch if it is just going to be merged immediately?

Let me know if yall think otherwise.

@phcreery
Copy link
Contributor Author

Wait that wont work @MikhailZex @aklajnert - This PR's branch was made off dev, so it would add the new CI checks & any other changes that were on dev.

How do we fix this? We want the branch not to have the changes from dev

I could remake the PR starting from master/hotfix ...

@aklajnert
Copy link
Contributor

Did you try rebasing with master? That could do the trick.

@phcreery phcreery closed this Jan 12, 2021
@phcreery phcreery force-pushed the save_file_handling_pt2 branch from f1d10ec to 36f8a74 Compare January 12, 2021 14:09
@phcreery phcreery reopened this Jan 12, 2021
@phcreery
Copy link
Contributor Author

phcreery commented Jan 12, 2021

On hotfix now with corrected commits. I cloned the branch to a *_temp one. Did a git reset --hard upstream/hotfix then git push origin save_file_handling_pt2 --force on this one, then cherry-picked my commits from the clone onto this one.

@phcreery phcreery linked an issue Jan 12, 2021 that may be closed by this pull request
@Silverarmor
Copy link
Member

I am not sure a hotfix branch is even necessary. If you can test and review a PR directly, what is the need for testing and reviewing the branch if it is just going to be merged immediately?

Let me know if yall think otherwise.

on the hotfix branch is where we'd need to bump the version number for PyPi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix PRs that fix bugs High Priority Indicates an issue that requires immediate attention and should be addressed as soon as possible
Projects
None yet
3 participants