8000 Items: Introduce `BootableItem` by SchoolGuy · Pull Request #3805 · cobbler/cobbler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Items: Introduce BootableItem #3805

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

Merged
merged 6 commits into from
Aug 9, 2024
Merged

Conversation

SchoolGuy
Copy link
Member

Linked Items

Split out of #3440

Description

This PR is introducing the new abstract class BootableItem. This refactoring consists of the following things:

  • Remove the fetchable_files attribute
  • Remove the boot_files attribute
  • Rename Item to BootableItem and move it to the abstract folder.

Behaviour changes

Old: Cobbler has an enormous base class Item

New: The item hierarchy is much slimmer.

Category

This is related to a:

  • Bugfix
  • Feature
  • Packaging
  • Docs
  • Code Quality
  • Refactoring
  • Miscellaneous

Tests

  • Unit-Tests were created
  • System-Tests were created
  • Code is already covered by Unit-Tests
  • Code is already covered by System-Tests
  • No tests required

Introduced in 253f7a9 the functionality is not working for a good while now.
This was part of the self-written tftpd.py TFTP server that got removed in
1ddc45e.
@SchoolGuy SchoolGuy added this to the v3.4.0 milestone Aug 8, 2024
@SchoolGuy SchoolGuy requested review from m-czernek and a team and removed request for m-czernek August 8, 2024 08:56
@SchoolGuy SchoolGuy added the no changelog This doesn't need a changelog label Aug 8, 2024
@SchoolGuy SchoolGuy mentioned this pull request Aug 8, 2024
12 tasks
This commit temporarily moves the job of "boot_files" (providing additional
files for TFTP) to the "template_files" property which has the same job but
for Koan.
Copy link
codacy-production bot commented Aug 8, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.09% (target: -1.00%) 64.91% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (732c688) 15959 10674 66.88%
Head commit (02802ff) 15936 (-23) 10644 (-30) 66.79% (-0.09%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3805) 57 37 64.91%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@SchoolGuy SchoolGuy marked this pull request as ready for review August 8, 2024 13:26
@SchoolGuy SchoolGuy force-pushed the feature/introduce-bootable-item branch from 02dc693 to 7e86bdf Compare August 8, 2024 13:38
@SchoolGuy
Copy link
Member Author

The integration tests are passing in the container locally. See the collapsed section for results.

Click me
36d479ac112e:/code # make system-test
make -C system-tests
scripts/run-tests 

Patterns:
  basic-*
  import-*
  settings-cli-*
  svc-*

Running tests:
grep: warning: * at start of expression
  basic-buildiso... ok
  basic-distro-add-remove... ok
  basic-distro-rename... ok
  basic-inheritance... ok
  basic-mkloaders... ok
  basic-profile-add-remove... ok
  basic-profile-rename... ok
  basic-system-add-remove... ok
  basic-system-ipxe-dhcpd-conf-update... ok
  basic-system-parent-image... ok
  basic-system-rename... ok
  basic-system-serial... ok
  import-debian-bookworm... ok
  import-debian-bullseye... ok
  import-freebsd-freebsd11.4... ok
  import-freebsd-freebsd12.1... ok
  import-freebsd-freebsd12.2... ok
  import-freebsd-freebsd12.3... ok
  import-freebsd-freebsd13.0... ok
  import-freebsd-freebsd13.1... ok
  import-freebsd-freebsd13.2... ok
  import-redhat-cloudlinux7... ok
  import-redhat-fedora36... ok
  import-redhat-fedora37... ok
  import-redhat-fedora38... ok
  import-redhat-rhel8... ok
  import-redhat-rhel9... ok
  import-suse-leapmicro5.3... ok
  import-suse-leapmicro5.4... ok
  import-suse-leapmicro5.5... ok
  import-suse-opensuse15.0... ok
  import-suse-opensuse15.1... ok
  import-suse-opensuse15.2... ok
  import-suse-opensuse15.3... ok
  import-suse-opensuse15.4... ok
  import-suse-opensuse15.5... ok
  import-suse-slemicro5.3... ok
  import-suse-slemicro5.4... ok
  import-suse-slemicro5.5... ok
  import-suse-sles15sp2... ok
  import-suse-sles15sp3... ok
  import-suse-sles15sp4... ok
  import-suse-sles15sp5... ok
  import-ubuntu-bionic... ok
  import-ubuntu-focal... ok
  import-ubuntu-groovy... ok
  import-ubuntu-hirsute... ok
  import-ubuntu-impish... ok
  import-ubuntu-jammy... ok
  import-ubuntu-kinetic... ok
  import-ubuntu-lunar... ok
  import-ubuntu-mantic... ok
  import-ubuntu-trusty... ok
  import-ubuntu-xenial... ok
  import-vmware-esxi70... ok
  import-xen-xenserver720... ok
  settings-cli-automigrate-disable... ok
  settings-cli-automigrate-enable... ok
  settings-cli-migrate... ok
  settings-cli-migrate-from-2.8.5... ok
  settings-cli-modify-bool... ok
  settings-cli-modify-dict... ok
  settings-cli-modify-float... ok
  settings-cli-modify-int... ok
  settings-cli-modify-list... ok
  settings-cli-modify-str... ok
  settings-cli-verify... ok
  svc-autodetect... ok
  svc-autoinstall... ok
  svc-bootcfg... ok
  svc-bootcfg-esxi... ok
  svc-events... ok
  svc-find_autoinstall... ok
  svc-findks... ok
  svc-ipxe-image... ok
  svc-ipxe-profile... ok
  svc-ipxe-system... ok
  svc-ks... ok
  svc-list... ok
  svc-nopxe... ok
  svc-script... ok
  svc-settings... ok
  svc-template... ok
  svc-trig... ok
  svc-yum... ok

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 8, 2024
This reflects the job of the class much better.
The logic behind template_files and boot_files is slightly different, as such
we now only warn in case of bailing out of the tftpgen.
@SchoolGuy SchoolGuy force-pushed the feature/introduce-bootable-item branch from 69628e6 to 02802ff Compare August 8, 2024 16:46
Copy link
Contributor
@m-czernek m-czernek left a comment

Choose a reason for hiding this comment

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

This LGTM. I see we're now processing more templates since we merged template and boot files, but since this is a temporary measure (and the render part of the templating engine is actually not that computationally expensive), I'm OK with this. No nits from my side this time :))

@SchoolGuy SchoolGuy merged commit 1750f18 into main Aug 9, 2024
38 of 47 checks passed
@SchoolGuy SchoolGuy deleted the feature/introduce-bootable-item branch August 9, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API documentation Improvements or additions to documentation no changelog This doesn't need a changelog tests
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants
0