Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .github/workflows/pr_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ jobs:
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Install Rust"
uses: actions-rs/toolchain@v1
with:
toolchain: stable # to install tomlq via `make config`
uses: dtolnay/rust-toolchain@stable # to install tomlq via `make config`
- name: "Generate static app config"
run: make config
- name: "Config Artifact"
Expand All @@ -29,9 +27,7 @@ jobs:
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Install Rust"
uses: actions-rs/toolchain@v1
with:
toolchain: stable # to install tomlq via `make vet` pre-requisite
uses: dtolnay/rust-toolchain@stable # to install tomlq via `make config`
- name: Install Go
uses: actions/setup-go@v3
with:
Expand Down Expand Up @@ -85,7 +81,6 @@ jobs:
tinygo-version: [0.27.0]
go-version: [1.20.x]
node-version: [18]
rust-toolchain: [stable]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand Down Expand Up @@ -115,11 +110,9 @@ jobs:
restore-keys: |
${{ runner.os }}-go-mod-
- name: "Install Rust"
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
uses: dtolnay/rust-toolchain@stable
- name: "Add wasm32-wasi Rust target"
run: rustup target add wasm32-wasi --toolchain ${{ matrix.rust-toolchain }}
run: rustup target add wasm32-wasi --toolchain stable
- name: "Validate Rust toolchain"
run: rustup show && rustup target list --installed --toolchain stable
shell: bash
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/tag_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ jobs:
- name: "Set GOHOSTOS and GOHOSTARCH"
run: echo "GOHOSTOS=$(go env GOHOSTOS)" >> $GITHUB_ENV && echo "GOHOSTARCH=$(go env GOHOSTARCH)" >> $GITHUB_ENV
- name: "Install Rust"
uses: actions-rs/toolchain@v1
with:
toolchain: stable
uses: dtolnay/rust-toolchain@stable
- name: "Generate static app config"
run: make config
# Passing the raw SSH private key causes an error:
Expand Down
4 changes: 2 additions & 2 deletions pkg/commands/compute/language_toolchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (bt BuildToolchain) Build() error {

if bt.postBuild != "" {
if !bt.autoYes && !bt.nonInteractive {
err := bt.promptForBuildContinue(CustomPostBuildScriptMessage, bt.postBuild, bt.out, bt.in, bt.verbose)
err := bt.promptForBuildContinue(CustomPostBuildScriptMessage, bt.postBuild, bt.out, bt.in)
if err != nil {
return err
}
Expand Down Expand Up @@ -219,7 +219,7 @@ func (bt BuildToolchain) execCommand(cmd string, args []string, spinMessage stri
// promptForBuildContinue ensures the user is happy to continue with the build
// when there is either a custom build or post build in the fastly.toml
// manifest file.
func (bt BuildToolchain) promptForBuildContinue(msg, script string, out io.Writer, in io.Reader, verbose bool) error {
func (bt BuildToolchain) promptForBuildContinue(msg, script string, out io.Writer, in io.Reader) error {
text.Info(out, "%s:\n", msg)
text.Break(out)
text.Indent(out, 4, "%s", script)
Expand Down
4 changes: 1 addition & 3 deletions pkg/commands/compute/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,7 @@ func (c *ServeCommand) setBackendsWithDefaultOverrideHostIfMissing(out io.Writer
if backend.OverrideHost == "" {
if u, err := url.Parse(backend.URL); err == nil {
segs := strings.Split(u.Host, ":") // avoid parsing IP with port
if addr := net.ParseIP(segs[0]); addr != nil {
// we have an IP
} else {
if ip := net.ParseIP(segs[0]); ip == nil {
if c.Globals.Verbose() {
text.Info(out, "[local_server.backends.%s] (%s) is configured without an `override_host`. We will use %s as a default to help avoid any unexpected errors. See https://developer.fastly.com/reference/compute/fastly-toml/#local-server for more details.", k, backend.URL, u.Host)
}
Expand Down