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

fix(task-framework): starting task fails when environment variables exceed 2MB in Process Mode #3545

Open
wants to merge 4 commits into
base: dev/4.3.2
Choose a base branch
from

Conversation

MarkPotato777
Copy link
Collaborator

What type of PR is this?

type-bug

What this PR does / why we need it:

Starting task fails when environment variables exceed 2MB in Process Mode.
The solution is that write JobContext into file, and set the file path into the environment variable, instead of setting the JobContext into the environment variable directly.
The solution is

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Additional documentation e.g., usage docs, etc.:


@MarkPotato777 MarkPotato777 added the type-bug Something isn't working label Sep 24, 2024
@MarkPotato777 MarkPotato777 added this to the ODC 4.3.2 milestone Sep 24, 2024
@MarkPotato777 MarkPotato777 self-assigned this Sep 24, 2024
Copy link
Contributor

@yizhouxw yizhouxw left a comment

Choose a reason for hiding this comment

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

lgtm

* write JobContext to file in case of exceeding the environments size limit; set the file path in
* the environment instead
*/
String jobContextFilePath = JobUtils.getExecutorDataPath() + "/" + StringUtils.uuid() + ".enc";
Copy link
Contributor

Choose a reason for hiding this comment

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

.env?

putEnv(JobEnvKeyConstants.ODC_JOB_CONTEXT, () -> JobUtils.toJson(context));

if (runMode.isK8s()) {
putEnv(JobEnvKeyConstants.ODC_JOB_CONTEXT, () -> JobUtils.toJson(context));
Copy link
Contributor

Choose a reason for hiding this comment

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

will k8s encounter the same problem that the process mode does?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Something isn't working
Projects
Status: New
Development

Successfully merging this pull request may close these issues.

4 participants