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

feat(notebooks): handle non-standard branches projects #597

Merged
merged 2 commits into from
Sep 6, 2019

Conversation

lorenzo-cavazzi
Copy link
Member

The UI showed wrong feedback when trying to start a new interactive environment for projects without a master branch or without any branch/commit at all (note that 1 branch requires at least 1 commit, and also the other way around is also true).

This PR handles the 2 cases as follows:

How to test:

  1. create a project starting from the empty template, then go to the "Notebook servers" tab and click on "Start new server"
  2. clone the project locally, add a branch with a name different from "master", create a commit and push to origin

fix #595

@lorenzo-cavazzi lorenzo-cavazzi requested a review from a team as a code owner September 5, 2019 14:33
@lorenzo-cavazzi
Copy link
Member Author

lorenzo-cavazzi commented Sep 5, 2019

P.S. tests will fail, I will fix them after #582 is merged since that should already address the problem

ciyer
ciyer previously approved these changes Sep 6, 2019
Copy link
Contributor

@ciyer ciyer left a comment

Choose a reason for hiding this comment

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

Very nice! Works on both scenarios for me.

@lorenzo-cavazzi
Copy link
Member Author

I added the code to handle projects without "master" branch also for the "Launch Jupyter" button in the File preview notebooks. This completes the PR by handling also the new component introduced in #582.

An updated preview is available at https://lorenzotest.dev.renku.ch

these 2 cases are now handled:
* the project doesn't contain a branch named "master":
  another branch is selected -- if available
* the project doesn't contain any commit:
  the user is notified and guided through possible steps

fix #595
@lorenzo-cavazzi lorenzo-cavazzi merged commit e81481c into master Sep 6, 2019
@lorenzo-cavazzi lorenzo-cavazzi deleted the 595-notify-no-commits branch September 6, 2019 14:43
@lorenzo-cavazzi lorenzo-cavazzi added this to the sprint-2019-08-16 milestone Sep 6, 2019
@ciyer ciyer modified the milestones: sprint-2019-08-16, 0.7.0 Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handle interactive environments for projects without a commit
2 participants