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

feat(lang): support include other git repo for envd functions/variables #808

Merged
merged 4 commits into from
Aug 26, 2022

Conversation

kemingy
Copy link
Member

@kemingy kemingy commented Aug 25, 2022

Signed-off-by: Keming kemingyang@tensorchord.ai

FAQ

Why not load or import?

load is starlark keyword, import has been reserved by starlark.

Signed-off-by: Keming <kemingyang@tensorchord.ai>
Signed-off-by: Keming <kemingyang@tensorchord.ai>
Signed-off-by: Keming <kemingyang@tensorchord.ai>
Signed-off-by: Keming <kemingyang@tensorchord.ai>
@kemingy kemingy marked this pull request as ready for review August 26, 2022 01:22
@@ -0,0 +1,6 @@
envdlib = include("https://github.com/kemingy/envdlib")
Copy link
Member

Choose a reason for hiding this comment

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

Should we embed the envdlib into the envd binary? git clone may take a long time, especially in China.

Copy link
Member Author

Choose a reason for hiding this comment

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

It will be cached in ~/.cache/envd/envdlib/<repo>.

I tried to reduce the repo size with depth=1 but it failed to git pull, see go-git/go-git#305.

BTW, envdlib should be very small since it only contains README and envd files.

Copy link
Member

Choose a reason for hiding this comment

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

If users want to use tensorboard, do they need to add envdlib = include("https://github.com/kemingy/envdlib") into the build.envd?

Copy link
Member

Choose a reason for hiding this comment

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

I think it is not necessary if the envdlib is maintained by us. The feature can be used for third-party libs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Make sense. So shall we maintain the envdlib in envd or use git submodule?
I can create another PR to evaluate the envdlib and insert into envd.

Copy link
Member

Choose a reason for hiding this comment

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

git submodule LGTM.

/cc @VoVAllen

And maybe we can maintain an example about using third-party plugins.

Should we merge the PR first?

Copy link
Member Author

Choose a reason for hiding this comment

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

Can merge this one if it LGTY

@@ -19,4 +19,7 @@ const (
ruleShell = "shell"
ruleRun = "run"
ruleGitConfig = "git_config"
ruleInclude = "include"

GitPrefix = "git@"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should define the public const in a separate package, but LGTM now.

Copy link
Member

@gaocegege gaocegege left a comment

Choose a reason for hiding this comment

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

/lgtm

@muniu-bot muniu-bot bot added the lgtm label Aug 26, 2022
@zwpaper
Copy link
Member

zwpaper commented Aug 26, 2022

/lgtm

testing muniu-bot

@zwpaper
Copy link
Member

zwpaper commented Aug 26, 2022

/retest

1 similar comment
@zwpaper
Copy link
Member

zwpaper commented Aug 26, 2022

/retest

@zwpaper
Copy link
Member

zwpaper commented Aug 26, 2022

/test all

@aseaday
Copy link
Member

aseaday commented Aug 26, 2022

/lgtm

@muniu-bot
Copy link

muniu-bot bot commented Aug 26, 2022

@zwpaper: No presubmit jobs available for tensorchord/envd@main

In response to this:

/test all

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@muniu-bot
Copy link

muniu-bot bot commented Aug 26, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aseaday, gaocegege, kemingy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [aseaday,gaocegege,kemingy]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gaocegege
Copy link
Member

Please test the bot in #812

@gaocegege gaocegege merged commit 630ada1 into tensorchord:main Aug 26, 2022
@kemingy kemingy deleted the feat_include branch August 26, 2022 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

feat(lang): Support load syntax
4 participants