Compare commits

...

6 Commits

Author SHA1 Message Date
Pterodactyl CI
1304e03a06 bump version for release 2022-12-05 00:33:12 +00:00
Matthew Penner
e4d790ea40 ci: remove use of deprecated ::set-output 2022-12-04 17:29:36 -07:00
Matthew Penner
5641e45059 ci: overhaul workflows 2022-12-04 17:24:33 -07:00
Matthew Penner
9a718b699f Update CHANGELOG.md 2022-12-04 15:23:29 -07:00
Matthew Penner
92efdb1981 remote: use POST for server tranfer status 2022-12-01 11:50:56 -07:00
Matthew Penner
43227bf24d server(transfer): fix dead-lock while uploading archive
Previously we waited for both the request and multipart writer
to "complete", before handing any errors.  This lead to a problem
where if the request returns before all the data has been read,
the upload would become stuck and keep the server in a transferring
state when the transfer should've been aborted.

Closes https://github.com/pterodactyl/panel/issues/4578
2022-11-29 14:04:27 -07:00
6 changed files with 51 additions and 21 deletions

View File

@@ -4,8 +4,9 @@ on:
push: push:
branches: branches:
- develop - develop
tags: release:
- "v*" types:
- published
jobs: jobs:
build-and-push: build-and-push:
@@ -13,16 +14,19 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
# Always run against a tag, even if the commit into the tag has [docker skip] within the commit message. # Always run against a tag, even if the commit into the tag has [docker skip] within the commit message.
if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))" if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))"
steps: steps:
- name: Code Checkout - name: Code checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Docker Meta - name: Docker Meta
id: docker_meta id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1 uses: docker/metadata-action@v4
with: with:
images: ghcr.io/pterodactyl/wings images: ghcr.io/pterodactyl/wings
tags: |
type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false }}
type=ref,event=tag
type=ref,event=branch
- name: Setup QEMU - name: Setup QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
@@ -40,12 +44,12 @@ jobs:
- name: Get Build Information - name: Get Build Information
id: build_info id: build_info
run: | run: |
echo "::set-output name=version_tag::${GITHUB_REF/refs\/tags\/v/}" echo "version_tag=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)" echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build and push (latest) - name: Build and Push (tag)
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
if: "!contains(github.ref, 'develop')" if: "github.event_name == 'release' && github.event.action == 'published'"
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
@@ -56,9 +60,9 @@ jobs:
labels: ${{ steps.docker_meta.outputs.labels }} labels: ${{ steps.docker_meta.outputs.labels }}
tags: ${{ steps.docker_meta.outputs.tags }} tags: ${{ steps.docker_meta.outputs.tags }}
- name: Build and push (develop) - name: Build and Push (develop)
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
if: "contains(github.ref, 'develop')" if: "github.event_name == 'push' && contains(github.ref, 'develop')"
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile

View File

@@ -34,7 +34,6 @@ jobs:
REF: ${{ github.ref }} REF: ${{ github.ref }}
run: | run: |
sed -n "/^## ${REF:10}/,/^## /{/^## /b;p}" CHANGELOG.md > ./RELEASE_CHANGELOG sed -n "/^## ${REF:10}/,/^## /{/^## /b;p}" CHANGELOG.md > ./RELEASE_CHANGELOG
echo "version_name=`sed -nr "s/^## (${REF:10} .*)$/\1/p" CHANGELOG.md`" > $GITHUB_OUTPUT
- name: Create checksum and add to changelog - name: Create checksum and add to changelog
run: | run: |
@@ -59,15 +58,15 @@ jobs:
- name: Create release - name: Create release
id: create_release id: create_release
uses: actions/create-release@v1 uses: softprops/action-gh-release@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
name: ${{ github.ref }}
tag_name: ${{ github.ref }} tag_name: ${{ github.ref }}
release_name: ${{ steps.extract_changelog.outputs.version_name }}
body_path: ./RELEASE_CHANGELOG
draft: true draft: true
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }} prerelease: ${{ contains(github.ref, 'rc') || contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
body_path: ./RELEASE_CHANGELOG
- name: Upload amd64 binary - name: Upload amd64 binary
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1

View File

@@ -1,5 +1,25 @@
# Changelog # Changelog
## v1.11.0
### Added (since 1.7.2)
* More detailed information returned by the `/api/system` endpoint when using the `?v=2` query parameter.
### Changed (since 1.7.2)
* Send re-installation status separately from installation status.
* Wings release versions will now follow the major and minor version of the Panel.
* Transfers no longer buffer to disk, instead they are fully streamed with only a small amount of memory used for buffering.
* Release binaries are no longer compressed with UPX.
* Use `POST` instead of `GET` for sending the status of a transfer to the Panel.
### Fixed (since 1.7.2)
* Fixed servers outgoing IP not being updated whenever a server's primary allocation is changed when using the Force Outgoing IP option.
* Fixed servers being terminated rather than gracefully stopped when a signal is used to stop the container rather than a command.
* Fixed file not found errors being treated as an internal error, they are now treated as a 404.
* Wings can be run with Podman instead of Docker, this is still experimental and not recommended for production use.
* Archive progress is now reported correctly.
* Labels for containers can now be set by the Panel.
* Fixed servers becoming deadlocked when the target node of a transfer goes offline.
## v1.11.0-rc.2 ## v1.11.0-rc.2
### Added ### Added
* More detailed information returned by the `/api/system` endpoint when using the `?v=2` query parameter. * More detailed information returned by the `/api/system` endpoint when using the `?v=2` query parameter.

View File

@@ -115,7 +115,7 @@ func (c *client) SetTransferStatus(ctx context.Context, uuid string, successful
if successful { if successful {
state = "success" state = "success"
} }
resp, err := c.Get(ctx, fmt.Sprintf("/servers/%s/transfer/%s", uuid, state), nil) resp, err := c.Post(ctx, fmt.Sprintf("/servers/%s/transfer/%s", uuid, state), nil)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -128,6 +128,13 @@ func (t *Transfer) PushArchiveToTarget(url, token string) ([]byte, error) {
t.Log().Debug("sending archive to destination") t.Log().Debug("sending archive to destination")
client := http.Client{Timeout: 0} client := http.Client{Timeout: 0}
res, err := client.Do(req) res, err := client.Do(req)
if err != nil {
t.Log().Debug("error while sending archive to destination")
return nil, err
}
if res.StatusCode != http.StatusOK {
return nil, fmt.Errorf("unexpected status code from destination: %d", res.StatusCode)
}
t.Log().Debug("waiting for stream to complete") t.Log().Debug("waiting for stream to complete")
select { select {
case <-ctx.Done(): case <-ctx.Done():

View File

@@ -1,3 +1,3 @@
package system package system
var Version = "develop" var Version = "1.11.0"