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

Changes for RK042 - Support for Pro Rocks in Rockcraft - 30/01/25 #788

Draft
wants to merge 74 commits into
base: feature/pro-sources
Choose a base branch
from

Conversation

clay-lake
Copy link
Contributor

@clay-lake clay-lake commented Jan 15, 2025

  • Have you signed the CLA?

Updates to complete feature set fot RK042 - Support for Pro Rocks in Rockcraft.

dariuszd21 and others added 30 commits November 22, 2024 10:43
The python3-poetry package conflicts with the new pinned version of 'packaging'.
Initialize the Emitter because the command_groups() call can now emit
messages.
* Go tutorial and reference

* Run pipeline

* minor improvements to the go docs

* Add --fail to all curl commands

* tutorial fixes

* Replace second part of the tutorial with a new endpoint

* Add missing space

* update to ubuntu 24.04

* minor corrections

* shorten line

* Fixes and improvements

* Apply suggestions from code review

Co-authored-by: Ben Hoyt <[email protected]>

* Remove unneeded go mod tidy

* Run ci

* Replace you with we and remove Ubuntu version dependency

* go mod init before creating the main.go file

* go-framework and typo

* Run docker as a regular user

* Link to pebble docs in the first occurrence

* quote sudo

* intermediate cleanup -> stop the application

* add next steps part

* typo

* Apply suggestions from code review

Co-authored-by: Tiago Nobrega <[email protected]>

* update link as the other tutorials

* suggestions from code review

* Update docs/reference/extensions/go-framework.rst

Co-authored-by: Rafid Bin Mostofa <[email protected]>

* Suggestion for rewording about the http server create by the go app

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Address comments in code review

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* experimental in the beginning of the tutorial. minor rearrangement

* Add information about the estimated time and skills required acquired

* remove note on amd64 and the bare base

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/tutorial/go.rst

Co-authored-by: Michael DuBelko <[email protected]>

---------

Co-authored-by: Ben Hoyt <[email protected]>
Co-authored-by: Tiago Nobrega <[email protected]>
Co-authored-by: Rafid Bin Mostofa <[email protected]>
Co-authored-by: Michael DuBelko <[email protected]>
The use-case that this enables is packing the output of 'expand-extensions'.
Previously, this would fail because the expanded yaml contains the 'pebble'
part that Rockcraft adds, and then Rockcraft itself would complain that the
project already has a part called 'pebble'.

This commit makes Rockcraft accept an existing part called 'pebble' if the
contents of said part are the same as the one we would add.

Fixes canonical#749
This is *almost* a chore, as the templates, supported profiles, etc are all
unchanged. However, the upstream command adds support for the "--project-dir"
argument, so this is ends up being a feature.

Fixes canonical#753
* feat: override _get_java_link_commands

Maven and Ant plugin should not create /bin/java symlink

* doc: add rockcraft-specific docs for ant and maven

Ant and Maven plugins override build commands of craft-parts Ant and Maven plugins.

* feat: register plugin overrides

* test: add rockcraft plugin tests

- add smoke tests for maven and ant plugins.

* lint: reformat documentation

* test: add ant dependency

* test: fix ant plugin test

- drop unneeded property
- add ant plugin targets

* test: use symlink to java when running test

* test: replace modules files

- use package installation to ensure /usr/bin/java is present
- run jlink to replace modules

* test: drop modules part

- we have not merged JAVA_HOME fix yet, so do basic tests that plugin works

* test: rollback test changes

- we still have to create java symlink in rockcraft yaml
-  the test image is fixed for amd64, so its ok to hardcode path in task.yaml

* test: do not prune docker

* fix: add /usr/bin/java symlink

* doc: update documentation with /usr/bin/java symlink

* test: use /usr/bin/java in the test

* fix: fix typo in ln command

* lint: update formatting

* lint: apply ruff fixes

* doc: reuse common docs

Reuse common docs for maven and ant plugins.

* chore: rename part in ant test

ant test had part named 'maven-sample'.

* test: validate /bin/java

