Repository navigation
Add AwsVendedTokenProvider to renew the correct credentials. - #1098
Conversation
4ac2cb8 to
285656b
Compare
| import io.unitycatalog.spark.UCHadoopConf; | ||
| import java.net.URI; | ||
| import org.apache.hadoop.conf.Configuration; | ||
| import org.apache.hadoop.shaded.com.google.common.base.Preconditions; |
There was a problem hiding this comment.
Since we will need to deploy this unitycatalog-spark jar and users need to add it as the dependency, then I will suggest to use the unity catalog relocated guava for the OSS-unitycatalog release.
But in this PR, I don't want to block it. So I temporarily use the hadoop's relocated guava. FYI @tdas
There was a problem hiding this comment.
Filed a separate issue for this : #1102
There was a problem hiding this comment.
doesnt spark already have with guava as a transitive dependency? cant we just use that guava?
There was a problem hiding this comment.
and i dont see you changing the build file in this PR. if this compiling, then this unitycatalog-spark project already has guava in its dependency .. either directly or via spark. isnt it?
There was a problem hiding this comment.
I think it's indirectly using the hadoop's shaded guava, that's why it currently works fine.
There was a problem hiding this comment.
I think it should be okay to use the hadoop's guava here, especially the filesystem's CredentialsProvider or TokenProvider, because it's natively the hadoop filesystem plugin.
But in future, if the UCSingleCatalog wants to use the guava, or other place. Then it should be better to have our own shaded guava dep.
For this PR, I will suggest to keep it is. can be a separate task for further UC level guava shading.
There was a problem hiding this comment.
does spark depend on guava? we can always use Spark's guava as UC-Spark will always definitely have Spark?
either ways .. not a blocker for this PR.
| public static final String UC_PATH_OPERATION = "fs.unitycatalog.path.operation"; | ||
|
|
||
| // Key indicating the credential request type, table or path. | ||
| public static final String UC_CREDENTIALS_TYPE = "fs.unitycatalog.credentials.type"; |
There was a problem hiding this comment.
copying this comment from other PR over here
#1087 (comment)
lets make the conf key strings have _KEY at the end of constant var name. for example ... ...CREDENTIALS_TYPE_KEY.
There was a problem hiding this comment.
Sounds good to me, thanks for the reminder . Done !
| public static final String S3A_INIT_CRED_EXPIRED_TIME = "fs.s3a.init.credential.expired.time"; | ||
|
|
||
| // Keys for the UnityCatalog client. | ||
| public static final String UC_URI = "fs.unitycatalog.uri"; |
There was a problem hiding this comment.
question: any reason to have "fs" in the beginning? are there any special handling associated with configs that start with fs.* ?
also this
There was a problem hiding this comment.
Since those keys are used for the filesystem's credentials provider, that's why I use the fs prefix. But it may also have problem, because the fs.unitycatalog always implies it's used for the unitycatalog filesystem, however we are not driving a new UnityCatlaogFileSystem. So maybe it's better to remove the fs. prefix ?
There was a problem hiding this comment.
Thanks, already removed the fs. prefix.
|
The python CI is timeout, and seems unrelated ! https://github.com/unitycatalog/unitycatalog/actions/runs/18357145276/job/52292011274?pr=1098 Let's try it again ! |
Signed-off-by: Zheng Hu <[email protected]>
Signed-off-by: Zheng Hu <[email protected]>
Signed-off-by: Zheng Hu <[email protected]>
Signed-off-by: Zheng Hu <[email protected]>
Signed-off-by: Zheng Hu <[email protected]>
Signed-off-by: Zheng Hu <[email protected]>
Signed-off-by: Zheng Hu <[email protected]>
Signed-off-by: Zheng Hu <[email protected]>
Signed-off-by: Zheng Hu <[email protected]>
Signed-off-by: Zheng Hu <[email protected]>
Signed-off-by: Zheng Hu <[email protected]>
c6f7d07 to
59c43a6
Compare
Signed-off-by: Zheng Hu <[email protected]>
tdas
left a comment
There was a problem hiding this comment.
LGTM.. just a few more minor comments. please address them and then we can merge.
thank you for starting this work and i look forward to the follow up PRs.
Signed-off-by: Zheng Hu <[email protected]>
…talog#1098) **PR Checklist** - [x] A description of the changes is added to the description of this PR. - [x] If there is a related issue, make sure it is linked to this PR. - [x] If you've fixed a bug or added code that should be tested, add tests! - [x] If you've added or modified a feature, documentation in `docs` is updated **Description of changes** Implement this aws token provider for this issue: unitycatalog#1096. This provider can accept the initialized credentials provider for the first time, and then it will automatically renew the credentials before the expiration time. So that the provider can always deliver the valid credentials to the upper layer. --------- Signed-off-by: Zheng Hu <[email protected]>
…talog#1098) **PR Checklist** - [x] A description of the changes is added to the description of this PR. - [x] If there is a related issue, make sure it is linked to this PR. - [x] If you've fixed a bug or added code that should be tested, add tests! - [x] If you've added or modified a feature, documentation in `docs` is updated **Description of changes** Implement this aws token provider for this issue: unitycatalog#1096. This provider can accept the initialized credentials provider for the first time, and then it will automatically renew the credentials before the expiration time. So that the provider can always deliver the valid credentials to the upper layer. --------- Signed-off-by: Zheng Hu <[email protected]>
**PR Checklist** - [x] A description of the changes is added to the description of this PR. - [x] If there is a related issue, make sure it is linked to this PR. - [x] If you've fixed a bug or added code that should be tested, add tests! - [x] If you've added or modified a feature, documentation in `docs` is updated **Description of changes** Backport the #1098 to branch-0.3, the related issue is here: #1163 Signed-off-by: Zheng Hu <[email protected]>
PR Checklist
docsis updatedDescription of changes
Implement this aws token provider for this issue: #1096. This provider can accept the initialized credentials provider for the first time, and then it will automatically renew the credentials before the expiration time. So that the provider can always deliver the valid credentials to the upper layer.