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

Update AWS SDK to 1.x #684

Merged
merged 1 commit into from
Mar 3, 2024
Merged

Conversation

aaronmondal
Copy link
Member

@aaronmondal aaronmondal commented Mar 1, 2024

The main change here is that we no longer differentiate between "other" and Unhandled errors. The distinction didn't make sense in the first place and is now handled uniformly as a retry case.

Towards #460


This change is Reviewable

Copy link

vercel bot commented Mar 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nativelink-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 3, 2024 3:05am

Copy link
Member Author

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

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

+@allada +@adam-singer

Reviewable status: 0 of 2 LGTMs obtained, and pending CI: Analyze (javascript-typescript), Analyze (python), Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Local / ubuntu-22.04, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, pre-commit-checks, publish-image, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, vale, windows-2022 / stable, zig-cc ubuntu-20.04, zig-cc ubuntu-22.04 (waiting on @adam-singer and @allada)

Copy link
Member

@allada allada left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 11 of 11 files at r1, all commit messages.
Reviewable status: 1 of 2 LGTMs obtained, and pending CI: Bazel Dev / ubuntu-22.04, Cargo Dev / ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), zig-cc ubuntu-20.04, zig-cc ubuntu-22.04 (waiting on @adam-singer)


nativelink-store/src/s3_store.rs line 205 at r1 (raw file):

                match result {
                    Ok(head_object_output) => match head_object_output.content_length {
                        Some(nonneg_val) if nonneg_val >= 0 => {

nit: This is really hard to read. Can we do this as:

Ok(head_object_output) => {
    let Some(val) = head_object_output.content_length else {
        return Some((RetryResult::Ok(None), state)); // Retry.
    }
    if val >= 0 {
        return Some((RetryResult::Ok(Some(nonneg_val as usize)), state));
    }
    return Some((
        RetryResult::Err(make_err!(
            Code::InvalidArgument,
            "Negative content length in S3: {nonneg_val:?}",
        )),
        state,
    ));
},

Copy link
Member

@allada allada left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 6 files at r2.
Reviewable status: 1 of 2 LGTMs obtained, and pending CI: Bazel Dev / ubuntu-22.04 (waiting on @adam-singer)


nativelink-store/src/s3_store.rs line 206 at r2 (raw file):

                    Ok(head_object_output) => {
                        let Some(length) = head_object_output.content_length else {
                            return Some((RetryResult::Ok(None), state)); // Retry.

nit: Opps this is not a Retry.

The main change here is that we no longer differentiate between "other"
and `Unhandled` errors. The distinction didn't make sense in the first
place and is now handled uniformly as a retry case.
Copy link
Member Author

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

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

-@adam-singer

Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained

@aaronmondal aaronmondal merged commit cd78ed2 into TraceMachina:main Mar 3, 2024
26 checks passed
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.

3 participants