Validate that /bin/java is a valid command

* lint: reformat long lines

craft-parts ant plugin description has too long lines.
Checks the craft-manifest and the fetch-service logs.
This bumps the default Python version on CI to 3.12, which corresponds to the
version of the snap itself.
The package is gone in Python 3.12. This affects unused code, which is now gone,
and some spread tests. The spread tests are still valid because they use older
bases, so just add a pyright exclusion for them.
Looks like the combination of core24 + riscv64 is not supported by the store
currently, which means that 'edge' hasn't been following 'main' since we
updated the snap to core24.
libgpgme11 and libbtrfs0 don't exist on armhf, so we must use the 't64' packages
that exist in all archs.
…anonical#747)

* Feat(extension): Enable Async Gunicorn workers for Flask and Django extensions

* chore(lint): Ran static checkers

* chore(): Fix flask cli unit test

* chore(docs): Docs lint

* chore(docs): Improved wordlist

* Chore(): Update docs, update cli init test, update `rockcraft.yaml` file verification

* Chore(): Try to make linter happy

* Chore(docs): Lint docs

* Chore(docs): Update async doc link

* Run CI

* Chore(Docs): Small doc improvements

* Chore(lint): Doc lint

* Chore(docs): Add words to list

* Chore(): Undone import format

* Chore(): Addressed comments.

* Chore(): Consistent spacing

* Chore(Format): Format imports

* Chore(Lint): Add word

* Chore(): Update docs, update gunicorn conf for async

* Chore(lint): Format

* Chore(tests): Fix tests

* Chore(docs): Fix refs

* Chore(docs): Update refs

* Chore(): Updated docs, async conf file

* Chore(docs): Fix lint

* Chore(): Add a spread test for async

* Chore(test): Removed unnecessary fixture

* Chore(): Format

* Merge main

* Chore(test): Simplify test and fix typo

* Chore(): Improve code

* Chore(lint): Make linter happy

* Chore(): Make linter happier

* Chore(test): Fix unit test

* Chore(lint): Make Mypy happy

* Chore(): Fix shell lint

* Chore(test): Fix test comment

* Chore(test): Add async flask/django tests. Created test dir

* Chore(lint): Run autoformat

* Chore(test): Ignore import errors in django data

* Chore(test): Fix cli test

* Chore(format): format

* Chore(): Change async flask implementation

* Chore(test): Fix spread test

* Chore(): Update docs and spread test

* Chore(test): Removed unnecessary django files

* Chore(doc): Lint docs

* Update docs/reference/extensions/django-framework.rst

Co-authored-by: Erin Conley <[email protected]>

* Update docs/reference/extensions/django-framework.rst

Co-authored-by: Erin Conley <[email protected]>

* Update docs/reference/extensions/django-framework.rst

Co-authored-by: Erin Conley <[email protected]>

* Update docs/reference/extensions/django-framework.rst

Co-authored-by: Erin Conley <[email protected]>

* Chore(): Update gevent install check

* Chore(docs): Style update

* Chore(): Updated pip package check

* Chore(Deps): Add `packaging` dependency

* Chore(lint): Format code

* Chore(format): Format

* Chore(docs): Format doc

* Chore(): Fix spread test, change async check

* Chore(): Except specific exception

* Chore(): Uncomment restore

* Update docs/reference/extensions/django-framework.rst

Co-authored-by: Tiago Nobrega <[email protected]>

* Update docs/reference/extensions/flask-framework.rst

Co-authored-by: Tiago Nobrega <[email protected]>

* Chore(): Addressed comments. Add comment to test_cli.py. fix doc issue. Remove double dependency.

* Chore(test): Add unit async gunicorn tests

* Chore(lint): Format code

* Chore(): Changed copy_tree() to shutil.copytree()

* chore(doc): Fix doc format

* chore(doc): Format

* chore(doc): Format

* chore(doc): Format

* chore(doc): Format

* chore(test): Update tests

* chore(doc): Change testing port in doc

* chore(update): Update statsd-exporter version in flask/django plugin

