Skip to content

Commit

Permalink
added if condition inside the reused workflow and in the shell script
Browse files Browse the repository at this point in the history
Update jsonwebtoken to 9 and sct to 0.7.1 (#6189)

This increases the list of crates that base on `ring` 0.17.

fixing build

fixing build

testing build

testing build

testing build

testing build

testing build

reverting the build changes

eliminate GCC warning for unchecked result of fread (#6167)

GCCproduce warning that bread result is not checked. It doesn't affect
program logic, but better live without warnings.

Check read result.

- [ ] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [ ] Do we need to implement analytics? if so did you add the relevant
metrics to the dashboard?
- [ ] If this PR requires public announcement, mark it with
/release-notes label and add several sentences in this section.

- [ ] Do not forget to reformat commit message to not include the above
checklist

Handle role deletion when project has no databases. (#6170)

There is still default 'postgres' database, that may contain objects
owned by the role or some ACLs. We need to reassign objects in this
database too.

If customer deleted all databases and then tries to delete role, that
has some non-standard ACLs,
`apply_config` operation will stuck because of failing role deletion.

fix metric `pageserver_initial_logical_size_start_calculation` (#6191)

It wasn't being incremented.

Fixup of

    commit 1c88824
    Author: Christian Schwarz <[email protected]>
    Date:   Fri Dec 1 12:52:59 2023 +0100

        initial logical size calculation: add a bunch of metrics (#5995)

Support custom types in broker (#5761)

Old methods are unchanged for backwards compatibility. Added
`SafekeeperDiscoveryRequest` and `SafekeeperDiscoveryResponse` types to
serve as example, and also as a prerequisite for
#5471

removed the if check from jobs

ammended review comments

fixing build
  • Loading branch information
abhigets authored and bayandin committed Dec 20, 2023
1 parent 43f7513 commit 9df54f5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 24 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build_and_push_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,28 @@ on:
type: string

jobs:
check-if-build-tools-dockerfile-changed:
runs-on: ubuntu-latest
outputs:
docker_file_changed: ${{ steps.dockerfile.outputs.docker_file_changed }}
steps:
- name: Check if Dockerfile.buildtools has changed
id: dockerfile
run: |
if [[ "$GITHUB_EVENT_NAME" != "pull_request" ]]; then
echo "docker_file_changed=false" >> $GITHUB_OUTPUT
exit
fi
updated_files=$(gh pr --repo neondatabase/neon diff ${{ github.event.pull_request.number }} --name-only)
if [[ $updated_files == *"Dockerfile.buildtools"* ]]; then
echo "docker_file_changed=true" >> $GITHUB_OUTPUT
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

kaniko:
if: needs.check-if-build-tools-dockerfile-changed.outputs.docker_file_changed == 'true'
needs: check-if-build-tools-dockerfile-changed
runs-on: [ self-hosted, dev, x64 ]
container: gcr.io/kaniko-project/executor:v1.7.0-debug

Expand All @@ -29,10 +50,15 @@ jobs:
run: /kaniko/executor --reproducible --snapshotMode=redo --skip-unused-stages --dockerfile ${{ inputs.dockerfile-path }} --cache=true --cache-repo 369495373322.dkr.ecr.eu-central-1.amazonaws.com/cache --destination 369495373322.dkr.ecr.eu-central-1.amazonaws.com/${{ inputs.image-name }}:${{ inputs.tag }}-amd64

kaniko-arm:
if: needs.check-if-build-tools-dockerfile-changed.outputs.docker_file_changed == 'true'
needs: check-if-build-tools-dockerfile-changed
runs-on: [ self-hosted, dev, arm64 ]
container: gcr.io/kaniko-project/executor:v1.7.0-debug

steps:
- name: skip if no change in docker image

run: exit 0
- name: Checkout
uses: actions/checkout@v1

Expand All @@ -43,11 +69,13 @@ jobs:
run: /kaniko/executor --reproducible --snapshotMode=redo --skip-unused-stages --dockerfile ${{ inputs.dockerfile-path }} --cache=true --cache-repo 369495373322.dkr.ecr.eu-central-1.amazonaws.com/cache --destination 369495373322.dkr.ecr.eu-central-1.amazonaws.com/${{ inputs.image-name }}:${{ inputs.tag }}-arm64

manifest:
if: needs.check-if-build-tools-dockerfile-changed.outputs.docker_file_changed == 'true'
name: 'manifest'
runs-on: [ self-hosted, dev, x64 ]
needs:
- kaniko
- kaniko-arm
- check-if-build-tools-dockerfile-changed

steps:
- name: Create manifest
Expand Down
25 changes: 1 addition & 24 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,34 +86,16 @@ jobs:
shell: bash
id: buildtools-tag

check-if-build-tools-dockerfile-changed:
needs: [ check-permissions ]
runs-on: ubuntu-latest
outputs:
docker_file_changed: ${{ steps.dockerfile.outputs.docker_file_changed }}
steps:
- name: Check if Dockerfile.buildtools has changed
id: dockerfile
run: |
updated_files=$(gh pr --repo neondatabase/neon diff ${{ github.event.pull_request.number }} --name-only)
if [[ $updated_files == *"Dockerfile.buildtools"* ]]; then
echo "docker_file_changed=true" >> $GITHUB_OUTPUT
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-buildtools-image:
needs: [ check-permissions, check-if-build-tools-dockerfile-changed, tag]
needs: [ check-permissions, tag]
uses: ./.github/workflows/build_and_push_docker_image.yml
if: needs.check-if-build-tools-dockerfile-changed.outputs.docker_file_changed == 'true'
with:
dockerfile-path: Dockerfile.buildtools
image-name: build-tools
tag: ${{ needs.tag.outputs.build-tools-tag}}
secrets: inherit

check-codestyle-python:
if: always() && contains(fromJSON('["success", "skipped"]'), needs.build-buildtools-image.result)
needs: [ check-permissions, build-buildtools-image , tag ]
runs-on: [ self-hosted, gen3, small ]
container:
Expand Down Expand Up @@ -147,7 +129,6 @@ jobs:
run: poetry run mypy .

check-codestyle-rust:
if: always() && contains(fromJSON('["success", "skipped"]'), needs.build-buildtools-image.result)
needs: [ check-permissions, build-buildtools-image, tag ]
runs-on: [ self-hosted, gen3, large ]
container:
Expand Down Expand Up @@ -215,7 +196,6 @@ jobs:
run: cargo deny check --hide-inclusion-graph

build-neon:
if: always() && contains(fromJSON('["success", "skipped"]'), needs.build-buildtools-image.result)
needs: [ check-permissions, tag, build-buildtools-image ]
runs-on: [ self-hosted, gen3, large ]
container:
Expand Down Expand Up @@ -734,7 +714,6 @@ jobs:
}"
neon-image:
if: always() && contains(fromJSON('["success", "skipped"]'), needs.build-buildtools-image.result)
needs: [ check-permissions, build-buildtools-image, tag ]
runs-on: [ self-hosted, gen3, large ]
container: gcr.io/kaniko-project/executor:v1.9.2-debug
Expand Down Expand Up @@ -784,7 +763,6 @@ jobs:
run: rm -rf ~/.ecr

compute-tools-image:
if: always() && contains(fromJSON('["success", "skipped"]'), needs.build-buildtools-image.result)
runs-on: [ self-hosted, gen3, large ]
needs: [ check-permissions, build-buildtools-image, tag ]
container: gcr.io/kaniko-project/executor:v1.9.2-debug
Expand Down Expand Up @@ -832,7 +810,6 @@ jobs:
run: rm -rf ~/.ecr

compute-node-image:
if: always() && contains(fromJSON('["success", "skipped"]'), needs.build-buildtools-image.result)
needs: [ check-permissions, build-buildtools-image, tag ]
runs-on: [ self-hosted, gen3, large ]
container:
Expand Down

0 comments on commit 9df54f5

Please sign in to comment.