Azure / azure-sdk-for-rust

This repository is for active development of the *unofficial* Azure SDK for Rust. This repository is *not* supported by the Azure SDK team.
MIT License
692 stars 237 forks source link

Docs have failed to publish for some crates for several releases #1535

Closed krishanjmistry closed 8 months ago

krishanjmistry commented 8 months ago

This isn't an exhaustive list, but a few examples where I've noticed failures.

The docs for the generated crate azure_mgmt_network have failed to publish with the message recursive without indirection. Links to docs.rs follow:

There's been some work in the past to counteract this - notably the properties.boxed section of the autorust.toml file. However, the source of failure here is introduction of new tags. The tags are taken from the README in the spec: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/network/resource-manager/readme.md

The tag which is currently failing is profile_hybrid_2020_09_01 - there's a question here as to whether this tag needs to be generated at all. However, it's also worth noting that the latest tag now is package-2023-09 - which was released last week. When the Rust SDK crates are regenerated with the latest specs, this will be another faulty tag.

Another example I found whilst running cargo clippy --all-features locally was on the azure_mgmt_hardwaresecuritymodules crate. This time, docs have failed to publish since version 0.12 due to multiple definitions of models within the preview tags.

It's worth noting that something like this would have been spotted by cargo clippy --all-features or `cargo check - something the GitHub actions which currently run don't do.

cataggar commented 8 months ago

Good idea. We have a ~Geneva~ GitHub Action that you can run from the Actions tab in any fork for any branch named check-all-services. May be we could add one named clippy-all-services.

It would be good to run after updating the services. After new versions are published, you can monitor the failures at https://docs.rs/releases/recent-failures .

demoray commented 8 months ago

Do you mean github-action?

demoray commented 8 months ago

This should fix the issues, but does not ensure the issue is fixed long term.

https://github.com/Azure/azure-sdk-for-rust/pull/1545

krishanjmistry commented 8 months ago

It would be good to run after updating the services. May be we could add one named clippy-all-services

Is there any reason we're not just updating the github-actions that run in all PR's to run cargo clippy --all-features instead? That way, any change that goes in meets this quality bar and there's less action on the user to run any actions manually.

krishanjmistry commented 8 months ago

This isn't isolated to generated services either... although a slight variation

These originate from a minor discrepancy between enable_request_rustls and enable_reqwest_rustls in the [package.metadata.docs.rs]

[features]
default = ["enable_reqwest", "hmac_rust"]
hmac_rust = ["azure_core/hmac_rust"]
hmac_openssl = ["azure_core/hmac_openssl"]
enable_reqwest = ["azure_core/enable_reqwest"]
enable_request_rustls = ["azure_core/enable_reqwest_rustls"]

[package.metadata.docs.rs]
features = ["enable_reqwest", "enable_reqwest_rustls", "hmac_rust", "hmac_openssl"]