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 indirect project dependencies #3279

Merged
merged 15 commits into from
Jul 24, 2023

Conversation

stmcginnis
Copy link
Contributor

@stmcginnis stmcginnis commented Jul 21, 2023

Issue number:

N/A

Description of changes:

Several projects had dependencies listed in their Cargo.toml files that were not actually direct dependencies. As far as I could see, most of these were transient dependencies (dependencies of dependencies) that get pulled into the Cargo.lock file without needing to explicitly include them in Cargo.toml. This could result in pulling in, and building, a dependency that is no longer needed by the direct dependency that originally needed it.

This cleans up all identified instances to make sure we are only declaring what we directly need in each project.

Testing done:

Checked for extra dependencies with cargo machete.

Verified after removing dependencies that the project could still build:

# PROJECTS=[list of impacted project paths]
for project in $PROJECTS; do
    pushd "${p}"
    VARIANT=aws-k8s-1.26 cargo build
    popd
done

Checked for any issues with cargo make check.

Built aws-k8s-1.26 variant and deployed cluster node. Verified new node showed up healthy in the cluster.
Connected to node via SSM and ran several apiclient commands to make sure things were operating as expected:

apiclient get os
# output

apiclient set settings.aws.profile=joe
apiclient get settings.aws
# verified output

apiclient -u /settings
# output

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

There were a few dependencies listed in the apisever Cargo.toml file
that are not direct dependencies of the project. These may be indirect
dependencies, but they should not be explicitly called out in the
Cargo.toml file if they are not being directly used.

Signed-off-by: Sean McGinnis <[email protected]>
Removes indirect dependencies from the bootstrap-containers Cargo.toml
file.

Signed-off-by: Sean McGinnis <[email protected]>
Removes transient dependencies from being listed in the certdog
Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the corndog Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the datastore Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the host-containers Cargo.toml
file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the migration-helpers Cargo.toml
file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the migrator Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the settings-committer
Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the static-pods Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the sundog Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the cfsignal Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the imsdclient Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
This removes indirect dependencies from the model-derive Cargo.toml
file.

Signed-off-by: Sean McGinnis <[email protected]>
This remove indirect dependencies from the updog Cargo.toml file.

Signed-off-by: Sean McGinnis <[email protected]>
@stmcginnis stmcginnis requested a review from jpculp July 21, 2023 17:13
@stmcginnis stmcginnis merged commit 7787e93 into bottlerocket-os:develop Jul 24, 2023
38 checks passed
@stmcginnis stmcginnis deleted the cleanup-deps branch July 24, 2023 11:37
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