* chore(): Revert version change in statsd

* chore(doc): Update async docs

* Update docs/reference/extensions/django-framework.rst

Co-authored-by: Michael DuBelko <[email protected]>

* Update docs/reference/extensions/flask-framework.rst

Co-authored-by: Michael DuBelko <[email protected]>

---------

Co-authored-by: Erin Conley <[email protected]>
Co-authored-by: Tiago Nobrega <[email protected]>
Co-authored-by: Michael DuBelko <[email protected]>
* Use helpful messages

* remove use of please

* use resolution
This is loosely inspired on the existing docs for Snapcraft, but with a
different set of restrictions and no concerns about 'legacy' versus 'new'
builders.

Note that this is complementary to the command reference that is autogenerated
from the Python code.

Fixes canonical#597

---------

Co-authored-by: Michael DuBelko <[email protected]>
* docs: release notes for 1.7.0

* Apply suggestions from code review

Co-authored-by: Michael DuBelko <[email protected]>

* changes from review

* fixup! changes from review

* fixup! fixup! changes from review

* fixup! fixup! fixup! changes from review

* fixup! fixup! fixup! fixup! changes from review

* Apply suggestions from code review

Co-authored-by: Michael DuBelko <[email protected]>

* fixup! Apply suggestions from code review

* fixup! Merge remote-tracking branch 'origin/main' into release/1.7.0

* add missing contributors

---------

Co-authored-by: Michael DuBelko <[email protected]>
As of a few months ago we have a proper docs site and the README is minimal, so update this link.

---------

Co-authored-by: Tiago Nobrega <[email protected]>
tigarmo and others added 14 commits December 21, 2024 12:47
These are needed to build the docs, on the build-docs howto.
- Don't build libgit2's tests (we don't run them)
- Use all available cores when building Python deps from source
This commit is a manual application of bits of starbase/305.
Add a prettierignore file for those files we want to skip, and fix
the globbing passed to the tool - we want prettier to parse those,
not bash.
Adds an improved bash tab-completion script.
@clay-lake clay-lake changed the title Testing: Execute Pro Feature Spread Tests DRAFT: RK042 - Support for Pro Rocks in Rockcraft Jan 28, 2025
bepri and others added 7 commits January 29, 2025 12:33
* feat: add uv plugin

* style: one-off formatting fix

* fix: revert temporary test change

* fix: set default python

* refactor(test): rearrange python plugin tests to more easily support new ones

* fix: rewrite shebangs on uv plugin scripts

* chore: clean up

* chore: update schema with uv plugin

* fix(test): include black dependency test for uv

* test: correct usrmerge fix test to check all python versions

* fix: install python in the spread rock

* fix: add python to stage-packages instead

* style: run prettier formatter

* chore: pr feedback, use python3-minimal

* chore: pr feedback, add link to issue

* docs: add uv and go use plugin docs

* docs: remove trailing whitespace

* fix: revert to full python installation

* chore: pr feedback, test importing black

Co-authored-by: Alex Lowe <[email protected]>

* style: fix linter warnings

---------

Co-authored-by: Alex Lowe <[email protected]>
❯ uv lock --upgrade
Updated codespell v2.4.0 -> v2.4.1
Updated craft-application v4.6.0 -> v4.8.2
Updated craft-parts v2.3.0 -> v2.4.1
Updated isort v5.13.2 -> v6.0.0
Updated pylint v3.3.3 -> v3.3.4
Updated sphinx-notfound-page v1.0.4 -> v1.1.0
Poetry >=2.0 drops support for the "export" command by default, delegating it
to the poetry-plugin-export plugin. These are dev-dependencies only.
The test builds the docs over the project files that are sent to the spread
worker. However, these files might include files generated by spread tests
that executed first, making the test fail unpredictably.
@clay-lake clay-lake changed the title DRAFT: RK042 - Support for Pro Rocks in Rockcraft Changes for RK042 - Support for Pro Rocks in Rockcraft - 30/01/25 Jan 30, 2025
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.

9 participants