Skip to content

acc: default-sql: test validate/deploy/summary locally - #2316

Closed
denik wants to merge 24 commits into
mainfrom
denik/acc-templates-deploy
Closed

acc: default-sql: test validate/deploy/summary locally#2316
denik wants to merge 24 commits into
mainfrom
denik/acc-templates-deploy

Conversation

@denik

Copy link
Copy Markdown
Contributor

No description provided.

@denik
denikforce-pushed the denik/acc-templates-deploy branch from 921acb7 to 5db063cCompareFebruary 10, 2025 10:56
@denik
denikforce-pushed the denik/acc-templates-deploy branch from 5db063c to 0ad3474CompareFebruary 10, 2025 11:44
@denik
denikforce-pushed the denik/acc-templates-deploy branch from 302c5c8 to 897586bCompareFebruary 10, 2025 12:41
@denik
denik changed the base branch from main to denik/add-newlineFebruary 10, 2025 12:43
denik added a commit that referenced this pull request Feb 10, 2025
## Changes
- Insert newline after rendering indented JSON in bundle
validate/summary/run.
- This prevents "No newline at end of file" message in various cases,
for example when switching between recording raw output of the command
to output processed by jq, since jq does add a newline or when running
diff in acceptance tests.
## Tests
Manually running validate:
```
~/work/dabs_cuj_brickfood % ../cli/cli-main bundle validate -o json | tail -n 2 # without change
Error: root_path must start with '~/' or contain the current username to ensure uniqueness when using 'mode: development'
}
}%
~/work/dabs_cuj_brickfood % ../cli/cli bundle validate -o json | tail -n 2 # with change
Error: root_path must start with '~/' or contain the current username to ensure uniqueness when using 'mode: development'
}
}
~/work/dabs_cuj_brickfood %
```
Via #2316 -- see cleaner output there.
Base automatically changed from denik/add-newline to mainFebruary 10, 2025 13:00
@denik
denikforce-pushed the denik/acc-templates-deploy branch from e43f31e to d0cbf0dCompareFebruary 10, 2025 22:37
@denik
denik changed the base branch from main to denik/gorilla-mix-r1February 10, 2025 22:38
@denik
denikforce-pushed the denik/gorilla-mix-r1 branch 5 times, most recently from f23d438 to f3a13b7CompareFebruary 11, 2025 14:27
Base automatically changed from denik/gorilla-mix-r1 to mainFebruary 11, 2025 15:11
@denik
denikforce-pushed the denik/acc-templates-deploy branch from 0c0eb10 to 739833dCompareFebruary 12, 2025 10:42
@denikdenik changed the title acc: test "deploy" and "validate -o json" in default-sqlacc: default-sql: test validate/deploy/summary locallyFeb 12, 2025
@denik
denik changed the base branch from main to denik/acc-request-responseFebruary 12, 2025 10:42
…ody bug
Handlers now receive testserver.Request and return any which could be
- nil (returns 404)
- string / []byte (returns it as is but sets content-type to json or test depending on content)
- object (encodes it as json and sets content-type to json)
- testserver.Response (full control over status, headers)
The config is now using the same testserver.Response struct as handlers, so the same logic applies there.
It is now possible to specify headers in test.toml.
This also fixes a bug with RecordRequest reading the body, not leaving it for the actual handler.
@denik
denikforce-pushed the denik/acc-templates-deploy branch from 1475924 to 3b19b69CompareFebruary 12, 2025 11:55
Base automatically changed from denik/acc-request-response to mainFebruary 12, 2025 13:07
denik added a commit that referenced this pull request Feb 12, 2025
This is needed for b.WorkspaceClient().CurrentWorkspaceID(ctx) which
is used by initialize_urls.go mutator ("bundle summary") (#2316).
It also also needed for to call serverless endpoint (#2348).
Builds on top of #2338
github-merge-queueBot pushed a commit that referenced this pull request Feb 13, 2025
This is needed for b.WorkspaceClient().CurrentWorkspaceID(ctx) which is
used by initialize_urls.go mutator ("bundle summary") #2316
It also also needed for to call serverless detection endpoint #2348
Builds on top of #2338
@github-actions

Copy link
Copy Markdown
Contributor

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.

@pietern
pietern deleted the denik/acc-templates-deploy branch May 15, 2025 07:29
denik added a commit that referenced this pull request May 20, 2026
## Changes
- Insert newline after rendering indented JSON in bundle
validate/summary/run.
- This prevents "No newline at end of file" message in various cases,
for example when switching between recording raw output of the command
to output processed by jq, since jq does add a newline or when running
diff in acceptance tests.
## Tests
Manually running validate:
```
~/work/dabs_cuj_brickfood % ../cli/cli-main bundle validate -o json | tail -n 2 # without change
Error: root_path must start with '~/' or contain the current username to ensure uniqueness when using 'mode: development'
}
}%
~/work/dabs_cuj_brickfood % ../cli/cli bundle validate -o json | tail -n 2 # with change
Error: root_path must start with '~/' or contain the current username to ensure uniqueness when using 'mode: development'
}
}
~/work/dabs_cuj_brickfood %
```
Via #2316 -- see cleaner output there.
denik added a commit that referenced this pull request May 20, 2026
This is needed for b.WorkspaceClient().CurrentWorkspaceID(ctx) which is
used by initialize_urls.go mutator ("bundle summary") #2316
It also also needed for to call serverless detection endpoint #2348
Builds on top of #2338
Sign up for freeto 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.

1 participant

@denik