Skip to content

Fixing failing AWS integration tests #654

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

Merged
merged 5 commits into from
Apr 16, 2025

Conversation

varant-zlai
Copy link
Collaborator

@varant-zlai varant-zlai commented Apr 16, 2025

Summary

I think this is the fix for the failing CI test -- we now require this to be set to create airflow deps.

Checklist

  • Added Unit Tests
  • Covered by existing CI
  • Integration tested
  • Documentation update

Summary by CodeRabbit

  • Bug Fixes

    • Improved error handling when accessing the partition column configuration, preventing unexpected errors if the configuration is missing.
  • Tests

    • Added a default partition column configuration for teams to enhance test coverage.

Copy link

coderabbitai bot commented Apr 16, 2025

Walkthrough

The changes introduce error handling to the extract_default_partition_column function, ensuring it safely returns None if the partition column configuration is missing or inaccessible, rather than raising an exception. Additionally, the test configuration for a default team is updated to explicitly include a spark.chronon.partition.column setting within its configuration properties. The Thrift definition is updated by importing an external file, renaming a field, removing a local struct, and changing a field type to use the imported struct.

Changes

File(s) Change Summary
api/python/ai/chronon/airflow_helpers.py Wrapped partition column extraction in try-except; returns None on error; added explanatory comment.
api/python/test/canary/teams.py Added conf property to default Team with spark.chronon.partition.column set to "ds".
api/thrift/agent.thrift Imported common.thrift; renamed YarnJob.argsargsList; removed DatePartitionRange; changed PartitionListingPutRequest.partitions to use common.DateRange.

Suggested reviewers

  • chewy-zlai

Poem

In code we trust, exceptions we tame,
Wrapping the risky, no one to blame.
A config appears, partition in tow,
Now tests can confirm where the data should go.
With careful control, the errors are gone—
Onward and upward, Chronon marches on! 🚀

Warning

Review ran into problems

🔥 Problems

GitHub Actions and Pipeline Checks: Resource not accessible by integration - https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository.

Please grant the required permissions to the CodeRabbit GitHub App under the organization or repository settings.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between f087fab and 97d4a82.

📒 Files selected for processing (1)
  • api/thrift/agent.thrift (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (20)
  • GitHub Check: service_tests
  • GitHub Check: service_commons_tests
  • GitHub Check: cloud_gcp_tests
  • GitHub Check: cloud_aws_tests
  • GitHub Check: service_tests
  • GitHub Check: online_tests
  • GitHub Check: online_tests
  • GitHub Check: hub_tests
  • GitHub Check: hub_tests
  • GitHub Check: flink_tests
  • GitHub Check: flink_tests
  • GitHub Check: aggregator_tests
  • GitHub Check: cloud_gcp_tests
  • GitHub Check: api_tests
  • GitHub Check: api_tests
  • GitHub Check: cloud_aws_tests
  • GitHub Check: aggregator_tests
  • GitHub Check: orchestration_tests
  • GitHub Check: orchestration_tests
  • GitHub Check: enforce_triggered_workflows
🔇 Additional comments (3)
api/thrift/agent.thrift (3)

2-2: External Thrift import added.

Import enables replacing local type with common one.


127-127:

✅ Verification successful

Standardized date range type.

Changed from local DatePartitionRange to imported common.DateRange.

Verify field compatibility between old and new types:


🏁 Script executed:

#!/bin/bash
# Look for the common.thrift definition to check structure
cat api/thrift/common.thrift | grep -A 10 "struct DateRange"

Length of output: 409


Compatibility Verified: Using common.DateRange.

  • Verified that common.DateRange (defined in api/thrift/common.thrift) contains startDate and endDate.
  • The change from local DatePartitionRange to common.DateRange is compatible with expected field definitions.

37-37:

✅ Verification successful

Field renamed for clarity.

Renamed args to argsList to better describe the list type.

This rename may break client code. Verify all references have been updated.


🏁 Script executed:

#!/bin/bash
# Search for references to old field name in code
rg "args" --type py --type java --type scala | grep -v "argsList"

Length of output: 64303


Action: Verify client usage of renamed Thrift field

The grep results show many instances of “args” in various files. However, none of these appear to be direct references to the old Thrift field in api/thrift/agent.thrift. Most “args” occurrences are clearly local parameters or unrelated usage. Based on this search, it appears that client code referencing the generated field has been updated accordingly.

Please double-check that any client code accessing the Thrift object (via getters like getArgs()) has been adjusted to use the new accessor (e.g. getArgsList()). If your tests pass and the generated code is consistent, then this refactor should be safe.


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

@chewy-zlai chewy-zlai left a comment

Choose a reason for hiding this comment

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

I ran the dev test with this branch and it succeeded.

@david-zlai david-zlai merged commit 3cfd5eb into main Apr 16, 2025
24 checks passed
@david-zlai david-zlai deleted the vz--fix_forward_aws_test_failures branch April 16, 2025 21:12
kumar-zlai pushed a commit that referenced this pull request Apr 25, 2025
## Summary

I think this is the fix for the failing CI test -- we now require this
to be set to create airflow deps.

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved error handling when accessing the partition column
configuration, preventing unexpected errors if the configuration is
missing.

- **Tests**
- Added a default partition column configuration for teams to enhance
test coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ezvz <[email protected]>
kumar-zlai pushed a commit that referenced this pull request Apr 29, 2025
## Summary

I think this is the fix for the failing CI test -- we now require this
to be set to create airflow deps.

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved error handling when accessing the partition column
configuration, preventing unexpected errors if the configuration is
missing.

- **Tests**
- Added a default partition column configuration for teams to enhance
test coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ezvz <[email protected]>
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary

I think this is the fix for the failing CI test -- we now require this
to be set to create airflow deps.

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved error handling when accessing the partition column
configuration, preventing unexpected errors if the configuration is
missing.

- **Tests**
- Added a default partition column configuration for teams to enhance
test coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ezvz <[email protected]>
chewy-zlai pushed a commit that referenced this pull request May 15, 2025
## Summary

I think this is the fix for the failing CI test -- we now require this
to be set to create airflow deps.

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved error handling when accessing the partition column
configuration, preventing unexpected errors if the configuration is
missing.

- **Tests**
- Added a default partition column configuration for teams to enhance
test coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ezvz <[email protected]>
chewy-zlai pushed a commit that referenced this pull request May 16, 2025
## Summary

I think this is the fix for the failing CI test -- we now require this
to be set to create airflow deps.

## Cheour clientslist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved error handling when accessing the partition column
configuration, preventing unexpected errors if the configuration is
missing.

- **Tests**
- Added a default partition column configuration for teams to enhance
test coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ezvz <[email protected]>
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.

4 participants