deta-deploy-action icon indicating copy to clipboard operation
deta-deploy-action copied to clipboard

Update action.yml

Open cody-scott opened this issue 3 years ago • 10 comments

Remove the tmp/ directory before pushing to deta.

After a number of pushes i was hitting the following error

Deploying...
Error: failed to deploy: Request entity too large
Error: Process completed with exit code 1.

Removing the tmp/ directory seemed to resolve the error.

Uncertain, but my guess is that each deploy was containing the tmp for the previous deploy.

cody-scott avatar Jan 25 '22 17:01 cody-scott

Hey @namur007 you've caught the problem and given a solution, but don't you think it would be better to delete the tmp directory right in the step in which it was created (Clone Deta Metadata) rather than in 'Deploy to Deta' step?

HarshKapadia2 avatar Feb 04 '22 12:02 HarshKapadia2

@HarshKapadia2 I agree. Updated to reflect the change.

cody-scott avatar Feb 04 '22 13:02 cody-scott

You're sure rm -rf tmp/ won't be required, right?

HarshKapadia2 avatar Feb 04 '22 14:02 HarshKapadia2

hi @HarshKapadia2 @namur007 @BogDAAAMN thanks for all the work!

The problem is mainly caused by the relative tmp folder. We should not clone to ./tmp as it will fail in cases where the Micro's code already has a tmp folder; deta clone will not clone to an existing non-empty directory.

I think the better solution will be to clone to /tmp/{micro-name} (or $HOME/.deta/tmp/{micro-name} if github doesn't allow creating a root tmp dir)

  1. mkdir -p /tmp/{micro-name}
  2. deta clone --name {micro-name} --project {project-name} /tmp/{micro-name}
  3. cp -r /tmp/{micro-name}/.deta .

aavshr avatar Feb 07 '22 11:02 aavshr

Makes sense @aavshr!

Adding another step to delete the cloned Micro data is important to solve the original problem.

So the steps are:

  1. mkdir -p /tmp/{micro-name}
  2. deta clone --name {micro-name} --project {project-name} /tmp/{micro-name}
  3. cp -r /tmp/{micro-name}/.deta .
  1. rm -rf /tmp/{micro-name}

HarshKapadia2 avatar Feb 07 '22 12:02 HarshKapadia2

Hey @namur007 can you please make the required changes?

HarshKapadia2 avatar Feb 11 '22 21:02 HarshKapadia2

@namur007 @BogDAAAMN any updates?

HarshKapadia2 avatar Feb 13 '22 22:02 HarshKapadia2

Due to inactivity here, I created a new Action, which is a fork of this repository: HarshKapadia2/deta-deploy

HarshKapadia2 avatar Feb 18 '22 20:02 HarshKapadia2

Due to inactivity here, I created a new Action, which is a fork of this repository: HarshKapadia2/deta-deploy

Sorry. Yes. B I was having a problem with the clone command not wanting to clone to the root. I found a workable solution with the clone and remove method as discussed prior.

cody-scott avatar Feb 18 '22 21:02 cody-scott

What was the solution you found @namur007? Can you send a link to it and/or explain it?

HarshKapadia2 avatar Feb 18 '22 22:02 HarshKapadia2