使用 AWS re:Post 即表示您同意 AWS re:Post 使用條款

Greengrass v2 component dependencies

0

I have a top-level component that I call com.mycompany.Dependencies. This component houses our in-house SDK built in Python.

Our GG components that are built in Python, use that as a dependency, as defined below:

ComponentDependencies:
  com.mycompany.Dependencies:
    VersionRequirement: "1.0.25"
    DependencyType: HARD

We have about 3 components that are currently using the com.mycompany.Dependencies as a dependency.

When we update the Dependencies lib (i.e. add new features to the core SDK lib, we naturally build and publish, which will create an incremental version. i.e. 1.0.26.

Is there a way that, when the new Dependencies version has been published, for all of the components to automatically download the new lib, such that we don't have to increment the VersionRequirement every time there is a new version?

so, it would be something along the lines of (note latest):

ComponentDependencies:
  com.mycompany.Dependencies:
    VersionRequirement: "latest"
    DependencyType: HARD

I have tried with latest but I don't think it worked.

This way, the GG runtime would pick up that there is a latest version of Dependencies and pull it onto the device, install it, and restart the components.

Is this the right way to do it? What would you suggest if this is not possible, or an alternative way?

已提問 3 年前檢視次數 962 次
1 個回答
0

Hello Sash,

Version requirement can accept a range of versions.

VersionRequirement:

The npm-style semantic version constraint that defines the compatible component versions for this dependency. You can specify a version or a range of versions.

https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html#:~:text=The%20npm%2Dstyle%20semantic%20version%20constraint%20that%20defines%20the%20compatible%20component%20versions%20for%20this%20dependency.%20You%20can%20specify%20a%20version%20or%20a%20range%20of%20versions.

AWS
專家
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南