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

Remove OpenBSD from official support (code is kept in case) #64

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

lambdalisue
Copy link
Owner

@lambdalisue lambdalisue commented Nov 20, 2024

Close #65

Summary by CodeRabbit

  • Chores

    • Improved readability of the GitHub Actions workflow configuration.
    • Updated OpenBSD version from 7.5 to 7.6, while maintaining existing commands and structure.
    • Updated the action used in the workflow to a specific commit for enhanced stability.
  • Documentation

    • Clarified supported operating systems in the README, removing references to OpenBSD.
    • Updated the metrics table to reflect OpenBSD support and the process_cpu_seconds_total metric status.
    • Reformatted notes for clarity regarding the process_cpu_seconds_total metric and its previous behavior.

Copy link

coderabbitai bot commented Nov 20, 2024

Walkthrough

The pull request modifies the GitHub Actions workflow file .github/workflows/test.yml, specifically updating the test-cross-platform job's matrix configuration. The include section has been reformatted for improved readability, with each operating system listed on separate lines. The version for openbsd has been updated from "7.5" to "7.6". The uses directive has been changed to a specific commit hash. The overall structure and logic of the workflow remain unchanged, with no alterations to job execution or error handling.

Changes

File Change Summary
.github/workflows/test.yml Reformatted test-cross-platform job's matrix configuration for readability; updated openbsd version to "7.6"; updated uses directive to a specific commit hash; no changes to job logic or error handling.
README.md Updated the description of the metrics-process crate to clarify support for OpenBSD; modified the metrics table to indicate OpenBSD support; restructured notes on process_cpu_seconds_total metric for clarity.

Possibly related PRs

  • Add FreeBSD support #53: This PR adds FreeBSD support and modifies the .github/workflows/test.yml file to include a new job for FreeBSD testing, which is directly related to the changes made in the main PR regarding the workflow file.
  • Make CI cache specific to actual build system #56: This PR also modifies the .github/workflows/test.yml file to add a job for FreeBSD testing, which aligns with the updates in the main PR related to the workflow configuration.
  • Add OpenBSD support #59: This PR introduces OpenBSD support and updates the .github/workflows/test.yml file to enhance cross-platform testing capabilities, which is relevant to the changes made in the main PR regarding the workflow file.

🐰 In the garden, changes bloom,
With workflows neat, there's more room.
OpenBSD's version stands tall,
In the matrix, we heed the call.
A hop, a skip, all tasks align,
In our CI, everything's fine! 🌼


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 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

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.68%. Comparing base (f5a52df) to head (11f6942).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #64   +/-   ##
=======================================
  Coverage   55.68%   55.68%           
=======================================
  Files           5        5           
  Lines         264      264           
=======================================
  Hits          147      147           
  Misses        117      117           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@lambdalisue lambdalisue changed the title Update OpenBSD version to 7.6 in GitHub Actions Remove OpenBSD from official support (code is kept in case) Nov 21, 2024
Because we cannot fix the CI issue on OpenBSD and we cannot support it.
In case, we keep the code for OpenBSD but it is not tested and we cannot
guarantee its correctness.
Copy link

@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: 0

🧹 Outside diff range and nitpick comments (2)
README.md (2)

37-38: Consider adding future support status clarification

The note about OpenBSD code existence and testing status is clear. Consider adding a brief statement about whether OpenBSD support might be reinstated in the future, given that cross-platform-actions now supports OpenBSD 7.6.

 Go ([client_golang]) provides. Note that code for OpenBSD exists but is not
-tested and we cannot guarantee its correctness.
+tested and we cannot guarantee its correctness. Support may be reinstated in future versions.

42-44: Enhance version compatibility note clarity

While technically accurate, the note about version compatibility could be more explicit about the impact of the change.

-> Prior to version 2.0.0, the `process_cpu_seconds_total` metric was Gauge
-> instead of Counter. Enable `use-gauge-on-cpu-seconds-total` feature to use the
-> previous behavior.
+> Breaking change in 2.0.0: The `process_cpu_seconds_total` metric changed from Gauge
+> to Counter type. To maintain compatibility with pre-2.0.0 behavior, enable the
+> `use-gauge-on-cpu-seconds-total` feature.
🧰 Tools
🪛 LanguageTool

[style] ~42-~42: ‘Prior to’ might be wordy. Consider a shorter alternative.
Context: ...arantee its correctness. > [!NOTE] > > Prior to version 2.0.0, the `process_cpu_seconds...

(EN_WORDINESS_PREMIUM_PRIOR_TO)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 50dffea and 11f6942.

📒 Files selected for processing (2)
  • .github/workflows/test.yml (2 hunks)
  • README.md (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test.yml
🧰 Additional context used
🪛 LanguageTool
README.md

[style] ~42-~42: ‘Prior to’ might be wordy. Consider a shorter alternative.
Context: ...arantee its correctness. > [!NOTE] > > Prior to version 2.0.0, the `process_cpu_seconds...

(EN_WORDINESS_PREMIUM_PRIOR_TO)


[style] ~58-~58: Using many exclamation marks might seem excessive (in this case: 7 exclamation marks for a text that’s 4961 characters long)
Context: ... | | x | | > [!NOTE] > > If you only need to compile th...

(EN_EXCESSIVE_EXCLAMATION)

🔇 Additional comments (3)
README.md (3)

11-13: LGTM: Support statement accurately updated

The removal of OpenBSD from the list of officially supported platforms aligns with the PR objectives while maintaining clarity about supported platforms.


60-62: LGTM: Clear documentation for non-supported platforms

The explanation of the dummy feature is clear and helpful for users working with non-supported platforms.


46-56: Verify OpenBSD support matrix accuracy

The support matrix clearly shows OpenBSD in parentheses and marks supported features. However, we should verify if the marked support status matches the actual code capabilities.

✅ Verification successful

Let's first identify the relevant files before searching for specific metrics. The previous command might have failed because we piped an empty result to xargs. Let's break this down into steps to better understand the codebase structure.


Now let's look at the actual implementation to verify the supported metrics in OpenBSD.


Support matrix accurately reflects OpenBSD implementation

The support matrix in the README.md is accurate. The OpenBSD implementation in src/collector/openbsd.rs and the test case test_collect_internal_ok_openbsd confirm that OpenBSD supports exactly the metrics marked in the table:

  • ✓ process_cpu_seconds_total
  • ✓ process_max_fds
  • ✓ process_resident_memory_bytes
  • ✓ process_start_time_seconds

The implementation explicitly documents the unsupported metrics in its TODO comment, which aligns with the blank entries in the table for:

  • process_open_fds
  • process_virtual_memory_bytes
  • process_virtual_memory_max_bytes
  • process_threads
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for OpenBSD-specific implementations of the marked metrics
rg -l "openbsd" --type rust | xargs rg "process_(cpu_seconds_total|max_fds|resident_memory_bytes|start_time_seconds)"

Length of output: 117


Script:

#!/bin/bash
# First, let's find all Rust files that might contain OpenBSD-related code
rg -l -i "openbsd|bsd" --type rust

# Then let's look for process metric implementations in those files
rg -l "process_" --type rust

Length of output: 191


Script:

#!/bin/bash
# Let's examine the OpenBSD collector implementation specifically
cat src/collector/openbsd.rs

# And check the collector trait definition to understand expected metrics
cat src/collector.rs

Length of output: 7854

@lambdalisue lambdalisue merged commit e62acd8 into main Nov 21, 2024
12 checks passed
@lambdalisue lambdalisue deleted the fix-ci branch November 21, 2024 16:52
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.

Build failure on OpenBSD?
1 participant