I tried it on the latest version of RenkuLab deployed on https://dev.renku.ch (it contains a few fixes on environments/sessions).
I couldn’t reproduce the problem. Here is what I’ve done:
I started an environment on a non-default branch, prepared some changes, opened a “New environment” page, and selected the same branch (secondBranch in the following screenshots).
I pushed the changes and refreshed the commits. The last one was automatically selected:
One thing that would reset the branch to master would be refreshing the whole page at step 2. If you click on the “refresh” icon next to the label Commit, the selected Branch should be preserved.
Keep in mind that the previous Branch is not memorized when you move away from the “Start environment” page. A “per-branch” project navigation is planned for the future but it is not available yet.
Yes I was also talking with @tolevski and I think I might be experiencing some form of page refresh (maybe done by my browser?) that is causing the issue. Image builds in my project take about 35-50mins, and I believe the page gets refreshed in the meantime. I cannot pinpoint it, but I think I once caught with my eye the tab title switching between “Renku” to “Renku login” (?) of some sort. So either my browser is refreshing the page for some reason, or maybe renku is logging me back in within the 1hour it takes to build the image?
I’m not sure. Let me try to catch the point of switch to master branch happening. Maybe I can give a reproducible example…
Ah yes, that may also be the case.
For security reasons, the token used for the authentication needs to refresh periodically. This generally has a limited impact on the users and may trigger a silent re-login (i.e. you see the login page but aren’t asked for credentials again) while browsing.
Currently, this refresh is also occasionally triggered on some pages where specific resources are checked, like in the case of checking images updates.
We will work on improvements in those areas, preventing this behaviour by automatically refreshing the tokens and by pushing notifications on status changes for images and similar resources from the server-side.
This may take some time before it’s ready and deployed to RenkuLab (it’s scheduled for Q3/Q4).