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 76 commits into
base: feature/pro-sources
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
3044822
feat(snap): add git as craft.git to rockcraft (#756)
dariuszd21 Nov 22, 2024
d46224f
buids(deps): update with freeze-requirements.sh
tigarmo Nov 25, 2024
f2baf42
build(deps): block craft-parts==2.1.3
tigarmo Nov 25, 2024
b3c34ec
chore(schema): update schema
tigarmo Nov 25, 2024
7178fe4
chore(ci): install poetry from pip
tigarmo Nov 25, 2024
834271c
chore: init the emitter when generating docs
tigarmo Nov 25, 2024
521c3f7
docs: add Go tutorial and reference (#723)
javierdelapuente Nov 27, 2024
d77ac5a
fix: accept a 'pebble' part if its the same as ours (#763)
tigarmo Nov 28, 2024
484099f
feat: use Init command and service from upstream
tigarmo Nov 25, 2024
7b1936d
feat: update 'rockcraft init' base to 24.04
tigarmo Nov 28, 2024
b7ea743
feat: do not create /bin/java symlink (#752)
vpa1977 Dec 4, 2024
f4cff41
tests(spread): add a test for the fetch-service
tigarmo Nov 27, 2024
a95c94f
build(snap): update snap to core24
tigarmo Dec 3, 2024
36c3ebf
ci: run linters and tests on 24.04
tigarmo Dec 6, 2024
ee528bb
chore: drop uses of distutils
tigarmo Dec 6, 2024
8e74936
feat: add the remote-build command (#769)
tigarmo Dec 13, 2024
28eb969
build(deps): update with freeze-requirements.sh (#771)
tigarmo Dec 14, 2024
f0e8fe0
build(snap): drop 'riscv64' for now (#772)
tigarmo Dec 16, 2024
15c0987
build(snap): update stage-packages for armhf
tigarmo Dec 16, 2024
89aad73
docs: apply release-notes template to rockcraft (#775)
tigarmo Dec 17, 2024
ba8c0d7
feat(extensions): enable async Gunicorn workers for Flask and Django …
alithethird Dec 18, 2024
7f291e7
feat: improve error message for experimental extensions (#777)
yanksyoon Dec 19, 2024
e5b9bda
docs: reference docs for remote builds (#778)
tigarmo Dec 19, 2024
41b2368
docs: release notes for 1.7.0 (#776)
tigarmo Dec 20, 2024
f5532ef
docs: update link to Pebble layer specification (#779)
benhoyt Dec 20, 2024
f6660c8
chore: add pre-commit-config from starbase
tigarmo Dec 19, 2024
76de14f
build(snap): use uv to build the snap
tigarmo Dec 19, 2024
a4f3b5e
build: add Makefile and common.mk from starbase
tigarmo Dec 19, 2024
22b1e67
style: run 'make format'
tigarmo Dec 19, 2024
abe2c1e
chore: add lint and types deps
tigarmo Dec 19, 2024
77fdf0f
style(yaml): disable yammlint for now
tigarmo Dec 19, 2024
51f2c17
build: fix optional dependencies
tigarmo Dec 19, 2024
7569694
chore: update sphinx-lint call
tigarmo Dec 19, 2024
366c80e
chore: fix for lint-twine
tigarmo Dec 20, 2024
ea0172f
chore(tests): mark >1s tests as slow
tigarmo Dec 20, 2024
9f2b2ff
ci: use QA workflows from starflow
tigarmo Dec 20, 2024
0e079bd
chore: disable bad linters in sphinx-lint
tigarmo Dec 20, 2024
e68e4e1
build: don't build on macos
tigarmo Dec 20, 2024
480a282
build(deps): temporarily restrict craft-app and craft-parts
tigarmo Dec 20, 2024
97e8021
build(tests): install more test dependencies
tigarmo Dec 20, 2024
a2d21ab
test: fix test on arm64
tigarmo Dec 20, 2024
5c2c03a
ci: fix schema diff with uv
tigarmo Dec 20, 2024
1e864cd
ci: disable 'lowest' resolution tests for now
tigarmo Dec 20, 2024
f38f806
ci: use policy workflow from starbase/starflow
tigarmo Dec 20, 2024
cd483f3
docs: update build-docs how-to
tigarmo Dec 20, 2024
2daac41
ci: pull python-scans changes from charmcraft
tigarmo Dec 20, 2024
9e25945
chore: remove unused project files
tigarmo Dec 20, 2024
2f0a0a5
ci: remove requirements-doc.txt
tigarmo Dec 20, 2024
adaa7d8
chore(spread): package more files in spread
tigarmo Dec 20, 2024
8ea35b0
build(snap): speed up snap packing
tigarmo Dec 21, 2024
442bd73
temporary change of craft-* sources
clay-lake Jan 15, 2025
1975b9c
style: replace yamllint with pylint.
tigarmo Jan 24, 2025
8c8cc06
style: configure and fix prettier
tigarmo Jan 24, 2025
8614580
style: run make format-prettier
tigarmo Jan 24, 2025
e12e93b
style: fix formatting with new ruff
tigarmo Jan 24, 2025
c8c5883
style: fix formatting of init templates
tigarmo Jan 24, 2025
4b0cb84
feat: spread tests for pro feature
clay-lake Jan 26, 2025
e0010bd
feat: hidden apt upgrade part
clay-lake Jan 27, 2025
380dd3c
feat: add improved bash completion script
bepri Jan 27, 2025
2f4c725
fix: apt update and upgrade on overlay
clay-lake Jan 28, 2025
449dad9
feat: add uv plugin (#792)
bepri Jan 29, 2025
5992051
build(deps): update dependencies
tigarmo Jan 28, 2025
23a0618
build(deps): explicitly add poetry-plugin-export
tigarmo Jan 28, 2025
487ff1e
docs: fix declaration of fastapi dependency
tigarmo Jan 28, 2025
74d0d9d
test(spread): run test that builds docs first
tigarmo Jan 28, 2025
17a2491
build(schema): update schema from craft-parts update
tigarmo Jan 28, 2025
6f1048a
test: fix expected 'bad architecture' message
tigarmo Jan 28, 2025
49de044
fix: adjust dependencies for feature branch
clay-lake Jan 30, 2025
dbfa4b9
refactor: simplify chroot hidden part command
clay-lake Jan 30, 2025
01df28d
refactor: pro-rocks-packages for additional testing
clay-lake Jan 30, 2025
ec466f0
feat: integration tests for hidden apt upgrade part
clay-lake Jan 30, 2025
e92b931
fix: add missing project file for pro-rocks-package
clay-lake Jan 30, 2025
ea9f7c9
fix: remove incomplete and unneeded spread test
clay-lake Jan 30, 2025
29f5a41
Merge branch 'main' of https://github.com/canonical/rockcraft into fe…
clay-lake Jan 30, 2025
bf3fe95
trigger tests
clay-lake Feb 6, 2025
cec17fd
fix: correct URL for git sourced modules
clay-lake Feb 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .bumpversion.cfg

This file was deleted.

1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ body:
render: shell
validations:
required: true

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?

-----
---
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Add 'documentation' label to any changes within 'docs' folder or any subfolders
documentation:
- changed-files:
- any-glob-to-any-file: docs/**
- changed-files:
- any-glob-to-any-file: docs/**
2 changes: 1 addition & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ categories:
label:
- "tooling"

change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"

template: |
Special thanks to the contributors that made this release happen: $CONTRIBUTORS
Expand Down
50 changes: 25 additions & 25 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
"pydantic-yaml", // Updates with pydantic
"mcr.microsoft.com/dotnet/runtime-deps", // This is intentionally dotnet 6
],
labels: ["dependencies"], // For convenient searching in GitHub
labels: ["dependencies"], // For convenient searching in GitHub
baseBranches: ["$default", "/^hotfix\\/.*/"],
pip_requirements: {
fileMatch: ["^tox.ini$", "(^|/)requirements([\\w-]*)\\.txt$", "^.pre-commit-config.yaml$"]
fileMatch: [
"^tox.ini$",
"(^|/)requirements([\\w-]*)\\.txt$",
"^.pre-commit-config.yaml$",
],
},
packageRules: [
packageRules: [
{
// Internal package minor patch updates get top priority, with auto-merging
groupName: "internal package minor releases",
Expand All @@ -21,7 +25,7 @@
automerge: true,
minimumReleaseAge: "0 seconds",
schedule: ["at any time"],
matchBaseBranches: ["$default"], // Only do minor releases on main
matchBaseBranches: ["$default"], // Only do minor releases on main
},
{
// Same as above, but for hotfix branches, only for patch, and without auto-merging.
Expand All @@ -31,7 +35,7 @@
prPriority: 10,
minimumReleaseAge: "0 seconds",
schedule: ["at any time"],
matchBaseBranches: ["/^hotfix\\/.*/"], // All hotfix branches
matchBaseBranches: ["/^hotfix\\/.*/"], // All hotfix branches
},
{
// Automerge patches, pin changes and digest changes.
Expand All @@ -40,15 +44,15 @@
excludeDepPatterns: ["lint/.*", "types/.*"],
matchUpdateTypes: ["patch", "pin", "digest"],
prPriority: 3, // Patches should go first!
automerge: true
automerge: true,
},
{
// Update all internal packages in one higher-priority PR
groupName: "internal packages",
matchDepPatterns: ["craft-.*", "snap-.*"],
matchCategories: ["python"],
prPriority: 2,
matchBaseBranches: ["$default"], // Not for hotfix branches
matchBaseBranches: ["$default"], // Not for hotfix branches
},
{
// GitHub Actions are higher priority to update than most dependencies since they don't tend to break things.
Expand All @@ -67,11 +71,7 @@
// Minor changes can be grouped and automerged for dev dependencies, but are also deprioritised.
groupName: "development dependencies (non-major)",
groupSlug: "dev-dependencies",
matchDepPatterns: [
"dev/.*",
"lint/.*",
"types/.*"
],
matchDepPatterns: ["dev/.*", "lint/.*", "types/.*"],
matchPackagePatterns: [
// Brought from charmcraft. May not be complete.
// This helps group dependencies in requirements-dev.txt files.
Expand All @@ -96,7 +96,7 @@
],
matchUpdateTypes: ["minor", "patch", "pin", "digest"],
prPriority: -1,
automerge: true
automerge: true,
},
{
// Documentation related updates
Expand All @@ -105,13 +105,13 @@
matchPackageNames: ["Sphinx", "furo"],
matchPackagePatterns: ["[Ss]phinx.*$"],
matchDepPatterns: ["docs/.*"],
matchBaseBranches: ["$default"], // Not for hotfix branches
matchBaseBranches: ["$default"], // Not for hotfix branches
},
{
// Other major dependencies get deprioritised below minor dev dependencies.
matchUpdateTypes: ["major"],
prPriority: -2,
matchBaseBranches: ["$default"], // Not for hotfix branches
matchBaseBranches: ["$default"], // Not for hotfix branches
},
{
// Major dev dependencies are stone last, but grouped.
Expand All @@ -120,7 +120,7 @@
matchDepTypes: ["devDependencies"],
matchUpdateTypes: ["major"],
prPriority: -3,
matchBaseBranches: ["$default"], // Not for hotfix branches
matchBaseBranches: ["$default"], // Not for hotfix branches
matchPackagePatterns: [
// Generated from the dependency dashboard, may not be complete.
"^(.*/)?autoflake$",
Expand All @@ -135,16 +135,16 @@
"^(.*/)?responses$",
"^(.*/)?ruff$",
"^(.*/)?twine$",
"^(.*/)?types-"
"^(.*/)?types-",
],
},
{
// Pyright makes regular breaking changes in patch releases, so we separate these
// and do them independently.
matchPackageNames: ["pyright", "types/pyright"],
prPriority: -4,
matchBaseBranches: ["$default"], // Not for hotfix branches
}
matchBaseBranches: ["$default"], // Not for hotfix branches
},
],
customManagers: [
{
Expand All @@ -153,8 +153,8 @@
customType: "regex",
depTypeTemplate: "devDependencies",
matchStrings: [
"# renovate: datasource=(?<datasource>\\S+)\n\\s+(?<depName>.*?)(\\[[\\w]*\\])*[=><]=?(?<currentValue>.*?)\n"
]
"# renovate: datasource=(?<datasource>\\S+)\n\\s+(?<depName>.*?)(\\[[\\w]*\\])*[=><]=?(?<currentValue>.*?)\n",
],
},
{
// .pre-commit-config.yaml version updates
Expand All @@ -163,9 +163,9 @@
datasourceTemplate: "pypi",
depTypeTemplate: "lint",
matchStrings: [
"- repo: .*/<(?<depName>\\S+)\\s*\\n\\s*rev:\s+\"?v?(?<currentValue>\\S*)\"?",
]
}
'- repo: .*/<(?<depName>\\S+)\\s*\\n\\s*rev:\s+"?v?(?<currentValue>\\S*)"?',
],
},
],
timezone: "Etc/UTC",
schedule: ["every weekend"],
Expand All @@ -176,5 +176,5 @@
prHourlyLimit: 1, // No more than 1 PR per hour.
minimumReleaseAge: "2 days",
automergeStrategy: "squash", // Squash & rebase when auto-merging.
semanticCommitType: "build" // use `build` as commit header type (i.e. `build(deps): <description>`)
semanticCommitType: "build", // use `build` as commit header type (i.e. `build(deps): <description>`)
}
21 changes: 21 additions & 0 deletions .github/workflows/policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check policy
on:
pull_request:
push:
branches:
- main
- hotfix/*
- work/check-policy # For development

jobs:
policy:
uses: canonical/starflow/.github/workflows/policy.yaml@main
python-scans:
name: Security scan
uses: canonical/starflow/.github/workflows/scan-python.yaml@main
with:
packages: python-apt-dev
# requirements-noble.txt can't build on jammy
requirements-find-args: "! -name requirements-noble.txt"
osv-extra-args: "--config=source/osv-scanner.toml"
uv-export: false
18 changes: 18 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: QA
on:
push:
branches:
- "main"
- "feature/*"
- "hotfix/*"
- "release/*"
- "renovate/*"
pull_request:

jobs:
lint:
uses: canonical/starflow/.github/workflows/lint-python.yaml@main
test:
uses: canonical/starflow/.github/workflows/test-python.yaml@main
with:
lowest-python-version: ""
20 changes: 14 additions & 6 deletions .github/workflows/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,30 @@ env:

jobs:
diff-schema:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout rockcraft
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up uv with caching
id: setup-uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-suffix: ${{ steps.runner-info.outputs.cache-hash }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install requirements
run: pip install -r requirements.txt

- name: Run generator script
run: ./tools/schema/schema.py > generated_schema.json
run: |
uv run --frozen --no-dev --extra apt-jammy \
python tools/schema/schema.py > generated_schema.json

- name: Check with stored schema
run: |
Expand All @@ -49,4 +55,6 @@ jobs:

- name: Run ajv
run: |
ajv validate -s $ROCKCRAFT_JSON -d docs/reference/code/example/rockcraft.yaml --strict=false --spec=draft2020
ajv validate -s $ROCKCRAFT_JSON \
-d docs/reference/code/example/rockcraft.yaml \
--strict=false --spec=draft2020
16 changes: 0 additions & 16 deletions .github/workflows/security-scan.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/snap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- "feature/**"


jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -32,7 +31,7 @@ jobs:
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]
then
echo "branch=pr-${{ github.event.number }}" >> "$GITHUB_OUTPUT"
echo "branch=pr-${{ github.event.number }}" >> "$GITHUB_OUTPUT"
else
branch=$(echo ${GITHUB_REF#refs/*/} | sed -e 's|feature/\(.*\)|\1|')
echo "branch=$branch" >> "$GITHUB_OUTPUT"
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/spread-manual.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Spread (manual - large/flaky)
on:
pull_request:
types: [ labeled ]
types: [labeled]
schedule:
- cron: "0 2 * * 0,3" # run at 2 AM on Sundays and Wednesdays

Expand Down Expand Up @@ -43,9 +43,15 @@ jobs:
with:
name: snap
path: tests
- name: Run spread (large/flaky)

- name: Run remote-build tests
env:
LAUNCHPAD_TOKEN: "${{ secrets.LAUNCHPAD_TOKEN }}"
run: spread tests/spread/rockcraft/remote-build
- name: Run large/flaky tests
id: flaky
run: spread tests/spread/manual/

- name: Discard spread workers
if: always()
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ jobs:
shopt -s nullglob
for r in .spread-reuse.*.yaml; do
spread -discard -reuse-pid="$(echo "$r" | grep -o -E '[0-9]+')"
done
done
Loading
Loading