Skip to content

Conversation

@denik
Copy link
Contributor

@denik denik commented Dec 4, 2024

Changes

Move MkdirsByPath call outside of sync.New because sync.New is also used by "bundle validate" which is supposed to be side-effect-free.

Instead, remember if the path existed or not and then create it in RunOnce().

Tests

Extended TestAccEmptyBundleDeploy to also do "bundle validate" and to check that the path does appear but after deploy and not after validate.

@denik denik temporarily deployed to test-trigger-is December 4, 2024 19:49 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is December 4, 2024 19:50 — with GitHub Actions Inactive
@denik denik force-pushed the DECO-23879--do-not-create-path branch from 22c7110 to bbd42c0 Compare December 5, 2024 11:12
@denik denik temporarily deployed to test-trigger-is December 5, 2024 11:12 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is December 5, 2024 11:13 — with GitHub Actions Inactive
@denik denik changed the title WIP - Extend empty_bundle_test.go to check if remote path is created prematurely Postpone directory creation until start of upload Dec 5, 2024
@denik denik changed the title Postpone directory creation until start of upload Postpone mkdir until start of upload Dec 5, 2024
return err
}
return false, nil

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we still test if we have permission to write to a parent that does exist?

We run this during validation, so if we cannot write to the destination path, it's good to surface early.

@denik denik force-pushed the DECO-23879--do-not-create-path branch from bbd42c0 to 8c90966 Compare December 10, 2024 13:41
@denik denik temporarily deployed to test-trigger-is December 10, 2024 13:41 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is December 10, 2024 13:42 — with GitHub Actions Inactive
This ensure that "bundle validate" does not create remote directory.

Extend empty_bundle_test.go to check if remote path is created prematurely
@denik denik force-pushed the DECO-23879--do-not-create-path branch from 8c90966 to 48048dd Compare December 11, 2024 15:31
@denik denik temporarily deployed to test-trigger-is December 11, 2024 15:31 — with GitHub Actions Inactive
@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 1956
  • Commit SHA: 48048ddd55478a45ef1603f3cc8332df242e13ed

Checks will be approved automatically on success.

@denik denik temporarily deployed to test-trigger-is December 11, 2024 15:31 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot
Copy link
Collaborator

Test Details: go/deco-tests/12279631939

@denik denik marked this pull request as draft January 20, 2025 16:19
@github-actions
Copy link

This PR has not received an update in a while. If you want to keep this PR open, please leave a comment below or push a new commit and auto-close will be canceled.

@github-actions github-actions bot added the Stale label Mar 22, 2025
@github-actions github-actions bot closed this Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants