Skip to content

Updated commit hash in ceph tests #9152

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

achouhan09
Copy link
Member

@achouhan09 achouhan09 commented Jul 22, 2025

Describe the Problem

After updating the ceph commit hash, s3 tests were failing for both NSFS and non-NSFS configurations. The failures were caused by missing required configuration fields that the updated ceph test suite expects.

Explain the Changes

  1. Added the missing fields in the config file with dummy values currently, we will update it in future when we support the functionality.
  2. Updated the commit hash to latest.
  3. Moved failing tests to pending list (Need to verify some tests).

ceph-s3 output:

Jul-22 15:15:06.701 [test_ceph_s3/182] [LOG] CONSOLE:: Finished Running Ceph S3 Tests
Jul-22 15:15:06.701 [test_ceph_s3/182] [INFO] CONSOLE:: CEPH TEST SUMMARY: Suite contains 1005, ran 430 tests, Passed: 291, Skipped: 139, Failed: 0
Jul-22 15:15:06.701 [test_ceph_s3/182] [WARN] CONSOLE:: CEPH TEST SKIPPED TESTS SUMMARY: 139 skipped tests

nsfs-ceph-s3 output:

Jul-22 16:43:03.672 [test_ceph_s3/121] [LOG] CONSOLE:: Finished Running Ceph S3 Tests
Jul-22 16:43:03.672 [test_ceph_s3/121] [INFO] CONSOLE:: CEPH TEST SUMMARY: Suite contains 1005, ran 369 tests, Passed: 230, Skipped: 139, Failed: 0
Jul-22 16:43:03.672 [test_ceph_s3/121] [WARN] CONSOLE:: CEPH TEST SKIPPED TESTS SUMMARY: 139 skipped tests

Issues: Fixed #xxx / Gap #xxx

  1. Fixed: https://issues.redhat.com/browse/MCGI-254

Testing Instructions:

  1. make test-cephs3 and make test-nsfs-cephs3
  • Doc added/updated
  • Tests added

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Expanded configuration options for Ceph S3 tests, including new IAM-related settings and structured sections for IAM accounts and credentials.
  • Chores

    • Updated the Ceph S3 tests repository to a newer version.
    • Improved configuration setup by standardizing key insertion through placeholder substitution.
    • Enhanced test selection filtering to target specific test identifiers.
    • Added numerous new test cases to pending test lists covering extensive S3 functionality.
  • Documentation

    • Added entries to pending tests documentation highlighting known AWS v2 signature issues due to botocore updates.

@achouhan09 achouhan09 requested review from nadavMiz, romayalon, a team and alphaprinz and removed request for a team July 22, 2025 11:36
Copy link

coderabbitai bot commented Jul 22, 2025

"""

Walkthrough

The changes update the Ceph S3 test configuration to include new IAM-related sections and keys, adjust the setup scripts to use placeholder substitution for access/secret keys via sed on macOS and other platforms, modify the test listing command to filter more precisely, expand pending test lists with many new entries, update the test deployment script to use a newer commit of the Ceph S3 tests repository, and add documentation entries for known test failures related to botocore updates. No core logic or control flow is altered.

Changes

File(s) Change Summary
src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf Added new IAM-related sections and keys to support IAM and sts-related tests.
src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js, Replaced direct key appending with placeholder substitution for access/secret keys using sed on macOS and others.
src/test/external_tests/ceph_s3_tests/test_ceph_nsfs_s3_config_setup.js
src/test/external_tests/ceph_s3_tests/test_ceph_s3.js Modified test listing command to filter lines containing "::test" instead of any "test".
src/test/external_tests/ceph_s3_tests/test_ceph_s3_deploy.sh Updated the Ceph S3 tests repository commit hash to a newer version.
src/test/external_tests/ceph_s3_tests/s3-tests-lists/*.txt Added numerous new test entries to expand pending test lists covering various S3 functionalities.
docs/dev_guide/ceph_s3_tests/ceph_s3_tests_pending_list_status.md Added documentation entries for two new pending tests related to botocore update breaking AWS v2 signature handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~40 minutes

Suggested labels

size/XS, Enable-Auto-Rebase

Suggested reviewers

  • liranmauda
    """

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-25T08_40_03_887Z-debug-0.log

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ca05916 and 2c03fd4.

📒 Files selected for processing (8)
  • docs/dev_guide/ceph_s3_tests/ceph_s3_tests_pending_list_status.md (1 hunks)
  • src/test/external_tests/ceph_s3_tests/s3-tests-lists/nsfs_s3_tests_pending_list.txt (1 hunks)
  • src/test/external_tests/ceph_s3_tests/s3-tests-lists/s3_tests_pending_list.txt (1 hunks)
  • src/test/external_tests/ceph_s3_tests/test_ceph_nsfs_s3_config_setup.js (1 hunks)
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3.js (1 hunks)
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf (2 hunks)
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js (1 hunks)
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_deploy.sh (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • docs/dev_guide/ceph_s3_tests/ceph_s3_tests_pending_list_status.md
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3.js
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_deploy.sh
  • src/test/external_tests/ceph_s3_tests/test_ceph_nsfs_s3_config_setup.js
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js
  • src/test/external_tests/ceph_s3_tests/s3-tests-lists/s3_tests_pending_list.txt
  • src/test/external_tests/ceph_s3_tests/s3-tests-lists/nsfs_s3_tests_pending_list.txt
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: run-package-lock-validation
  • GitHub Check: run-jest-unit-tests
  • GitHub Check: Build Noobaa Image
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests 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.

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

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

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 24e11b7 and eb679ea.

📒 Files selected for processing (3)
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf (2 hunks)
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js (1 hunks)
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_deploy.sh (1 hunks)
📓 Path-based instructions (1)
src/test/**/*.*

⚙️ CodeRabbit Configuration File

src/test/**/*.*: Ensure that the PR includes tests for the changes.

Files:

  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_deploy.sh
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf
🧰 Additional context used
📓 Path-based instructions (1)
src/test/**/*.*

⚙️ CodeRabbit Configuration File

src/test/**/*.*: Ensure that the PR includes tests for the changes.

Files:

  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_deploy.sh
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js
  • src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build Noobaa Image
  • GitHub Check: run-jest-unit-tests
🔇 Additional comments (4)
src/test/external_tests/ceph_s3_tests/test_ceph_s3_deploy.sh (1)

20-20: Validated new CEPH_TESTS_VERSION hash

  • The commit aafacab2017bec1dd1ce3159105455bb7e9447b1 exists in the ceph/s3-tests repository on master.
  • It is only 4 days old, well within the 600-day limit.

No further changes required.

src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js (1)

95-96: Good improvement in credential injection consistency.

The change from appending keys to replacing placeholders using sed improves consistency and aligns well with the updated config file structure. The OS-specific handling for macOS is correctly implemented.

Also applies to: 101-102

src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf (2)

22-28: LGTM: IAM naming configuration added.

The new IAM naming prefixes support the enhanced IAM functionality mentioned in the PR objectives.


62-63: LGTM: Tenant name configuration added.

The tenant field addition supports enhanced tenant testing capabilities.

Comment on lines +71 to +73
## replace these with your access keys
access_key = s3_access_key
secret_key = s3_secret_key
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify placeholder substitution doesn't conflict with main section.

The s3_access_key and s3_secret_key placeholders are also used in the [s3 main] section. Ensure the setup script correctly handles these duplicate placeholders and assigns appropriate values to each section.


🏁 Script executed:

#!/bin/bash
# Description: Check how s3_access_key and s3_secret_key placeholders are used across sections
# Expected: Should find usage in both [s3 main] and [s3 alt] sections

echo "Checking s3_access_key usage across config sections:"
rg -A 2 -B 2 "s3_access_key" src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf

echo -e "\nChecking s3_secret_key usage across config sections:"
rg -A 2 -B 2 "s3_secret_key" src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf

echo -e "\nChecking setup script for handling of these placeholders:"
rg -A 2 -B 2 "s3_access_key\|s3_secret_key" src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js

Length of output: 1130


🏁 Script executed:

#!/bin/bash
# List any setup-related files in the ceph_s3_tests directory
echo "Setup files under src/test/external_tests/ceph_s3_tests/:"
fd setup src/test/external_tests/ceph_s3_tests/

# Display the beginning of the setup script to inspect placeholder handling
echo -e "\n--- test_ceph_s3_config_setup.js (first 200 lines) ---"
sed -n '1,200p' src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js || echo "File not found or cannot be read"

Length of output: 5133


Ensure distinct placeholders for tenant credentials in the alt section

The setup script only replaces s3_access_key/s3_secret_key once, so both your main and alt sections end up using the same S3 account keys. To correctly assign tenant credentials, use separate placeholders in the [s3 alt] section or update the script:

• File: src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf

  • Around lines 71–73 in the [s3 alt] section, change:
    ## replace these with your access keys

-access_key = s3_access_key
-secret_key = s3_secret_key
+access_key = tenant_access_key
+secret_key = tenant_secret_key
```
• File: src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js

  • Verify it already replaces tenant_access_key/tenant_secret_key with the tenant’s keys (as it does) and that it still replaces s3_access_key/s3_secret_key for the primary account.

This change will ensure the alt tests receive the tenant’s credentials rather than the main S3 account’s.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## replace these with your access keys
access_key = s3_access_key
secret_key = s3_secret_key
## replace these with your access keys
access_key = tenant_access_key
secret_key = tenant_secret_key
🤖 Prompt for AI Agents
In src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf around lines
71 to 73 in the [s3 alt] section, replace the placeholders s3_access_key and
s3_secret_key with distinct placeholders like tenant_access_key and
tenant_secret_key. This ensures the alt section uses separate tenant
credentials. Also, verify in
src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js that
tenant_access_key and tenant_secret_key are replaced with tenant keys while
s3_access_key and s3_secret_key remain for the primary account.

Comment on lines +75 to +95
#following section needs to be added for all sts-tests
[iam]
#used for iam operations in sts-tests
#email from vstart.sh
email = ceph.alt@noobaa.com

#user_id from vstart.sh
user_id = 56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234

#access_key from vstart.sh
access_key = tenant_access_key

#secret_key vstart.sh
secret_key = tenant_secret_key

#display_name from vstart.sh
display_name = cephalt

Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify IAM section credentials don't conflict with other sections.

The [iam] section uses tenant_access_key and tenant_secret_key placeholders, which are also used in other sections. Additionally, the email ceph.alt@noobaa.com and user_id are shared with the [s3 alt] section, which might cause conflicts.


🏁 Script executed:

#!/bin/bash
# Description: Analyze credential and identifier reuse across config sections
# Expected: Should identify potential conflicts in email, user_id, and key placeholders

echo "Checking tenant_access_key usage across sections:"
rg -A 1 -B 1 "tenant_access_key" src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf

echo -e "\nChecking email address reuse:"
rg -A 1 -B 1 "ceph\.alt@noobaa\.com" src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf

echo -e "\nChecking user_id reuse:"
rg -A 1 -B 1 "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234" src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf

Length of output: 1542


Avoid Shared Credentials Across Sections

Multiple sections in src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf are reusing the same placeholders and identifiers, which will cause your IAM- and S3-related tests to run under the same identity:

• Access keys:
tenant_access_key appears in [default], [iam], [iam root], [iam alt root]
tenant_secret_key likewise
• Email:
ceph.alt@noobaa.com used in both the [s3 alt] and [iam] sections
• User ID:
56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234 repeated across multiple sections

Please assign unique placeholder values (or parameterize these via your test harness) so that each test section operates with its own credentials and avoids collisions.

🤖 Prompt for AI Agents
In src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf between lines
75 and 92, the configuration reuses the same placeholder credentials like
access_key, secret_key, email, and user_id across multiple sections, causing
identity collisions in tests. To fix this, assign unique placeholder values for
each section's access_key, secret_key, email, and user_id, or parameterize these
values through the test harness to ensure each test section uses distinct
credentials and avoids conflicts.

Comment on lines +93 to +108
# iam account root user for iam_account tests
[iam root]
access_key = tenant_access_key
secret_key = tenant_secret_key
user_id = 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
email = main.alt@noobaa.com

# iam account root user in a different account than [iam root]
[iam alt root]
access_key = tenant_access_key
secret_key = tenant_secret_key
user_id = 56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234
email = ceph.alt@noobaa.com
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Review root IAM account configuration for consistency.

Both [iam root] and [iam alt root] sections use tenant_access_key and tenant_secret_key placeholders. This means they will receive the same credentials from the setup script, which may not be the intended behavior for testing different root accounts.

Consider using distinct placeholder names for different root accounts to ensure they receive different credentials:

# iam account root user for iam_account tests
[iam root]
-access_key = tenant_access_key
-secret_key = tenant_secret_key
+access_key = iam_root_access_key
+secret_key = iam_root_secret_key
user_id = 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
email = main.alt@noobaa.com

# iam account root user in a different account than [iam root]
[iam alt root]
-access_key = tenant_access_key
-secret_key = tenant_secret_key
+access_key = iam_alt_root_access_key
+secret_key = iam_alt_root_secret_key
user_id = 56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234
email = ceph.alt@noobaa.com

This would require updating the setup script to handle these new placeholders appropriately.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf around lines
93 to 105, the [iam root] and [iam alt root] sections both use the same
placeholders tenant_access_key and tenant_secret_key, causing them to share
identical credentials. To fix this, rename the placeholders in the [iam alt
root] section to distinct names like alt_tenant_access_key and
alt_tenant_secret_key, and update the setup script accordingly to provide
different credentials for these placeholders, ensuring the two root accounts
have separate access keys and secret keys for proper testing.

@achouhan09 achouhan09 marked this pull request as draft July 22, 2025 12:40
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jul 22, 2025
@achouhan09 achouhan09 marked this pull request as ready for review July 23, 2025 04:56
@achouhan09 achouhan09 force-pushed the ceph-fix branch 4 times, most recently from 29e5498 to ca05916 Compare July 24, 2025 12:55
Signed-off-by: Aayush <aayush@li-2392f9cc-287a-11b2-a85c-9fcc04b05da6.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant