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

[MRG] Improve contribution document #1251

Closed
wants to merge 3 commits into from

Conversation

betatim
Copy link
Member

@betatim betatim commented Jan 23, 2021

This adds back some sections that got lost over time and fixes typos, broken links, etc.

I followed all the individual guides to check that they work, except for the "helm chart development" one.

@betatim betatim force-pushed the fix-contrib-docs branch 7 times, most recently from 19084ec to 97d17b0 Compare January 23, 2021 18:06
@betatim betatim changed the title [WIP] Improve contribution document [MRG] Improve contribution document Jan 23, 2021
@betatim
Copy link
Member Author

betatim commented Jan 23, 2021

One thing I've noticed when running the tests is that test_build.py::test_build spends a lot of time doing nothing(?) between printing for example the last two lines of this test:

binderhub/tests/test_build.py::test_build[gh/binderhub-ci-repos/cached-minimal-dockerfile/596b52f10efb0c9befc0c4ae850cc5175297d71c] Waiting for build to start...
Picked Git content provider.
Cloning into '/tmp/repo2dockervu5x3rmc'...
HEAD is now at 596b52f Let README.md reference the minimal-dockerfile repo
Using DockerBuildPack builder
Step 1/1 : FROM jupyterhub/binderhub-ci-repos_minimal-dockerfile:latest
 ---> d2f558522e48
{"aux": {"ID": "sha256:d2f558522e48ff00dff80b759cdc4bf69ea58989e9dc851f1daa7d4b23ec9f29"}}[Warning] One or more build-args [NB_USER NB_UID] were not consumed
Successfully built d2f558522e48
Successfully tagged test-2df2af76eb719f8dd469e990691b74dcbb-2dbinderhub-2dci-2drepos-2dcached-2dminimal-2ddockerfile-e08ef5:596b52f10efb0c9befc0c4ae850cc5175297d71c
Built image, launching...
Launching server...
server running at http://192.168.64.2:30902/user/binderhub-ci-re-imal-dockerfile-w6hpvxwk/
http://192.168.64.2:30902/user/binderhub-ci-re-imal-dockerfile-w6hpvxwk/

The last line is printed by our unit test and indicates that it got it and it will visit the repo. The second to last line is BinderHub saying "the server is ready". So the mystery for me is why so much time (maybe 10-20seconds pass? I've not timed it but it is much more than "1-2 seconds) passes between these two.

- `auth`: Tests related to BinderHub's usage of JupyterHub as an OAuth2 Identity
Provider (IdP) for non public access.


Copy link
Member

Choose a reason for hiding this comment

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

The overview this section contain took quite some time for me to figure out by code inspection and has been important to me to comprehend - can we retain it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking about having a dedicated section in the docs that contains all the nitty gritty details, how to run all the tests, other pitfalls, etc. With the goal of keeping CONTRIBUTING.md aimed at newcomers or a quick reference.

Having such a place to store commands I actually use (because CONTRIBUTING.md uses "a Ubuntu system as common denominator" would be nice.

Copy link
Member

Choose a reason for hiding this comment

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

Sure go for it!

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
Copy link
Member

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

Just wanted to explicitly request a change I find important: https://github.com/jupyterhub/binderhub/pull/1251/files#r563198058

@consideRatio
Copy link
Member

@betatim would you like to keep working on this?

@betatim
Copy link
Member Author

betatim commented Oct 1, 2021

I won't have time to move the commands and start a new document for the nitty gritty. I think we can create a follow up issue to take care of that and merge this PR

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@consideRatio
Copy link
Member

consideRatio commented Oct 1, 2021

I won't have time to move the commands and start a new document for the nitty gritty. I think we can create a follow up issue to take care of that and merge this PR

Can you be more specific with what you mean with "move the commands"?

Before a merge, I'd like to ensure the deleted section about the tests is retained in our docs. I've copy pasted it below for clarity of what I refer to.

## Running tests

This git repository contains `pytest` based tests that you can run locally.
Depending on your development setup, you may want to run different kind of
tests. You can get some hints on what tests to run and how by inspecting
`.travis.yaml`.

### Environment variables influencing tests
- `BINDER_URL`: An address of an already running BinderHub as reachable from the
  tests. If this is set, the test suite will not start temporary local BinderHub
  servers but instead interact with the remote BinderHub.
- `GITHUB_ACCESS_TOKEN`: A GitHub access token to help avoid quota limitations
  for anonymous users. It is used to enable certain tests making many calls to
  GitHub API.

### Pytest marks labelling tests
- `remote`: Tests for them the BinderHub is already running somewhere.
- `github_api`: Tests that communicate with the GitHub API a lot.
- `auth`: Tests related to BinderHub's usage of JupyterHub as an OAuth2 Identity
  Provider (IdP) for non public access.

@betatim
Copy link
Member Author

betatim commented Oct 1, 2021

Moving that section to some new document is something I'd punt to a different PR/someone else as I won't have time to work on that.

@consideRatio
Copy link
Member

Moving that section to some new document is something I'd punt to a different PR/someone else as I won't have time to work on that.

It is my understanding that you wish that section to be either moved or deleted. It is my wish that it is retained someplace - preferably in CONTRIBUTING.md where I think it fits best.

To me, it was quite challenging to onboard myself to grasp that overview as I had to do it via code inspection. If you wish to have it moved or refactored somehow, that's okay with me, but to straight up delete it isn't.

@betatim
Copy link
Member Author

betatim commented Oct 1, 2021

Feel free to make a new PR based on this one which reflects a compromise you like.

@consideRatio
Copy link
Member

@betatim are you asking me to accept this PR removing a section I wanted to retain, and that I submit a new PR adding this section back after this PR then is merged?

@consideRatio
Copy link
Member

consideRatio commented Dec 29, 2022

@betatim when I read #1251 (comment) I got quite sad, and I still feel sad about the interaction we had in this PR.

I remain emotional about this PR because I understand it as a the changes suggested in it stems from reverting changes I suggested in #1188 rather than iterating on the documentation. I'm willing to revert changes I've introduced, but I'm not willing to approve/merge this PR in order to create a new one myself adding them back. (EDIT: "adding them back" should have been "adding the section on running tests back")

I'm sorry that you didn't get a chance to review changes in #1188 before they were merged.

@betatim
Copy link
Member Author

betatim commented Jan 3, 2023

(At the time) I thought this was an improvement over what was in main. You disagree. This is fine. I don't feel strongly enough about this change to figure out where the compromise is, which means I propose we close this. I'm also happy for someone else to take over this PR to try and complete it.

@consideRatio
Copy link
Member

Thank you for following up with me @betatim!

I'll for now go for a close here then. If you or someone else wants to work this, the wish I have is that the section I added about running tests is retained. I don't feel strongly about any language changes, but that information has been critical for my own development efforts in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants