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

Block broken lorax versions #152

Merged
merged 7 commits into from
Jan 2, 2025
Merged

Block broken lorax versions #152

merged 7 commits into from
Jan 2, 2025

Conversation

JasonN3
Copy link
Owner

@JasonN3 JasonN3 commented Dec 19, 2024

Some versions of lorax will remove all files installed by the package glibc into the directory /usr/sbin. This results in /sbin/ldconfig being removed because /sbin is a link to /usr/sbin. pyudev uses ctypes.util.find_library to find libudev and that function uses /sbin/ldconfig -p` to find the library.

Fixes: #151

Summary by CodeRabbit

  • Workflow Updates

    • Enhanced GitHub Actions workflows for build, test, and deployment processes
    • Improved job logging and context tracking by adding image repository and name details
  • Build Configuration

    • Updated Makefile to modify tag selection logic for lorax checkout
    • Excluded specific tag from automatic selection process

@JasonN3 JasonN3 added the bug Something isn't working label Dec 19, 2024
@JasonN3 JasonN3 self-assigned this Dec 19, 2024
@JasonN3
Copy link
Owner Author

JasonN3 commented Dec 19, 2024

/run tests

Copy link

@BramV122 BramV122 left a comment

Choose a reason for hiding this comment

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

Looks fine!

@JasonN3
Copy link
Owner Author

JasonN3 commented Dec 31, 2024

@JasonN3 JasonN3 changed the title Install missing udev package Block broken lorax versions Jan 2, 2025
@JasonN3
Copy link
Owner Author

JasonN3 commented Jan 2, 2025

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Jan 2, 2025

📝 Walkthrough

Walkthrough

The pull request introduces modifications to several GitHub Actions workflow files and an external Makefile. The changes primarily focus on enhancing job context and logging details in the workflows by including additional matrix parameters like image_repo and image_name. In the Makefile, a specific modification was made to the tag selection process for the lorax directory, adding a filter to exclude the 'lorax-40.5' tag when checking out the latest tag.

Changes

File Change Summary
.github/workflows/build_iso.yml Updated job_name and context to include matrix.image_repo and matrix.image_name in job logging steps
.github/workflows/test_deployment.yml Modified job context and status reporting to incorporate additional matrix variables image_repo and image_name
.github/workflows/test_iso.yml Enhanced context and job name strings with matrix parameters for improved traceability
external/Makefile Modified tag checkout command to exclude 'lorax-40.5' tag when selecting the latest tag for the lorax directory

Sequence Diagram

sequenceDiagram
    participant Workflow as GitHub Actions Workflow
    participant Matrix as Matrix Configuration
    participant Job as Job Execution
    
    Matrix->>Workflow: Provide image_repo and image_name
    Workflow->>Job: Incorporate matrix variables in job context
    Job->>Workflow: Execute with enhanced logging details
Loading

The sequence diagram illustrates how the matrix configuration now provides additional variables that are incorporated into the workflow's job context, enabling more detailed logging and traceability.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
external/Makefile (1)

3-3: Add a comment explaining the version block.

Add a comment above the line explaining why lorax-40.5 is blocked to prevent future confusion and maintain institutional knowledge.

lorax/branch-$(VERSION):
	git config advice.detachedHead false
+	# Block lorax-40.5 as it can remove /usr/sbin/ldconfig which breaks pyudev functionality
	cd lorax && git reset --hard HEAD && git checkout $(if $(_RHEL),rhel$(word 1,$(subst ., ,$(VERSION)))-branch,tags/$(shell cd lorax && git tag -l lorax-$(VERSION).* --sort=creatordate | grep -v 'lorax-40.5' | tail -n 1))
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f09a756 and 170810d.

📒 Files selected for processing (4)
  • .github/workflows/build_iso.yml (3 hunks)
  • .github/workflows/test_deployment.yml (3 hunks)
  • .github/workflows/test_iso.yml (3 hunks)
  • external/Makefile (1 hunks)
🔇 Additional comments (4)
.github/workflows/test_iso.yml (1)

55-55: LGTM! Enhanced job context improves observability.

The addition of image_repo and image_name to the job context strings provides better traceability without affecting the core functionality.

Also applies to: 64-64, 101-101

.github/workflows/test_deployment.yml (1)

55-55: LGTM! Consistent with test_iso.yml changes.

The job context string updates match those in test_iso.yml, maintaining consistency across workflows.

Also applies to: 64-64, 110-110

.github/workflows/build_iso.yml (2)

56-56: LGTM: Job context enrichment looks good.

The changes consistently enhance job naming and status context by including matrix.image_repo and matrix.image_name parameters across all relevant steps.

Also applies to: 65-65, 141-141


Line range hint 1-143: Verify the implementation of lorax version blocking.

While this workflow file's changes look correct, they don't address the PR's primary objective of blocking broken lorax versions that could remove /usr/sbin/ldconfig. The implementation for this critical fix should be verified.

Let's search for the lorax-related changes:

✅ Verification successful

Lorax version 40.5 is correctly blocked in the implementation

The verification confirms that the problematic lorax version 40.5 is properly blocked in external/Makefile. The implementation uses grep -v 'lorax-40.5' to explicitly exclude version 40.5 when selecting the lorax version to use:

cd lorax && git tag -l lorax-$(VERSION).* --sort=creatordate | grep -v 'lorax-40.5' | tail -n 1

This ensures that even if lorax version 40.5 is available, it will be filtered out during the version selection process, effectively preventing the use of the broken version that could remove /usr/sbin/ldconfig.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Look for lorax-related changes and version constraints
# Expected: Find implementation that blocks problematic lorax versions

# Search for lorax-related files and their content
echo "=== Files containing lorax references ==="
rg -l 'lorax'

echo -e "\n=== Lorax version constraints or tag filtering ==="
rg -i 'lorax.*(version|tag|4[0-9]\.5)'

echo -e "\n=== Makefile changes related to lorax ==="
rg 'lorax' -A 5 -B 5 '*.mk' 'Makefile*'

Length of output: 1151


Script:

#!/bin/bash
# Let's examine the external/Makefile more closely to understand the lorax version blocking implementation

echo "=== Examining lorax version blocking in external/Makefile ==="
cat external/Makefile

echo -e "\n=== Checking git history for recent lorax-related changes ==="
git log --oneline -p -- external/Makefile | grep -A 10 -B 10 'lorax'

Length of output: 822

external/Makefile Outdated Show resolved Hide resolved
@JasonN3 JasonN3 merged commit 362fea7 into main Jan 2, 2025
2 checks passed
@JasonN3 JasonN3 deleted the udev branch January 2, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] Anaconda installer f40 missing library udev
2 participants