-
Notifications
You must be signed in to change notification settings - Fork 352
Add azd ai dataset extension for Foundry datasets #9499
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
Open
Mohamed Hessien (m7md7sien)
wants to merge
75
commits into
Azure:main
Choose a base branch
from
m7md7sien:feat/azure-ai-dataset
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
104cd35
Add azure.ai.dataset extension as a standalone extension
m7md7sien 7b4b19e
Put every message the CLI shows in one file
m7md7sien f5d55a2
Say what this extension is, and show what the service returns
m7md7sien 93516a2
Stop the same panic and leak here
m7md7sien 2e8f8fb
Say when the answer was 'log in again' here too
m7md7sien 88ffc5f
Tell people to retry before telling them to log in
m7md7sien dd0b293
Refuse an empty dataset early, bound the blob calls, guard the nil list
m7md7sien 5c5084b
Do not upload the byte order mark Windows wrote
m7md7sien 2e7b315
Say a name is not a dataset, and refuse one the service will not take
m7md7sien 9df2b57
Format the Go sources with gofmt
m7md7sien be18334
Say a --from-file path is missing, not which syscall found out
m7md7sien bbc9c89
Upload the file that was named, not its neighbour
m7md7sien 347fefb
Add a live CLI suite for the dataset extension
m7md7sien fef40d1
Find gotestsum on the shell Windows actually runs
m7md7sien 5dabe21
Refuse to guess which dataset a folder meant, and keep JSON parseable
m7md7sien a986da1
Answer an unknown name the way its sibling does
m7md7sien 69e7031
Refuse a malformed row and a malformed name before they reach the ser…
m7md7sien 8e9e3fb
Release 1.0.0-beta.2
m7md7sien 897c63f
Print a path someone can copy back
m7md7sien 4cfa842
Release 1.0.0-beta.3
m7md7sien 3a9d92f
Name the dataset when listing its versions finds none
m7md7sien 7ceef44
Bump version.txt with extension.yaml, and check that they agree
m7md7sien 454e1f3
Probe the version a create actually publishes
m7md7sien 6e7aacf
Give the release its changelog entry back
m7md7sien 7acb239
Take go fix's loop rewrite, so the check has nothing left to report
m7md7sien 0efc7b5
Fix lint findings in azure.ai.dataset
m7md7sien 5bd8aa9
Stop logging storage SAS credentials in azure.ai.dataset
m7md7sien 94424e0
Fix cspell failures on the dataset extension
m7md7sien d87b99f
Stop silent failures in dataset version selection
m7md7sien aab6855
Follow nextLink when listing datasets and versions
m7md7sien 24b7c74
Fix pagination edge cases and simplify the changelog
m7md7sien 3faf386
Bump to 1.0.0-beta.6
m7md7sien 289aacb
Pin the two paging cases a fork found weak in the sibling paginator
m7md7sien 1c9ca30
Refuse an update only when the service confirms the name is unknown
m7md7sien 35cbaec
Stamp the version with this module's path, not the eval extension's
m7md7sien 0ff82f2
Match the extension's case-insensitive .jsonl scan in the API layer
m7md7sien 04af404
Correct the generation pointer, the version hint, and --version on cr…
m7md7sien 8b8b8af
Use strings.SplitSeq in the stamping test, as go fix prefers
m7md7sien 048b43d
Follow the NextMarker when listing container blobs
m7md7sien 29f83f7
Carry the gosec suppression that goes with the ported blob listing
m7md7sien 2a2ce2f
Share the redaction helpers and give paging its own file, as the eval…
m7md7sien 542fc74
Add urlsafe to the word list, as the eval copy already has
m7md7sien 98a320b
Name the path the caller gave when a read fails
m7md7sien fddc3df
Redact the SAS when a request cannot even be built
m7md7sien df07a49
Give this extension the token retry the other one already had
m7md7sien bdcaa19
Fix the endpoint cascade, and cover the existence probe
m7md7sien 830bfc9
Satisfy the linters the first push tripped
m7md7sien 5a383e9
Name the codes that mean absence, rather than the ones that do not
m7md7sien 8ff1c88
Bump to 1.0.0-beta.8 for the second bug bash build
m7md7sien 3ca235e
Sync version.txt with the manifest version
m7md7sien 3404ec8
Stop a shared temp directory choosing where the debug log goes
m7md7sien be92ba7
Let the filename carry the safety, not a directory
m7md7sien ff644f6
Let a command run outside a project again
m7md7sien 26929aa
Put the rule that keeps regressing under test
m7md7sien 1e2f8e2
Take the lint gates at their word
m7md7sien 04522d5
Act on -e/--environment instead of parsing it and throwing it away
m7md7sien 0e2de78
Report an environment azd does not have instead of stepping over it
m7md7sien 4c8a2db
Cut the fourth bug bash build
m7md7sien 8e20270
Stop reading a failed existence check as proof the dataset is absent
m7md7sien 96c2dc2
Read every page of the two listings that were reading one
m7md7sien 9f7b171
Build the test's nextLink from the server, not from the request
m7md7sien a823ed9
Cut the fifth bug bash build
m7md7sien f6618d6
Check the environment -e named wherever the endpoint comes from
m7md7sien b87bda4
Cut the sixth bug bash build
m7md7sien f22f8af
Refuse an invalid evaluator name locally, and gate a run that errored
m7md7sien 2cc7502
Address Copilot review of the split slices
m7md7sien fe4a250
Finish the Copilot review of the split slices
m7md7sien 7208ac4
Merge remote-tracking branch 'origin/main' into feat/azure-ai-dataset
m7md7sien 91220f8
Match azd core on the dependencies it pins
m7md7sien e35d4ca
Cut the eleventh bug bash build
m7md7sien 9c09ddf
Close the gap between the two extensions' shared code
m7md7sien 99b67a3
Fix what the last two commits got wrong, and the escape they left open
m7md7sien 5e46d62
Cut the twelfth bug bash build
m7md7sien f73d04a
Use the dictionary's spelling throughout
m7md7sien 09167a3
Refuse an upload with nowhere to register it, before the blob is written
m7md7sien File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: ext-azure-ai-dataset-ci | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "cli/azd/extensions/azure.ai.dataset/**" | ||
| - ".github/workflows/lint-ext-azure-ai-dataset.yml" | ||
| branches: [main] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write # required by reusable workflow lint-go.yml | ||
|
|
||
| jobs: | ||
| lint: | ||
| uses: ./.github/workflows/lint-go.yml | ||
| with: | ||
| working-directory: cli/azd/extensions/azure.ai.dataset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Test report written by ci-test.ps1 for the pipeline to publish. | ||
| junitTestReport.xml | ||
|
|
||
| # Debug log written when --debug or AZD_EXT_DEBUG is set. | ||
| azd-ai-eval-*.log | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| version: "2" | ||
|
|
||
| linters: | ||
| default: none | ||
| enable: | ||
| - gosec | ||
| - lll | ||
| - unused | ||
| - errorlint | ||
| settings: | ||
| lll: | ||
| line-length: 220 | ||
| tab-width: 4 | ||
| gosec: | ||
| excludes: | ||
| - G204 # Subprocess launched with variable (bicep build invoked in tests) | ||
| - G304 # Potential file inclusion via variable | ||
|
|
||
| formatters: | ||
| enable: | ||
| - gofmt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Release History | ||
|
|
||
| ## 1.0.0-beta.1 (Unreleased) | ||
|
|
||
| ### Features Added | ||
|
|
||
| - Initial release. `create`, `update`, `list`, `show`, `delete`, and | ||
| `versions list`. | ||
| - The CRUD groups moved here from `azure.ai.evaluations`. Generation stayed | ||
| there: `dataset generate` writes the `datasets:` entry in `evals/eval.yaml`, | ||
| and that file belongs to the evaluation extension. | ||
|
m7md7sien marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Foundry datasets (Beta) | ||
|
|
||
| Register and version Foundry datasets from your terminal. | ||
|
|
||
| ```console | ||
| $ azd extension install azure.ai.dataset | ||
| $ azd ai dataset --help | ||
| ``` | ||
|
|
||
| A dataset is a general Foundry asset: evaluation needs one, and so do | ||
| fine-tuning and other scenarios. That is why these commands live here rather | ||
| than inside `azure.ai.evaluations`. | ||
|
|
||
| ## Commands | ||
|
|
||
| | Command | What it does | | ||
| |---|---| | ||
| | `azd ai dataset create <name> --from-file <path>` | Register a dataset, publishing its first version | | ||
| | `azd ai dataset update <name> --from-file <path>` | Publish a further version | | ||
| | `azd ai dataset list` | List the project's datasets | | ||
| | `azd ai dataset show <name>` | Show one dataset | | ||
| | `azd ai dataset delete <name>` | Delete a dataset version | | ||
| | `azd ai dataset versions list <name>` | List a dataset's versions | | ||
|
|
||
| ## Generating a dataset | ||
|
|
||
| Generation is `azd ai eval dataset generate`, in `azure.ai.evaluations`, and | ||
| stays there: it writes the `datasets:` entry in `evals/eval.yaml`, which is that | ||
| extension's file. Splitting the two would leave a generated dataset registered | ||
| with the service but absent from the configuration, so `azd up` would not | ||
| reconcile it and no eval could name it. | ||
|
m7md7sien marked this conversation as resolved.
Outdated
|
||
|
|
||
| Once a file exists, `create` registers it here. | ||
|
|
||
| ## Project endpoint | ||
|
|
||
| Every command resolves the Foundry project endpoint in this order: | ||
|
|
||
| 1. `--project-endpoint` | ||
| 2. `FOUNDRY_PROJECT_ENDPOINT` in the active azd environment | ||
| 3. the host environment variable of the same name | ||
|
m7md7sien marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Building | ||
|
|
||
| ```console | ||
| $ go build ./... | ||
| $ go test ./... | ||
| ``` | ||
|
|
||
| ## TODO before release | ||
|
|
||
| Both are files the azd extensions team owns, so they are not changed here: | ||
|
|
||
| - [ ] **`cli/azd/extensions/registry.json`** — add the `azure.ai.dataset` entry. | ||
| Until it exists `azd extension install azure.ai.dataset` cannot resolve, so | ||
| the extension is only reachable through `azd x pack` + `azd x publish` into | ||
| the local source registry. | ||
| - [ ] **`.github/CODEOWNERS`** — add `/cli/azd/extensions/azure.ai.dataset/`. | ||
| Every sibling Foundry extension has an entry; without one, PRs here get no | ||
| reviewer routing. | ||
| - [ ] **`microsoft.foundry/extension.yaml`** — add the dependency, but only | ||
| after the registry entry lands. Declaring a dependency that cannot resolve | ||
| breaks installing the bundle. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # Ensure script fails on any error | ||
| $ErrorActionPreference = 'Stop' | ||
|
|
||
| # Get the directory of the script | ||
| $EXTENSION_DIR = Split-Path -Parent $MyInvocation.MyCommand.Path | ||
|
|
||
| # Change to the script directory | ||
| Set-Location -Path $EXTENSION_DIR | ||
|
|
||
| # Create a safe version of EXTENSION_ID replacing dots with dashes | ||
| $EXTENSION_ID_SAFE = $env:EXTENSION_ID -replace '\.', '-' | ||
|
|
||
| # Define output directory | ||
| $OUTPUT_DIR = if ($env:OUTPUT_DIR) { $env:OUTPUT_DIR } else { Join-Path $EXTENSION_DIR "bin" } | ||
|
|
||
| # Create output directory if it doesn't exist | ||
| if (-not (Test-Path -Path $OUTPUT_DIR)) { | ||
| New-Item -ItemType Directory -Path $OUTPUT_DIR | Out-Null | ||
| } | ||
|
|
||
| # Get Git commit hash and build date | ||
| $COMMIT = git rev-parse HEAD | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Host "Error: Failed to get git commit hash" | ||
| exit 1 | ||
| } | ||
| $BUILD_DATE = (Get-Date -Format "yyyy-MM-ddTHH:mm:ssZ") | ||
|
|
||
| # List of OS and architecture combinations | ||
| if ($env:EXTENSION_PLATFORM) { | ||
| $PLATFORMS = @($env:EXTENSION_PLATFORM) | ||
| } | ||
| else { | ||
| $PLATFORMS = @( | ||
| "windows/amd64", | ||
| "windows/arm64", | ||
| "darwin/amd64", | ||
| "darwin/arm64", | ||
| "linux/amd64", | ||
| "linux/arm64" | ||
| ) | ||
| } | ||
|
|
||
| $VERSION_PATH = "azureaieval/internal/version" | ||
|
m7md7sien marked this conversation as resolved.
Outdated
|
||
|
|
||
| # Loop through platforms and build | ||
| foreach ($PLATFORM in $PLATFORMS) { | ||
| $OS, $ARCH = $PLATFORM -split '/' | ||
|
|
||
| $OUTPUT_NAME = Join-Path $OUTPUT_DIR "$EXTENSION_ID_SAFE-$OS-$ARCH" | ||
|
|
||
| if ($OS -eq "windows") { | ||
| $OUTPUT_NAME += ".exe" | ||
| } | ||
|
|
||
| Write-Host "Building for $OS/$ARCH..." | ||
|
|
||
| # Delete the output file if it already exists | ||
| if (Test-Path -Path $OUTPUT_NAME) { | ||
| Remove-Item -Path $OUTPUT_NAME -Force | ||
| } | ||
|
|
||
| # Set environment variables for Go build | ||
| $env:GOOS = $OS | ||
| $env:GOARCH = $ARCH | ||
|
|
||
| go build ` | ||
| -ldflags="-X '$VERSION_PATH.Version=$env:EXTENSION_VERSION' -X '$VERSION_PATH.Commit=$COMMIT' -X '$VERSION_PATH.BuildDate=$BUILD_DATE'" ` | ||
| -o $OUTPUT_NAME | ||
|
|
||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Host "An error occurred while building for $OS/$ARCH" | ||
| exit 1 | ||
| } | ||
| } | ||
|
|
||
| Write-Host "Build completed successfully!" | ||
| Write-Host "Binaries are located in the $OUTPUT_DIR directory." | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Get the directory of the script | ||
| EXTENSION_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
|
|
||
| # Change to the script directory | ||
| cd "$EXTENSION_DIR" || exit | ||
|
|
||
| # Create a safe version of EXTENSION_ID replacing dots with dashes | ||
| EXTENSION_ID_SAFE="${EXTENSION_ID//./-}" | ||
|
|
||
| # Define output directory | ||
| OUTPUT_DIR="${OUTPUT_DIR:-$EXTENSION_DIR/bin}" | ||
|
|
||
| # Create output and target directories if they don't exist | ||
| mkdir -p "$OUTPUT_DIR" | ||
|
|
||
| # Get Git commit hash and build date | ||
| COMMIT=$(git rev-parse HEAD) | ||
| BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ) | ||
|
|
||
| # List of OS and architecture combinations | ||
| if [ -n "$EXTENSION_PLATFORM" ]; then | ||
| PLATFORMS=("$EXTENSION_PLATFORM") | ||
| else | ||
| PLATFORMS=( | ||
| "windows/amd64" | ||
| "windows/arm64" | ||
| "darwin/amd64" | ||
| "darwin/arm64" | ||
| "linux/amd64" | ||
| "linux/arm64" | ||
| ) | ||
| fi | ||
|
|
||
| VERSION_PATH="azureaieval/internal/version" | ||
|
m7md7sien marked this conversation as resolved.
Outdated
|
||
|
|
||
| # Loop through platforms and build | ||
| for PLATFORM in "${PLATFORMS[@]}"; do | ||
| OS=$(echo "$PLATFORM" | cut -d'/' -f1) | ||
| ARCH=$(echo "$PLATFORM" | cut -d'/' -f2) | ||
|
|
||
| OUTPUT_NAME="$OUTPUT_DIR/$EXTENSION_ID_SAFE-$OS-$ARCH" | ||
|
|
||
| if [ "$OS" = "windows" ]; then | ||
| OUTPUT_NAME+='.exe' | ||
| fi | ||
|
|
||
| echo "Building for $OS/$ARCH..." | ||
|
|
||
| # Delete the output file if it already exists | ||
| [ -f "$OUTPUT_NAME" ] && rm -f "$OUTPUT_NAME" | ||
|
|
||
| # Set environment variables for Go build | ||
| GOOS=$OS GOARCH=$ARCH go build \ | ||
| -ldflags="-X '$VERSION_PATH.Version=$EXTENSION_VERSION' -X '$VERSION_PATH.Commit=$COMMIT' -X '$VERSION_PATH.BuildDate=$BUILD_DATE'" \ | ||
| -o "$OUTPUT_NAME" | ||
|
|
||
| if [ $? -ne 0 ]; then | ||
| echo "An error occurred while building for $OS/$ARCH" | ||
| exit 1 | ||
| fi | ||
| done | ||
|
|
||
| echo "Build completed successfully!" | ||
| echo "Binaries are located in the $OUTPUT_DIR directory." | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| param( | ||
| [string] $Version = (Get-Content "$PSScriptRoot/version.txt"), | ||
| [string] $SourceVersion = (git rev-parse HEAD), | ||
| [switch] $CodeCoverageEnabled, | ||
| # Accepted because the shared CI template always passes it. This extension | ||
| # has no record/playback mode, so there is no second binary to produce. | ||
| [switch] $BuildRecordMode, | ||
| [string] $MSYS2Shell, # path to msys2_shell.cmd | ||
| [string] $OutputFileName | ||
| ) | ||
| $PSNativeCommandArgumentPassing = 'Legacy' | ||
|
|
||
| # Remove any previously built binaries. | ||
| go clean | ||
|
|
||
| if ($LASTEXITCODE) { | ||
| Write-Host "Error running go clean" | ||
| exit $LASTEXITCODE | ||
| } | ||
|
|
||
| # Run `go help build` for detail on these flags. | ||
| $buildFlags = @( | ||
| # Remove file system paths from the binary. Recorded file names become a | ||
| # module path@version, or a plain import path for the standard library. | ||
| "-trimpath", | ||
|
|
||
| # Position Independent Executable, for memory-corruption hardening across | ||
| # platforms. On Windows this enables ASLR and sets DYNAMICBASE and | ||
| # HIGH-ENTROPY-VA in the PE header. | ||
| "-buildmode=pie" | ||
| ) | ||
|
|
||
| if ($CodeCoverageEnabled) { | ||
| $buildFlags += "-cover" | ||
| } | ||
|
|
||
| # cfi: Control Flow Integrity, cfg: Control Flow Guard, | ||
| # osusergo: use the pure Go user lookup. | ||
| $tagsFlag = "-tags=cfi,cfg,osusergo" | ||
|
|
||
| # -s: omit the symbol table, -w: omit DWARF, -X: set a variable at link time. | ||
| $ldFlag = "-ldflags=-s -w " + | ||
| "-X 'azureaieval/internal/version.Version=$Version' " + | ||
| "-X 'azureaieval/internal/version.Commit=$SourceVersion' " + | ||
| "-X 'azureaieval/internal/version.BuildDate=$(Get-Date -Format o)' " | ||
|
m7md7sien marked this conversation as resolved.
Outdated
|
||
|
|
||
| if ($IsWindows) { | ||
| Write-Host "Building for Windows" | ||
| } | ||
| elseif ($IsLinux) { | ||
| Write-Host "Building for linux" | ||
|
|
||
| # Disable cgo for the x64 Linux build. This also links statically, which | ||
| # widens compatibility with older Linux distributions. | ||
| if ($env:GOARCH -ne "arm64") { | ||
| $env:CGO_ENABLED = "0" | ||
| } | ||
| } | ||
| elseif ($IsMacOS) { | ||
| Write-Host "Building for macOS" | ||
| } | ||
|
|
||
| $outputFlag = "-o=$OutputFileName" | ||
|
|
||
| $buildFlags += @( | ||
| $tagsFlag, | ||
| $ldFlag, | ||
| $outputFlag | ||
| ) | ||
|
|
||
| function PrintFlags() { | ||
| param( | ||
| [string] $flags | ||
| ) | ||
|
|
||
| # Format the flags so they can be pasted straight into pwsh. | ||
| $i = 0 | ||
| foreach ($buildFlag in $buildFlags) { | ||
| # Quote values so characters such as ',' survive a repaste. Not needed | ||
| # for the direct invocation below. | ||
| $argWithValue = $buildFlag.Split('=', 2) | ||
| if ($argWithValue.Length -eq 2 -and !$argWithValue[1].StartsWith("`"")) { | ||
| $buildFlag = "$($argWithValue[0])=`"$($argWithValue[1])`"" | ||
| } | ||
|
|
||
| if ($i -eq $buildFlags.Length - 1) { | ||
| Write-Host " $buildFlag" | ||
| } | ||
| else { | ||
| Write-Host " $buildFlag ``" | ||
| } | ||
| $i++ | ||
| } | ||
| } | ||
|
|
||
| $oldGOEXPERIMENT = $env:GOEXPERIMENT | ||
| # Opt into per-iteration loop variables, which is what most readers expect and | ||
| # what the Go team intends to make the default. | ||
| $env:GOEXPERIMENT = "loopvar" | ||
|
|
||
| try { | ||
| Write-Host "Running: go build ``" | ||
| PrintFlags -flags $buildFlags | ||
| go build @buildFlags | ||
| if ($LASTEXITCODE) { | ||
| Write-Host "Error running go build" | ||
| exit $LASTEXITCODE | ||
| } | ||
|
|
||
| Write-Host "go build succeeded" | ||
| } | ||
| finally { | ||
| $env:GOEXPERIMENT = $oldGOEXPERIMENT | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.