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

ignore the pr - testing something #75

Conversation

AdamKaabyia
Copy link
Contributor

@AdamKaabyia AdamKaabyia commented Mar 3, 2025

Summary by CodeRabbit

  • New Features

    • Enhanced operator deployment with customizable configuration options for node features, GPU, and network management.
    • Introduced mechanisms for PCI device configuration and GPU stress testing to improve operational performance.
  • Chores

    • Upgraded dependencies and logging components for increased stability and performance.
  • Refactor

    • Streamlined deployment and configuration workflows to enhance clarity and maintainability.

Guy Gordani and others added 30 commits December 25, 2024 09:06
2. nfd consts put in nfd package and imported
2. used UndefinedValue const in gpu test instead of the string "undefined"
… also logging adjusted accordingly so once you change the time const the loging automatically is updated
2. fixed nfd consts names
3.fixed nfd var bug - create instance per package not global nfd
Bumps the go_modules group with 1 update: [github.com/golang/glog](https://github.com/golang/glog).


Updates `github.com/golang/glog` from 1.2.0 to 1.2.4
- [Release notes](https://github.com/golang/glog/releases)
- [Commits](golang/glog@v1.2.0...v1.2.4)

---
updated-dependencies:
- dependency-name: github.com/golang/glog
  dependency-type: direct:production
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <[email protected]>
NFD vars seperated in gpu and nno

NFD consts seperated in gpu and nno

1.nfd package created
2. nfd consts put in nfd package and imported

1.common consts added to nfd consts even tho theyre not nfd
2. used UndefinedValue const in gpu test instead of the string "undefined"

put the consts of nfd package in its correct directory not in the tests package, and adjusted imports

put the vars of nfd package in its correct directory not in the tests package, and adjusted imports

gpu consts put in the gpu package and names adjusted to remove redundant info

added some time consts in the consts file of the package of nvidiagpu also logging adjusted accordingly so once you change the time const the loging automatically is updated

added a 2 consts to the nfd package and used them

1. seperated global variables from nfd vars
2. fixed nfd consts names
3.fixed nfd var bug - create instance per package not global nfd
… both nno and nvidiagpu via image are called CustomConfig
bash-3.2$ make run-tests
test -s gpu-operator-must-gather.sh || (\
    		SCRIPT_URL="https://raw.githubusercontent.com/NVIDIA/gpu-operator/v23.9.1/hack/must-gather.sh" && \
    		if ! curl -SsL -o gpu-operator-must-gather.sh -L $SCRIPT_URL; then \
    			echo "Failed to download must-gather script" >&2; \
    			exit 1; \
    		fi && \
    		chmod +x gpu-operator-must-gather.sh \
    	)
Executing nvidiagpu test-runner script
scripts/test-runner.sh
PATH_TO_MUST_GATHER_SCRIPT=/Users/walid/GitHub/RH-ECOSYSTEM-EDGE/nvidia-ci-Adam-PR55-NFD-refactoring-020525/nvidia-ci/gpu-operator-must-gather.sh ginkgo -timeout=24h --keep-going --require-suite -r --trace --label-filter="nno" ./tests/nvidianetwork
Failed to compile nvidianetwork:

# github.com/rh-ecosystem-edge/nvidia-ci/tests/nvidianetwork [github.com/rh-ecosystem-edge/nvidia-ci/tests/nvidianetwork.test]
./deploy-nno-test.go:35:8: not enough arguments in call to nfd.NewConfig
	have ()
	want (string)
./deploy-nno-test.go:187:9: Nfd.CustomCatalogSourceIndexImage undefined (type *nfd.Config has no field or method CustomCatalogSourceIndexImage)
./deploy-nno-test.go:192:9: Nfd.CreateCustomCatalogsource undefined (type *nfd.Config has no field or method CreateCustomCatalogsource)
./deploy-nno-test.go:194:9: Nfd.CustomCatalogSource undefined (type *nfd.Config has no field or method CustomCatalogSource)
./deploy-nno-test.go:196:10: Nfd.CustomCatalogSource undefined (type *nfd.Config has no field or method CustomCatalogSource)
./deploy-nno-test.go:201:9: Nfd.CreateCustomCatalogsource undefined (type *nfd.Config has no field or method CreateCustomCatalogsource)
./deploy-nno-test.go:229:9: Nfd.CleanupAfterInstall undefined (type *nfd.Config has no field or method CleanupAfterInstall)
./deploy-nno-test.go:239:13: Nfd.CreateCustomCatalogsource undefined (type *nfd.Config has no field or method CreateCustomCatalogsource)
./deploy-nno-test.go:241:24: Nfd.CustomCatalogSource undefined (type *nfd.Config has no field or method CustomCatalogSource)
./deploy-nno-test.go:243:46: Nfd.CustomCatalogSource undefined (type *nfd.Config has no field or method CustomCatalogSource)
./deploy-nno-test.go:243:46: too many errors

Ginkgo ran 1 suite in 1.46310275s

Test Suite Failed
make: *** [run-tests] Error 1
bash-3.2$
2.createNFDDeployment adjusted and moved to the deploy package

these things both were common in the nno and gpu test thus adjusted accordingly

deploy-gpu-test.go without scaling passed
…urn test

* the gpu burn test passed on a single node cluster
* the gpu burn test passed on a single node cluster
…ncerns)

pkg/nfd: Manages NFD resource creation and verification

pkg/nfdcheck: Verifies that NFD is correctly installed and configured

* the gpu burn test passed on a single node cluster
added comments

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…nternal from pkg

added these funcs:
EnsureNFDIsInstalled
DeployNFDOperatorWithRetries

1.gpu-used the new funcs here
2.nno - havent added them here yet

* the gpu burn test passed on a single node cluster

DeleteOLMPods- needs to be put in a diffrent package its currently in nfd pkg
@openshift-ci openshift-ci bot requested review from ggordaniRed and ybettan March 3, 2025 12:38
Copy link

openshift-ci bot commented Mar 3, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AdamKaabyia
Once this PR has been reviewed and has the lgtm label, please assign ggordanired for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

coderabbitai bot commented Mar 3, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The changes update dependency versions in go.mod, adjust logging and configuration structures, and refactor package naming. Several new files were introduced to support enhanced configuration management for Node Feature Discovery and the NVIDIA GPU operator, including new constants, structs, and helper methods. Refactoring in test files aligns variable names and usage. Minor documentation fixes and cross-platform logging improvements were also made in vendor files.

Changes

File(s) Change Summary
go.mod Updated dependency versions: glog from v1.2.0 → v1.2.4; added gopkg.in/yaml.v2 v2.4.0, removed an indirect yaml dependency.
internal/nvidiagpuconfig/config.go, internal/nvidianetworkconfig/config.go Added comment // should this be here? to the NFDFallbackCatalogsourceIndexImage field in both GPU and Network configs.
pkg/global/const.go New file defining global constants: UndefinedValue, OperatorVersionFile, and OpenShiftVersionFile.
pkg/nfd/config.go New file introducing CustomConfig and NfdParams structs with a constructor for default initialization.
pkg/nfd/consts.go New constants file for NFD operator: publisher names, labels, namespaces, and various timeout/check interval constants.
pkg/nfd/deploy-nfd.go Changed package name from deploy to nfd, reformatted error logging, and added the CreateNFDDeployment function.
pkg/nfd/nodefeaturediscovery.go Adjusted logging (using LogLevel) and added UpdatePciDevices method along with helper isValidHexString.
pkg/nfd/nodefeaturediscoveryconfig.go New configuration file defining Config, CPUConfig, PCIDevice, and Sources types with YAML marshalling/unmarshalling methods.
pkg/nfd/utils.go New file providing functions: EnsureNFDIsInstalled, DeployNFDOperatorWithRetries, and DeleteOLMPods to manage NFD operator deployment.
pkg/nfdcheck/checknfd.go Introduced the CheckNfdInstallation function to verify node labels and NFD deployment readiness.
pkg/nvidiagpu/consts.go New file with constants for the NVIDIA GPU operator including timeouts, default values, and identifiers.
pkg/nvidiagpu/gpuBurnConfig.go New file defining the GPUBurnConfig struct and a default initializer (NewDefaultGPUBurnConfig) for GPU burn tests.
tests/nvidiagpu/deploy-gpu-test.go Renamed and restructured variables for clarity in GPU tests (e.g., InstallPlanApproval, WorkerNodeSelector, BurnImageName, etc.).
tests/nvidianetwork/deploy-nno-test.go Renamed and restructured variables to standardize configuration for NNO tests, using the new Nfd configuration object.
vendor/github.com/golang/glog/*
vendor/modules.txt
Corrected documentation and improved log file creation in glog (with cross-platform helper functions) along with updating the glog module version.

Sequence Diagram(s)

sequenceDiagram
    participant Client as API Client
    participant NFD as NFD Utils
    participant Deploy as Deployment Manager
    participant Catalog as CatalogSource

    Client->>NFD: EnsureNFDIsInstalled()
    alt NFD not installed
        NFD->>Catalog: Check package manifest
        Catalog-->>NFD: Manifest result
        NFD->>Deploy: CreateNFDDeployment()
        Deploy-->>NFD: Deployment status
        NFD->>NFD: If needed, call DeleteOLMPods()
    else NFD installed
        NFD-->>Client: Return installed status
    end
Loading

Poem

I'm a bunny on the run,
Hopping through code under the sun,
New configs and logs all in line,
Constants and methods now so fine,
With a twitch of my nose, I cheer—changes divine!
🐇✨


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7d2847d and ba84157.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (20)
  • go.mod (2 hunks)
  • internal/nvidiagpuconfig/config.go (1 hunks)
  • internal/nvidianetworkconfig/config.go (1 hunks)
  • pkg/global/const.go (1 hunks)
  • pkg/nfd/config.go (1 hunks)
  • pkg/nfd/consts.go (1 hunks)
  • pkg/nfd/deploy-nfd.go (7 hunks)
  • pkg/nfd/nodefeaturediscovery.go (12 hunks)
  • pkg/nfd/nodefeaturediscoveryconfig.go (1 hunks)
  • pkg/nfd/utils.go (1 hunks)
  • pkg/nfdcheck/checknfd.go (1 hunks)
  • pkg/nvidiagpu/consts.go (1 hunks)
  • pkg/nvidiagpu/gpuBurnConfig.go (1 hunks)
  • tests/nvidiagpu/deploy-gpu-test.go (28 hunks)
  • tests/nvidianetwork/deploy-nno-test.go (17 hunks)
  • vendor/github.com/golang/glog/glog.go (1 hunks)
  • vendor/github.com/golang/glog/glog_file.go (6 hunks)
  • vendor/github.com/golang/glog/glog_file_nonwindows.go (1 hunks)
  • vendor/github.com/golang/glog/glog_file_windows.go (1 hunks)
  • vendor/modules.txt (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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.
  • @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

openshift-ci bot commented Mar 3, 2025

Hi @AdamKaabyia. Thanks for your PR.

I'm waiting for a rh-ecosystem-edge member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@AdamKaabyia AdamKaabyia closed this Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants