Skip to content

Commit

Permalink
Merge branch 'main' into tsuf/sdk-spec-test-gcp
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuf239 committed Jun 23, 2024
2 parents 77529b0 + 150b4e4 commit 40226ca
Show file tree
Hide file tree
Showing 2,552 changed files with 156,775 additions and 86,227 deletions.
5 changes: 2 additions & 3 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[env]
WASI_SDK = { value = ".cargo/wasi-sdk-20.0", relative = true }
# tree-sitter build fails with newer version of clang unless implicit-function-declaration is ignored
CC_wasm32_wasi = { value = ".cargo/wasi-sdk-20.0/bin/clang -Wno-error=implicit-function-declaration", relative = true }
AR_wasm32_wasi = { value = ".cargo/wasi-sdk-20.0/bin/ar", relative = true }
CC_wasm32_wasi = { value = ".cargo/wasi-sdk-21.0/bin/clang -Wno-error=implicit-function-declaration", relative = true }
AR_wasm32_wasi = { value = ".cargo/wasi-sdk-21.0/bin/ar", relative = true }
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"updateContentCommand": "pnpm install",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "18.16.0"
"version": "20.11.1"
},
"ghcr.io/devcontainers/features/aws-cli:1": {},
"ghcr.io/devcontainers/features/terraform:1": {},
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ body:
- type: markdown
attributes:
value: |
:pray: Thanks for taking the time to fill out this bug report! Feel free to ping us on [Wing Slack](https://t.winglang.io/slack) if you have any questions or need help.
:pray: Thanks for taking the time to fill out this bug report! Feel free to ping us on [Wing Discord](https://t.winglang.io/discord) if you have any questions or need help.
- type: markdown
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Community Slack
url: https://t.winglang.io/slack
- name: Community Discord
url: https://t.winglang.io/discord
about: Come hang out, geek out, ask questions, help friends!
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Missing Example 🚀
description: Request for a missing example
labels: ["✨ example","needs-discussion"]
body:

- type: markdown
attributes:
value: |
## Missing Example
- type: textarea
id: description
attributes:
label: Description
placeholder: |
Couldn't find what you are looking for in https://github.com/winglang/examples, just describe in as much detail what is your use case
and what you are trying to build and we'll try to help out.
validations:
required: true

- type: textarea
id: reference
attributes:
label: Reference
description:
placeholder: |
Optionally, put links or code snippets as a reference that can help us do a better job.
- type: textarea
attributes:
label: Community Notes
value: |
<!-- Please keep this note for the community -->
* Please vote by adding a 👍 reaction to the issue to help us prioritize.
* If you are interested to work on this issue, please leave a comment.
* If this issue is labeled **needs-discussion**, it means the spec has not been finalized yet. Please reach out on the #dev channel in the [Wing Discord](https://t.winglang.io/discord).
30 changes: 18 additions & 12 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,41 @@ body:
- type: markdown
attributes:
value: |
:pray: Thanks for taking the time to fill out this enhancement request! Feel free to ping us on [Wing Slack](https://t.winglang.io/slack) if you have any questions or need help.
:pray: Thanks for taking the time to fill out this enhancement request! Feel free to ping us on [Wing Discord](https://t.winglang.io/discord) if you have any questions or need help.
- type: markdown
attributes:
value: |
## Enhancement Request
- type: textarea
id: spec
id: use-cases
attributes:
label: Feature Spec
description:
label: Use Case
placeholder: |
Describe the feature as if it was already released. Write a hypothetical doc/readme/changelog/contributing section for this new enhancement, code snippets and all.
What problem are you trying to solve? Describe a *concrete* example of something you are trying to do and as many details as possible
about your motivation, the environment, etc.
validations:
required: true

- type: textarea
id: use-cases
id: proposal
attributes:
label: Use Cases
label: Proposed Solution
description:
placeholder: |
What problems does this solves? List of use cases this feature or enhancement is designed to address.
validations:
required: true
Optionally, describe how you would have ideally wanted Wing to support this use case.
This can be a hypothetical "user story" or syntax or a snippet of code that would have been your ideal experience.
The purpose of this section is not to design a complete solution but rather to inspire the designer on what a user would have intuitively expected the solution to look like.
- type: textarea
id: implementation-notes
attributes:
label: Implementation Notes
description:
placeholder: |
Any thoughts regarding how this should be implemented?
- type: dropdown
id: Component
attributes:
Expand All @@ -53,16 +59,16 @@ body:
- Documentation
- Development Environment
- Contributor Experience
- Libraries
- Other
validations:
required: false


- type: textarea
attributes:
label: Community Notes
value: |
<!-- Please keep this note for the community -->
* Please vote by adding a 👍 reaction to the issue to help us prioritize.
* If you are interested to work on this issue, please leave a comment.
* If this issue is labeled **needs-discussion**, it means the spec has not been finalized yet. Please reach out on the #dev channel in the [Wing Slack](https://t.winglang.io/slack).
* If this issue is labeled **needs-discussion**, it means the spec has not been finalized yet. Please reach out on the #dev channel in the [Wing Discord](https://t.winglang.io/discord).
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/incident.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ body:
- label: WORKAROUND - if there is one, make sure it is documented in the section above.
- label: PRIORITIZE (P0/P1/P2 - see the definitions [here](https://www.winglang.io/contributing/maintainers/operations#severity-levels)).
- label: (optional) CONTACT a relevant person who has more information about the incident.
- label: (optional) ANNOUNCE major incidents on Slack \#dev or \#general channels. "NOTICE - P0 incident started. {incident-description}. Track on {link to issue}".
- label: (optional) ANNOUNCE major incidents on Discord \#dev or \#general channels. "NOTICE - P0 incident started. {incident-description}. Track on {link to issue}".
- label: HANDLE by reverting or forward fixing.
- label: UPDATE the team on your actions in the created \#alert Slack thread throughout the incident.
- label: RESOLVE the incident on [PagerDuty](https://monada.pagerduty.com/incidents) (BetterStack resolves automatically).
- label: UPDATE the team on the issue closure.
- label: (optional) ANNOUNCE closure of major incidents on Slack \#dev or \#general channels. "NOTICE - P0 incident ended. {incident-resolution-description}. Track on {link to issue}".
- label: (optional) ANNOUNCE closure of major incidents on Discord \#dev or \#general channels. "NOTICE - P0 incident ended. {incident-resolution-description}. Track on {link to issue}".
- label: UNPIN the incident issue.
- label: LESSONS LEARNED should be shared via the "post-mortem" workflow on \#dev Slack channel.
- label: LESSONS LEARNED should be shared via the "post-mortem" workflow on \#dev Discord channel.
- label: CLOSE the incident issue.
61 changes: 33 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ concurrency:
cancel-in-progress: true

env:
NODE_VERSION: "18.16.0"
PNPM_VERSION: "8.6.3"
NODE_VERSION: "20.11.1"
PNPM_VERSION: "8.15.1"
CARGO_TERM_COLOR: always
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
Expand All @@ -41,12 +41,12 @@ jobs:
bench-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['hangar#bench'].changes }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v3
with:
version: ${{ env.PNPM_VERSION }}

Expand Down Expand Up @@ -102,10 +102,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v3
with:
version: ${{ env.PNPM_VERSION }}

Expand All @@ -129,7 +129,9 @@ jobs:

- name: Install Playwright
working-directory: apps/wing-console/console/app
run: pnpm exec playwright install --with-deps
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
pnpm exec playwright install --with-deps
- name: Test
run: pnpm test:ci
Expand All @@ -153,7 +155,7 @@ jobs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download Dist Artifacts
uses: actions/download-artifact@v3
Expand All @@ -162,7 +164,7 @@ jobs:
path: dist

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v3
with:
version: ${{ env.PNPM_VERSION }}

Expand Down Expand Up @@ -206,8 +208,7 @@ jobs:
fail-fast: true
matrix:
runner: [windows, macos, ubuntu]
# Pinned 20 to 20.5.1 until https://github.com/nodejs/node/issues/49497 is released
node: ["18", "20.5.1"]
node: ["20", "18"]
shard: ["1/2", "2/2"]
full_run:
# Do a full run on push or when the PR is labeled "pr/e2e-full"
Expand All @@ -218,14 +219,14 @@ jobs:
- runner: windows
full_run: false
- runner: ubuntu
node: "20"
node: "18"
full_run: false
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v3
with:
version: ${{ env.PNPM_VERSION }}

Expand All @@ -250,11 +251,11 @@ jobs:
working-directory: tools/hangar
run: |
pnpm test:generate
pnpm run test --shard=${{ matrix.shard }} --update=${{ matrix.runner == 'ubuntu' && matrix.node == '18' }}
pnpm run vitest --shard=${{ matrix.shard }} --update=${{ matrix.runner == 'ubuntu' && matrix.node == '20' }}
- name: Create mutation if needed
# we only care about the diff in our standard dev env
if: matrix.runner == 'ubuntu' && matrix.node == '18'
if: matrix.runner == 'ubuntu' && matrix.node == '20'
id: diff
env:
RAW_SHARD: ${{ matrix.shard }}
Expand All @@ -263,17 +264,17 @@ jobs:
scripts/create_patch.sh "e2e-$SHARD.diff"
- name: Upload mutation
if: matrix.runner == 'ubuntu' && matrix.node == '18' && steps.diff.outputs.diff == 'true'
if: matrix.runner == 'ubuntu' && matrix.node == '20' && steps.diff.outputs.diff == 'true'
uses: actions/upload-artifact@v3
with:
name: ${{ steps.diff.outputs.diff_name }}
path: ${{ steps.diff.outputs.diff_name }}

aws-sdk-spec-test:
sdk-spec-test:
needs:
- build
if: github.event_name == 'push' && needs.build.outputs.e2e-changed == 'true'
uses: ./.github/workflows/tf-aws-test.yml
uses: ./.github/workflows/sdk-spec-test.yml
secrets: inherit

console-preview:
Expand All @@ -288,7 +289,7 @@ jobs:
if: ${{ needs.build.outputs.console-changed == 'true' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'mergify/merge-queue/') }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download Dist Artifacts
uses: actions/download-artifact@v3
Expand All @@ -297,7 +298,7 @@ jobs:
path: dist

- name: Install flyctl
uses: superfly/flyctl-actions/setup-flyctl@1.4
uses: superfly/flyctl-actions/setup-flyctl@1.5
with:
version: ${{ env.FLY_VERSION }}

Expand All @@ -309,7 +310,7 @@ jobs:
flyctl launch --no-deploy --copy-config --name "$APP_NAME" --image-label latest -o personal
popd
fi
flyctl deploy . --config ./apps/wing-console/console/app/preview/fly.toml --app "$APP_NAME" --image-label latest --vm-memory 512 --strategy immediate
flyctl deploy . --config ./apps/wing-console/console/app/preview/fly.toml --app "$APP_NAME" --image-label latest --vm-memory 1024 --strategy immediate
flyctl scale count 1 --yes --app "$APP_NAME"
echo "deploytime=$(TZ=UTC date +'%Y-%m-%d %H:%M')" >> $GITHUB_OUTPUT
Expand All @@ -332,11 +333,15 @@ jobs:
- e2e-test
- benchmark
- test
- aws-sdk-spec-test
- sdk-spec-test
steps:
- name: Check failure
if: needs.build.result == 'failure' || needs.e2e-test.result == 'failure' || needs.benchmark.result == 'failure' || needs.test.result == 'failure' || needs.aws-sdk-spec-test.result == 'failure'
run: exit 1
# All jobs must either be sucessful or skipped
if: contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'failure') || contains(needs.*.result, 'action_required')|| contains(needs.*.result, 'stale')|| contains(needs.*.result, 'null')
run: |
echo "One or more jobs failed or were cancelled. Please check the logs."
echo '${{ toJson(needs) }}'
exit 1
- name: Download patches
uses: actions/download-artifact@v3
- name: Check patches
Expand Down Expand Up @@ -375,7 +380,7 @@ jobs:
run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Publish NPM packages
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
env:
PACKAGE_VERSION: ${{ needs.build.outputs.version }}
with:
Expand All @@ -385,7 +390,7 @@ jobs:
set -o pipefail
cd dist
PACKAGES=("@winglang/sdk" "@winglang/compiler" "@wingconsole/design-system" "@wingconsole/ui" "@wingconsole/server" "@wingconsole/app" "winglang" "@winglang/platform-awscdk")
PACKAGES=("@winglang/sdk" "@wingcloud/framework" "@winglang/compiler" "@wingconsole/design-system" "@wingconsole/ui" "@wingconsole/server" "@wingconsole/app" "winglang" "@winglang/platform-awscdk" "@winglang/compatibility-spy" "@winglang/wingtunnels")
for PACKAGE in "${PACKAGES[@]}"; do
# Check if already published
VERSION_FOUND=$(npm view "$PACKAGE@$PACKAGE_VERSION" version --verbose || true)
Expand Down Expand Up @@ -415,7 +420,7 @@ jobs:
dependencies: false

- name: Write Changelog
uses: DamianReeves/write-file-action@v1.2
uses: DamianReeves/write-file-action@v1.3
with:
path: "CHANGELOG.md"
contents: ${{ needs.build.outputs.changelog }}
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ jobs:
- name: Install Wing
run: |
${{ matrix.install_command }}
- name: Download examples/tests/valid/test_bucket.test.w
- name: Create and test each quickstart app
shell: bash
run: |
curl -L https://raw.githubusercontent.com/winglang/wing/main/examples/tests/valid/test_bucket.test.w > test_bucket.test.w
cat test_bucket.test.w
- name: Run Test
run: |
wing test test_bucket.test.w
templates=$(wing new --list-templates)
for template in $templates; do
mkdir "$template"
cd "$_"
wing new "$template"
wing test main.w
cd ..
done
- name: Download examples/tests/valid/hello.test.w
run: |
curl -L https://raw.githubusercontent.com/winglang/wing/main/examples/tests/valid/hello.test.w > hello.test.w
Expand Down
Loading

0 comments on commit 40226ca

Please sign in to comment.