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

Fix Check Release / check_release CI job #102

Merged
merged 14 commits into from
May 25, 2022

Conversation

echarles
Copy link
Member

Fixes #101 (comment)

This PR aims to fix the releaser CI job

@blink1073
Copy link
Contributor

Here's the config we used in Notebook 6.4

@echarles echarles added the enhancement New feature or request label May 20, 2022
@echarles
Copy link
Member Author

Thx @blink1073. I have added a few more commits on #102. The check_release job now goes further and stops now with the following errors (details on https://github.com/jupyter/nbclassic/runs/6526987103?check_suite_focus=true#step:9:3077)

Creating tar archive
removing 'nbclassic-0.3.8' (and everything under it)
ERROR Source /tmp/build-via-sdist-wad9hepq/nbclassic-0.3.8 does not appear to be a Python project: no pyproject.toml or setup.py
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.12/x64/bin/jupyter-releaser", line 8, in <module>
    sys.exit(main())

@echarles echarles changed the title Use _version.py in pyproject.toml Fix Check Release / check_release CI job May 20, 2022
@blink1073
Copy link
Contributor

python -m build is using the sdist to create the wheel. I think you need to include setup.py, setup.cfg and pyproject.toml in MANIFEST.in.

@echarles
Copy link
Member Author

I am still missing something in the process. Hacked rules in MANIFEST.in and the returned error is now

missing from sdist:
  docs-translations/hi-IN/README.md
  docs-translations/hi-IN/resources/Notebook_Editor.GIF
  docs-translations/hi-IN/resources/dashboard.GIF
  docs-translations/hi-IN/resources/edit_mode.GIF
  docs-translations/hi-IN/resources/file_editor.GIF
  docs-translations/hi-IN/resources/running_code_med.png
  docs-translations/ja-JP/README.md
  docs-translations/ja-JP/resources/Notebook_Editor.GIF
  docs-translations/ja-JP/resources/dashboard.GIF
  docs-translations/ja-JP/resources/edit_mode.GIF
  docs-translations/ja-JP/resources/file_editor.GIF
  docs-translations/ja-JP/resources/running_code_med.png
  docs-translations/ko-KR/HowtoRun.md
  docs-translations/ko-KR/Installation.md
  docs-translations/ko-KR/README.md
  docs-translations/ko-KR/UIComponents.md
  docs-translations/ko-KR/resources/Notebook_Editor.GIF
  docs-translations/ko-KR/resources/dashboard.GIF
  docs-translations/ko-KR/resources/edit_mode.GIF
  docs-translations/ko-KR/resources/file_editor.GIF
  docs-translations/ko-KR/resources/running_code_med.png
  docs-translations/zh-CN/README.md
  docs-translations/zh-CN/resources/Notebook_Editor.GIF
  docs-translations/zh-CN/resources/dashboard.GIF
  docs-translations/zh-CN/resources/edit_mode.GIF
  docs-translations/zh-CN/resources/file_editor.GIF
  docs-translations/zh-CN/resources/running_code_med.png
  git-hooks/README.md
  git-hooks/install-hooks.sh
  git-hooks/post-checkout
  git-hooks/post-merge
listing source files under version control: 425 files and directories
building an sdist: nbclassic-0.3.8.tar.gz: 1507 files and directories

MANIFEST.in Outdated
graft tools
graft nbclassic/tests

exclude git-hooks
Copy link
Contributor

Choose a reason for hiding this comment

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

@echarles
Copy link
Member Author

The manifest.in file seems to be tuned now. On https://pipelines.actions.githubusercontent.com/serviceHosts/f8547054-8c5a-4a55-9535-e755a3b0bb79/_apis/pipelines/1/runs/885/signedlogcontent/2?urlExpires=2022-05-22T07%3A52%3A47.2463120Z&urlSigningMethod=HMACV1&urlSignature=Voi3BdwWf0YrcQj%2BGX8YiGAw%2FzLhH9kh2eXkGJcwnnU%3D the number of file/directories in the sdist and repo is not the same, which sound ok to me.

