Branch automatically change to "master" after image built


Let me break down the issue:

  1. I push some changes in Dockerfile (or environment)
  2. I go to web-UI, Environments → New
  3. Wait for image building to start a new environment at the feature branch
  4. Once the image build succeeds, the branch is automatically switched back to “master” instead of the feature branch.
  5. If I’m absent-minded, I end up starting a new environment at master branch instead of feature branch.

This is indeed an extremely mild issue, but I ended up creating an environment at master branch a few times.

Hello @firat

Thank you for reporting the issue.

I tried it on the latest version of RenkuLab deployed on (it contains a few fixes on environments/sessions).

I couldn’t reproduce the problem. Here is what I’ve done:

  1. 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).
  2. I pushed the changes and refreshed the commits. The last one was automatically selected:
  3. I waited until the image was built:
  4. I clicked on “Start environment”. The environment started on the proper branch/commit combination.

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.

Hi @lorenzo,

Thanks for the detailed answer.

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).

1 Like