Skip to content

Commit

Permalink
Add FLYTE_INTERNAL_POD_NAME environment variable that holds the pod n…
Browse files Browse the repository at this point in the history
…ame (#5616)

* Add environment variable for pod name

Signed-off-by: Bugra Gedik <[email protected]>

* [flyteadmin] Refactor panic recovery into middleware (#5546)

* Refactor panic handling to middleware

Signed-off-by: Jason Parraga <[email protected]>

* Remove registration of old panicCounter

Signed-off-by: Jason Parraga <[email protected]>

* Add test coverage

Signed-off-by: Jason Parraga <[email protected]>

---------

Signed-off-by: Jason Parraga <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* Snowflake agent Doc (#5620)

* TEST build

Signed-off-by: Future-Outlier <[email protected]>

* remove emphasize-lines

Signed-off-by: Future-Outlier <[email protected]>

* test build

Signed-off-by: Future-Outlier <[email protected]>

* revert

Signed-off-by: Future-Outlier <[email protected]>

---------

Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* [flytepropeller][compiler] Error Handling when Type is not found (#5612)

* FlytePropeller Compiler Avoid Crash when Type not found

Signed-off-by: Future-Outlier <[email protected]>

* Update pingsu's error message advices

Signed-off-by: Future-Outlier <[email protected]>
Co-authored-by: pingsutw  <[email protected]>

* fix lint

Signed-off-by: Future-Outlier <[email protected]>

* Trigger CI

Signed-off-by: Future-Outlier <[email protected]>

* Trigger CI

Signed-off-by: Future-Outlier <[email protected]>

---------

Signed-off-by: Future-Outlier <[email protected]>
Co-authored-by: pingsutw <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* Fix nil pointer when task plugin load returns error (#5622)

Signed-off-by: Bugra Gedik <[email protected]>

* Log stack trace when refresh cache sync recovers from panic (#5623)

Signed-off-by: Bugra Gedik <[email protected]>

* use private-key (#5626)

Signed-off-by: Bugra Gedik <[email protected]>

* Explain how Agent Secret Works (#5625)

* first version

Signed-off-by: Future-Outlier <[email protected]>

* update

Signed-off-by: Future-Outlier <[email protected]>

---------

Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* Fix typo in execution manager (#5619)

Signed-off-by: ddl-rliu <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* Amend Admin to use grpc message size (#5628)

* add send arg

Signed-off-by: Yee Hing Tong <[email protected]>

* Add acction to remove cache in gh runner

Signed-off-by: Eduardo Apolinario <[email protected]>

* Use correct checked out path

Signed-off-by: Eduardo Apolinario <[email protected]>

* Path in strings

Signed-off-by: Eduardo Apolinario <[email protected]>

* Checkout repo in root

Signed-off-by: Eduardo Apolinario <[email protected]>

* Use the correct path to new action

Signed-off-by: Eduardo Apolinario <[email protected]>

* Do not use gh var in path to clear-action-cache

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove wrong invocation of clear-action-cache

Signed-off-by: Eduardo Apolinario <[email protected]>

* GITHUB_WORKSPACE is implicit in the checkout action

Signed-off-by: Eduardo Apolinario <[email protected]>

* Refer to local `flyte` directory

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* document the process of setting ttl for a ray cluster (#5636)

Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* Add CustomHeaderMatcher to pass additional headers (#5563)

Signed-off-by: Andrew Dye <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* Turn flyteidl and flytectl releases into manual gh workflows (#5635)

* Make flyteidl releases go through a manual gh workflow

Signed-off-by: Eduardo Apolinario <[email protected]>

* Make flytectl releases go through a manual gh workflow

Signed-off-by: Eduardo Apolinario <[email protected]>

* Rewrite the documentation for `version` and clarify wording in RELEASE.md

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* docs: fix typo (#5643)

* fix CHANGELOG-v0.2.0.md

Signed-off-by: Christina <[email protected]>

* fix CHANGELOG-v1.0.2-b1.md

Signed-off-by: Christina <[email protected]>

* fix CHANGELOG-v1.1.0.md

Signed-off-by: Christina <[email protected]>

* fix CHANGELOG-v1.3.0.md

Signed-off-by: Christina <[email protected]>

---------

Signed-off-by: Christina <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* Use enable_deck=True in docs (#5645)

Signed-off-by: Bugra Gedik <[email protected]>

* Fix flyteidl release  checkout all tags (#5646)

* Fetch all tags in flyteidl-release.yml

Signed-off-by: Eduardo Apolinario <[email protected]>

* Fix sed expression for npm job

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* Install pyarrow in sandbox functional tests (#5647)

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* docs: add documentation for configuring notifications in GCP (#5545)

* update

Signed-off-by: Desi Hsu <[email protected]>

* dco

Signed-off-by: Desi Hsu <[email protected]>

* dco

Signed-off-by: Desi Hsu <[email protected]>

* typo

Signed-off-by: Desi Hsu <[email protected]>

---------

Signed-off-by: Desi Hsu <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* Correct "sucessfile" to "successfile" (#5652)

Signed-off-by: Bugra Gedik <[email protected]>

* Fix ordering for custom template values in cluster resource controller (#5648)

Signed-off-by: Katrina Rogan <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* Don't error when attempting to trigger schedules for inactive projects (#5649)

* Don't error when attempting to trigger schedules for inactive projects

Signed-off-by: Katrina Rogan <[email protected]>

* regen

Signed-off-by: Katrina Rogan <[email protected]>

---------

Signed-off-by: Katrina Rogan <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>

* fix tests

Signed-off-by: Bugra Gedik <[email protected]>

* change to shorter names

Signed-off-by: Bugra Gedik <[email protected]>

* change to shorter names

Signed-off-by: Bugra Gedik <[email protected]>

* change to shorter names

Signed-off-by: Bugra Gedik <[email protected]>

* change to shorter names

Signed-off-by: Bugra Gedik <[email protected]>

* change to shorter names

Signed-off-by: Bugra Gedik <[email protected]>

* Fix comment symbol

Signed-off-by: Eduardo Apolinario <[email protected]>

* fix one more test

Signed-off-by: Bugra Gedik <[email protected]>

---------

Signed-off-by: Bugra Gedik <[email protected]>
Signed-off-by: Jason Parraga <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: ddl-rliu <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Andrew Dye <[email protected]>
Signed-off-by: Christina <[email protected]>
Signed-off-by: Desi Hsu <[email protected]>
Signed-off-by: Katrina Rogan <[email protected]>
Co-authored-by: Jason Parraga <[email protected]>
Co-authored-by: Future-Outlier <[email protected]>
Co-authored-by: pingsutw <[email protected]>
Co-authored-by: ddl-rliu <[email protected]>
Co-authored-by: Yee Hing Tong <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Andrew Dye <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Christina <[email protected]>
Co-authored-by: Thomas J. Fan <[email protected]>
Co-authored-by: desihsu <[email protected]>
Co-authored-by: ShengYu <[email protected]>
Co-authored-by: Katrina Rogan <[email protected]>
  • Loading branch information
14 people authored Aug 20, 2024
1 parent ff12f36 commit efcd82e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ func TestAddFlyteCustomizationsToContainer(t *testing.T) {
assert.EqualValues(t, container.Command, []string{"s3://input/path"})
assert.Len(t, container.Resources.Limits, 3)
assert.Len(t, container.Resources.Requests, 3)
assert.Len(t, container.Env, 12)
assert.Len(t, container.Env, 13)
}

func TestAddFlyteCustomizationsToContainer_Resources(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ func GetExecutionEnvVars(id pluginsCore.TaskExecutionID, consoleURL string) []v1
Name: "FLYTE_INTERNAL_EXECUTION_DOMAIN",
Value: nodeExecutionID.Domain,
},
{
// FLYTE_INTERNAL_POD_NAME
Name: "_F_PN",
ValueFrom: &v1.EnvVarSource{
FieldRef: &v1.ObjectFieldSelector{
FieldPath: "metadata.name",
},
},
},
{
Name: "FLYTE_ATTEMPT_NUMBER",
Value: attemptNumber,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ func TestGetExecutionEnvVars(t *testing.T) {
}{
{
"no-console-url",
12,
13,
"",
nil,
},
{
"with-console-url",
13,
14,
"scheme://host/path",
&v12.EnvVar{
Name: "FLYTE_EXECUTION_URL",
Expand All @@ -42,7 +42,7 @@ func TestGetExecutionEnvVars(t *testing.T) {
},
{
"with-console-url-ending-in-single-slash",
13,
14,
"scheme://host/path/",
&v12.EnvVar{
Name: "FLYTE_EXECUTION_URL",
Expand All @@ -51,7 +51,7 @@ func TestGetExecutionEnvVars(t *testing.T) {
},
{
"with-console-url-ending-in-multiple-slashes",
13,
14,
"scheme://host/path////",
&v12.EnvVar{
Name: "FLYTE_EXECUTION_URL",
Expand All @@ -63,7 +63,7 @@ func TestGetExecutionEnvVars(t *testing.T) {
envVars := GetExecutionEnvVars(mock, tt.consoleURL)
assert.Len(t, envVars, tt.expectedEnvVars)
if tt.expectedEnvVar != nil {
assert.True(t, proto.Equal(&envVars[4], tt.expectedEnvVar))
assert.True(t, proto.Equal(&envVars[5], tt.expectedEnvVar))
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions flyteplugins/go/tasks/plugins/k8s/spark/spark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ func TestBuildResourcePodTemplate(t *testing.T) {
assert.Equal(t, defaultConfig.DefaultEnvVars["foo"], findEnvVarByName(sparkApp.Spec.Driver.Env, "foo").Value)
assert.Equal(t, defaultConfig.DefaultEnvVars["fooEnv"], findEnvVarByName(sparkApp.Spec.Driver.Env, "fooEnv").Value)
assert.Equal(t, findEnvVarByName(dummyEnvVarsWithSecretRef, "SECRET"), findEnvVarByName(sparkApp.Spec.Driver.Env, "SECRET"))
assert.Equal(t, 9, len(sparkApp.Spec.Driver.Env))
assert.Equal(t, 10, len(sparkApp.Spec.Driver.Env))
assert.Equal(t, testImage, *sparkApp.Spec.Driver.Image)
assert.Equal(t, flytek8s.GetServiceAccountNameFromTaskExecutionMetadata(taskCtx.TaskExecutionMetadata()), *sparkApp.Spec.Driver.ServiceAccount)
assert.Equal(t, defaultConfig.DefaultPodSecurityContext, sparkApp.Spec.Driver.SecurityContenxt)
Expand Down Expand Up @@ -890,7 +890,7 @@ func TestBuildResourcePodTemplate(t *testing.T) {
assert.Equal(t, defaultConfig.DefaultEnvVars["foo"], findEnvVarByName(sparkApp.Spec.Executor.Env, "foo").Value)
assert.Equal(t, defaultConfig.DefaultEnvVars["fooEnv"], findEnvVarByName(sparkApp.Spec.Executor.Env, "fooEnv").Value)
assert.Equal(t, findEnvVarByName(dummyEnvVarsWithSecretRef, "SECRET"), findEnvVarByName(sparkApp.Spec.Executor.Env, "SECRET"))
assert.Equal(t, 9, len(sparkApp.Spec.Executor.Env))
assert.Equal(t, 10, len(sparkApp.Spec.Executor.Env))
assert.Equal(t, testImage, *sparkApp.Spec.Executor.Image)
assert.Equal(t, defaultConfig.DefaultPodSecurityContext, sparkApp.Spec.Executor.SecurityContenxt)
assert.Equal(t, defaultConfig.DefaultPodDNSConfig, sparkApp.Spec.Executor.DNSConfig)
Expand Down

0 comments on commit efcd82e

Please sign in to comment.