2022-05-22T07:51:31.5075162Z listing source files under version control: 394 files and directories
2022-05-22T07:51:31.5075416Z building an sdist: nbclassic-0.3.8.tar.gz: 30700 files and directories
```

It then fails with where I can see the root cause.

```
2022-05-22T07:51:31.5075902Z Traceback (most recent call last):
2022-05-22T07:51:31.5084267Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/bin/jupyter-releaser", line 8, in <module>
2022-05-22T07:51:31.5084434Z     sys.exit(main())
2022-05-22T07:51:31.5084921Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
2022-05-22T07:51:31.5085044Z     return self.main(*args, **kwargs)
2022-05-22T07:51:31.5085416Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/click/core.py", line 1055, in main
2022-05-22T07:51:31.5085517Z     rv = self.invoke(ctx)
2022-05-22T07:51:31.5086115Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/jupyter_releaser/cli.py", line 99, in invoke
2022-05-22T07:51:31.5086216Z     super().invoke(ctx)
2022-05-22T07:51:31.5086587Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
2022-05-22T07:51:31.5086749Z     return _process_result(sub_ctx.command.invoke(sub_ctx))
2022-05-22T07:51:31.5087118Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
2022-05-22T07:51:31.5087262Z     return ctx.invoke(self.callback, **ctx.params)
2022-05-22T07:51:31.5087610Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/click/core.py", line 760, in invoke
2022-05-22T07:51:31.5087723Z     return __callback(*args, **kwargs)
2022-05-22T07:51:31.5088132Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/jupyter_releaser/cli.py", line 464, in check_manifest
2022-05-22T07:51:31.5088305Z     util.run("check-manifest -v")
2022-05-22T07:51:31.5088676Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/jupyter_releaser/util.py", line 88, in run
2022-05-22T07:51:31.5088762Z     raise e
2022-05-22T07:51:31.5089136Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/jupyter_releaser/util.py", line 80, in run
2022-05-22T07:51:31.5089244Z     process = tee(cmd, **kwargs)
2022-05-22T07:51:31.5089677Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/jupyter_releaser/tee.py", line 155, in run
2022-05-22T07:51:31.5089847Z     raise subprocess.CalledProcessError(
2022-05-22T07:51:31.5090177Z subprocess.CalledProcessError: Command 'check-manifest -v' returned non-zero exit status 1.
2022-05-22T07:51:31.5580733Z Traceback (most recent call last):
2022-05-22T07:51:31.5583177Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/runpy.py", line 197, in _run_module_as_main
2022-05-22T07:51:31.5702661Z     return _run_code(code, main_globals, None,
2022-05-22T07:51:31.5703103Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/runpy.py", line 87, in _run_code
2022-05-22T07:51:31.5703432Z     exec(code, run_globals)
2022-05-22T07:51:31.5704201Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/jupyter_releaser/actions/draft_release.py", line 74, in <module>
2022-05-22T07:51:31.5704680Z     run_action("jupyter-releaser check-manifest")
2022-05-22T07:51:31.5709441Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/jupyter_releaser/actions/common.py", line 36, in run_action
2022-05-22T07:51:31.5709828Z     _run(target, *args, **kwargs)
2022-05-22T07:51:31.5710524Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/jupyter_releaser/util.py", line 88, in run
2022-05-22T07:51:31.5710865Z     raise e
2022-05-22T07:51:31.5711335Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/jupyter_releaser/util.py", line 80, in run
2022-05-22T07:51:31.5711700Z     process = tee(cmd, **kwargs)
2022-05-22T07:51:31.5712212Z   File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/jupyter_releaser/tee.py", line 155, in run
2022-05-22T07:51:31.5712619Z     raise subprocess.CalledProcessError(
2022-05-22T07:51:31.5713145Z subprocess.CalledProcessError: Command 'jupyter-releaser check-manifest' returned non-zero exit status 1.

@blink1073
Copy link
Contributor

It might be worth waiting until we switch over to using hatch_jupyter_builder, setuptools is more trouble than it is worth.

@blink1073
Copy link
Contributor

Otherwise I'd suggest running check manifest -v locally to see if you get a better error message.

@echarles
Copy link
Member Author

Thx @blink1073 for the help and advices. python setup.py sdist && check-manifest -v run fine with success on my local env with this branch.

It may be worth moving to hatch_jupyter_builder, which we will need to do anyway. Sorry, my wifi dropped at the last community meeting where you would talk about hatch jupyter builder. Is it already usable today. What would be the steps to move to that?

@blink1073
Copy link
Contributor

I'd like to complete all the steps outlined in the JupyterLab PR before declaring it ready. For now, you can add check-manifest to the tool.jupyter-releaser skip array.

@echarles
Copy link
Member Author

echarles commented May 23, 2022

I have disabled the check-manifest as suggested and now check_release (check_release) is green. I keep track on all things disabled on #100 (comment)

Moving further, the check_release (link_check) is failing with (see https://github.com/jupyter/nbclassic/runs/6554168676?check_suite_focus=true).

=================================== FAILURES ===================================
_ /home/runner/work/nbclassic/nbclassic/.jupyter_releaser_checkout/nbclassic/static/components/font-awesome/README.md: http://fortawesome.github.com/Font-Awesome/ _
http://fortawesome.github.com/Font-Awesome/: 404: Not Found
_ /home/runner/work/nbclassic/nbclassic/.jupyter_releaser_checkout/nbclassic/static/components/font-awesome/README.md: http://scripts.sil.org/OFL _
http://scripts.sil.org/OFL: Exceeded 30 redirects.
_ /home/runner/work/nbclassic/nbclassic/.jupyter_releaser_checkout/nbclassic/static/components/font-awesome/README.md: http://fortawesome.github.com/Font-Awesome _
http://fortawesome.github.com/Font-Awesome: 404: Not Found

@echarles echarles marked this pull request as ready for review May 25, 2022 04:13
@echarles
Copy link
Member Author

@blink1073 I have undrafted this. We could merge this PR which disables the make the check_release green and migrate to hatch when ready. I have listed that action in #100 (comment)

@echarles
Copy link
Member Author

I will tackle the failure for the other subflow link_check in another PR.

@blink1073
Copy link
Contributor

Sounds good, thanks!

@blink1073 blink1073 merged commit 0245548 into jupyter:main May 25, 2022
@echarles
Copy link
Member Author

Super! Thx @blink1073

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Correct version python file?
2 participants