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

Reduce unnecessary temporary list creation #2061

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Conversation

dirkmueller
Copy link
Member

postfix temporary lists are hard to read and slow the code down (not that would matter). Plus, it produces headaches.

src/bci_build/package/__init__.py Show resolved Hide resolved

return None
build_name = f"{self.registry_prefix}/{self.name}-{self.stability_tag or self._tag_variant}"
Copy link
Member

Choose a reason for hiding this comment

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

nit: having an or in string formatting is also not that readable IMHO

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'm not sure what the 👎 means but I can remove this part, it wasn't related to the commit message.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The 👎 mean that I disagree. I find the code like this easier to understand

postfix temporary lists are hard to read and slow the code down (not
that would matter). Plus, it produces headaches.
dcermak pushed a commit that referenced this pull request Nov 26, 2024
Copy link

github-actions bot commented Nov 26, 2024

Created a staging project on OBS for 16.0: home:defolos:BCI:Staging:16.0:16.0-2061
Changes pushed to branch 16.0-2061 as commit 00a2001f74befff7c42e064c089831ad41494325
Build succeeded ✅

Build Results

Repository images in home:defolos:BCI:Staging:16.0:16.0-2061 for x86_64: current state: published
Build results:

package name status build log
gcc-14-image ⛔ excluded live log
init-image ⛔ excluded live log
kiwi-image ⛔ excluded live log
sle16-kernel-module-devel-image ⛔ excluded live log

Repository images in home:defolos:BCI:Staging:16.0:16.0-2061 for aarch64: current state: published
Build results:

package name status build log
gcc-14-image ⛔ excluded live log
init-image ⛔ excluded live log
kiwi-image ⛔ excluded live log
sle16-kernel-module-devel-image ⛔ excluded live log

Repository images in home:defolos:BCI:Staging:16.0:16.0-2061 for s390x: current state: published
Build results:

package name status build log
gcc-14-image ⛔ excluded live log
init-image ⛔ excluded live log
kiwi-image ⛔ excluded live log
sle16-kernel-module-devel-image ⛔ excluded live log

Repository images in home:defolos:BCI:Staging:16.0:16.0-2061 for ppc64le: current state: published
Build results:

package name status build log
gcc-14-image ⛔ excluded live log
init-image ⛔ excluded live log
kiwi-image ⛔ excluded live log
sle16-kernel-module-devel-image ⛔ excluded live log

Repository containerfile in home:defolos:BCI:Staging:16.0:16.0-2061 for x86_64: current state: published
Build results:

package name status build log
gcc-14-image ✅ succeeded live log
init-image ✅ succeeded live log
kiwi-image ✅ succeeded live log
sle16-kernel-module-devel-image ✅ succeeded live log

Repository containerfile in home:defolos:BCI:Staging:16.0:16.0-2061 for aarch64: current state: published
Build results:

package name status build log
gcc-14-image ✅ succeeded live log
init-image ✅ succeeded live log
kiwi-image ✅ succeeded live log
sle16-kernel-module-devel-image ✅ succeeded live log

Repository containerfile in home:defolos:BCI:Staging:16.0:16.0-2061 for s390x: current state: published
Build results:

package name status build log
gcc-14-image ✅ succeeded live log
init-image ✅ succeeded live log
kiwi-image ✅ succeeded live log
sle16-kernel-module-devel-image ✅ succeeded live log

Repository containerfile in home:defolos:BCI:Staging:16.0:16.0-2061 for ppc64le: current state: published
Build results:

package name status build log
gcc-14-image ✅ succeeded live log
init-image ✅ succeeded live log
kiwi-image ✅ succeeded live log
sle16-kernel-module-devel-image ✅ succeeded live log

Build succeeded ✅

To run BCI-tests against this PR, use the following command:

OS_VERSION=16.0 TARGET=custom BASEURL=registry.opensuse.org/home/defolos/bci/staging/16.0/16.0-2061/ tox -- -n auto
The following images can be pulled from the staging project:
  • registry.opensuse.org/home/defolos/bci/staging/16.0/16.0-2061/containerfile/bci/bci-init:16.0
  • registry.opensuse.org/home/defolos/bci/staging/16.0/16.0-2061/containerfile/bci/bci-sle16-kernel-module-devel:16.0
  • registry.opensuse.org/home/defolos/bci/staging/16.0/16.0-2061/containerfile/bci/gcc:14
  • registry.opensuse.org/home/defolos/bci/staging/16.0/16.0-2061/containerfile/bci/kiwi:10

@dirkmueller dirkmueller merged commit a0f8a8b into main Nov 26, 2024
9 checks passed
@dirkmueller dirkmueller deleted the headache_reduction branch November 26, 2024 16:31
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.

3 participants