-
Notifications
You must be signed in to change notification settings - Fork 7
Track changes from upstream #5
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
base: main
Are you sure you want to change the base?
Changes from 19 commits
d6794c9
fc8f917
8a85bdd
dfb4bdb
3cfbfa1
04821c5
299aa44
aa9b69f
9e6fe15
39ec23d
ee54dd9
64e4625
d468b9b
f7539ee
9bca0e3
8fe5219
d682564
4063590
c9c13d6
46b3f5a
99efe6b
8d0e808
92eb372
9e96940
6b1b7c3
e19f7d7
bf0ebfa
aa5e310
a69b743
6092471
696c433
f7c318c
8366073
b5ed892
4aa45ff
b8cd669
9129ad5
34064ee
2cd740b
9c521eb
80462f5
48cf934
6106bc9
0122a0a
ce33455
e4c2258
5ce0666
da61790
c1a5115
c501656
ac578a4
445037d
7486bb9
73c2395
d89f70b
9efcabf
b66a82b
71802fc
bfc0b31
8a9e2d4
80c8861
149841b
0e64853
ab79acf
f838c59
d4de5a3
2b0e6f9
9492778
d321a1c
fa129dc
dc41469
859432a
7514232
c45681d
560b14b
aa58f47
9b65832
4de83a0
c2757ae
26da990
2045d0e
1190e10
21016ff
2e4bd56
601ec8a
7df4500
166d11e
e6a46da
c243168
53525fc
58193fc
973fd0a
ec5b9cc
8453d93
c0a348b
05182b5
9ccd074
5b5cb57
09ef059
61e3e55
04a0257
30b4da0
b33e3aa
beb9d25
a81c65b
18bd81e
1531831
e1d37b6
27cb619
349130a
3f80da9
7eded64
2fdd5d8
e638354
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # FerretDB's DocumentDB Release Checklist | ||
|
|
||
| ## Preparation | ||
|
|
||
| 1. Create draft release on GitHub to see a list of merged PRs. | ||
| 2. Update CHANGELOG.md manually. | ||
| 3. Push changes. | ||
|
|
||
| ## Git tag | ||
|
|
||
| 1. Make a signed tag `vX.Y.Z-ferretdb-A.B.C(-p)` (like `v0.102.0-ferretdb-2.0.0-rc.2`), | ||
| where `X.Y.Z` is the SemVar formatted version of DocumentDB (like `0.102.0`), | ||
| and `A.B.C(-p)` is the compatible FerretDB version (like `2.0.0-rc.2`). | ||
| 2. Check `git status` output. | ||
| 3. Push it! | ||
|
|
||
| ## Release | ||
|
|
||
| 1. Find [Packages CI build](https://github.com/FerretDB/documentdb/actions/workflows/ferretdb_packages.yml?query=event%3Apush) | ||
| for the tag to release. | ||
| 2. Upload `.deb` packages to the draft release. | ||
| 3. Update release notes with the list of changes from CHANGELOG.md. | ||
| 4. Publish release on GitHub. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| # see https://docs.mergify.com/ | ||
|
|
||
| pull_request_rules: | ||
| - name: "Assign PRs" | ||
| conditions: | ||
| - "-closed" | ||
| - "#assignee = 0" | ||
| actions: | ||
| assign: | ||
| add_users: ["{{ author }}"] | ||
|
|
||
| - name: "Add label on conflicts" | ||
| conditions: | ||
| - "conflict" | ||
| actions: | ||
| comment: | ||
| message: "@{{author}} this pull request has merge conflicts." | ||
| label: | ||
| add: [conflict] | ||
|
|
||
| - name: "Remove label when conflicts were resolved" | ||
| conditions: | ||
| - "-conflict" | ||
| actions: | ||
| label: | ||
| remove: [conflict] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| # https://github.com/repository-settings/app | ||
|
|
||
| repository: | ||
| allow_squash_merge: true | ||
| allow_merge_commit: true | ||
| allow_rebase_merge: false | ||
| allow_auto_merge: true | ||
| allow_update_branch: true | ||
| delete_branch_on_merge: true | ||
| enable_automated_security_fixes: true | ||
| enable_vulnerability_alerts: true | ||
|
|
||
| # https://docs.github.com/en/rest/issues/labels | ||
| labels: | ||
| - name: conflict | ||
| color: "#FF0000" | ||
| description: PRs that have merge conflicts | ||
|
|
||
| - name: deps | ||
| color: "#D4C5F9" | ||
| description: PRs that update dependencies | ||
|
|
||
| - name: do not merge | ||
| color: "#0052CC" | ||
| description: PRs that should not be merged | ||
|
|
||
| - name: not ready | ||
| color: "#000000" | ||
| description: Issues that are not ready to be worked on; PRs that should skip CI | ||
|
|
||
| - name: packages | ||
| color: "#9B022C" | ||
| description: PRs that should build packages |
| Original file line number | Diff line number | Diff line change | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,59 @@ | |||||||||||||||||
| --- | |||||||||||||||||
| name: Go | |||||||||||||||||
| on: | |||||||||||||||||
| pull_request: | |||||||||||||||||
| types: | |||||||||||||||||
| - unlabeled # if GitHub Actions stuck, add and remove "not ready" label to force rebuild | |||||||||||||||||
| - opened | |||||||||||||||||
| - reopened | |||||||||||||||||
| - synchronize | |||||||||||||||||
| push: | |||||||||||||||||
| branches: | |||||||||||||||||
| - ferretdb | |||||||||||||||||
| tags: | |||||||||||||||||
| - "*" | |||||||||||||||||
| schedule: | |||||||||||||||||
| - cron: "12 0 * * *" | |||||||||||||||||
|
|
|||||||||||||||||
| env: | |||||||||||||||||
| GOPATH: /home/runner/go | |||||||||||||||||
| GOCACHE: /home/runner/go/cache | |||||||||||||||||
| GOLANGCI_LINT_CACHE: /home/runner/go/cache/lint | |||||||||||||||||
| GOMODCACHE: /home/runner/go/mod | |||||||||||||||||
| GOPROXY: https://proxy.golang.org | |||||||||||||||||
| GOTOOLCHAIN: local | |||||||||||||||||
|
|
|||||||||||||||||
| jobs: | |||||||||||||||||
| test: | |||||||||||||||||
| name: Test | |||||||||||||||||
| runs-on: ubuntu-24.04 | |||||||||||||||||
| timeout-minutes: 15 | |||||||||||||||||
|
|
|||||||||||||||||
| # Do not run this job in parallel for any PR change or branch push. | |||||||||||||||||
| concurrency: | |||||||||||||||||
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | |||||||||||||||||
| cancel-in-progress: true | |||||||||||||||||
|
|
|||||||||||||||||
| if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'not ready') | |||||||||||||||||
|
|
|||||||||||||||||
| steps: | |||||||||||||||||
| # TODO https://github.com/FerretDB/github-actions/issues/211 | |||||||||||||||||
| - name: Checkout code | |||||||||||||||||
| uses: actions/checkout@v4 | |||||||||||||||||
|
|
|||||||||||||||||
| - name: Setup Go | |||||||||||||||||
| uses: FerretDB/github-actions/setup-go@main | |||||||||||||||||
|
|
|||||||||||||||||
| - name: Run tests | |||||||||||||||||
| run: | | |||||||||||||||||
| cd ferretdb_packaging | |||||||||||||||||
| go mod tidy | |||||||||||||||||
| go mod verify | |||||||||||||||||
| go test ./... | |||||||||||||||||
|
|
|||||||||||||||||
| - name: Check dirty | |||||||||||||||||
| if: always() | |||||||||||||||||
| run: | | |||||||||||||||||
| git status --untracked-files --ignored | |||||||||||||||||
| git status | |||||||||||||||||
| git diff --exit-code | |||||||||||||||||
|
Comment on lines
+28
to
+59
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI 9 months ago To fix the problem, explicitly set the permissions:
contents: readNo additional methods, imports, or definitions are needed.
Suggested changeset
1
.github/workflows/ferretdb_go_tests.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| --- | ||
| name: Packages | ||
| on: | ||
| pull_request: | ||
| types: | ||
| - unlabeled # if GitHub Actions stuck, add and remove "not ready" label to force rebuild | ||
| - opened | ||
| - reopened | ||
| - synchronize | ||
| push: | ||
| branches: | ||
| - ferretdb | ||
| tags: | ||
| - "*" | ||
| schedule: | ||
| - cron: "10 8 * * 1" | ||
|
|
||
| env: | ||
| GOPATH: /home/runner/go | ||
| GOCACHE: /home/runner/go/cache | ||
| GOLANGCI_LINT_CACHE: /home/runner/go/cache/lint | ||
| GOMODCACHE: /home/runner/go/mod | ||
| GOPROXY: https://proxy.golang.org | ||
| GOTOOLCHAIN: local | ||
|
|
||
| # Do not run this workflow in parallel for any PR change or branch/tag push | ||
| # to save some resources. | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| deb: | ||
| name: Build .debs (${{ matrix.os }}, Pg${{ matrix.pg }}) | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 40 | ||
|
|
||
| if: > | ||
| github.event_name != 'pull_request' || | ||
| ( | ||
| !contains(github.event.pull_request.labels.*.name, 'not ready') && | ||
| contains(github.event.pull_request.labels.*.name, 'packages') | ||
| ) | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [deb11, deb12, ubuntu22.04, ubuntu24.04] | ||
| pg: [15, 16, 17] | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Go | ||
| uses: FerretDB/github-actions/setup-go@main | ||
|
|
||
|
|
||
| - name: Define Debian package version | ||
| id: version | ||
| run: | | ||
| cd ferretdb_packaging | ||
| go mod tidy | ||
| go mod verify | ||
| go run ./defineversion --command deb-version --control-file ../pg_documentdb_core/documentdb_core.control | ||
|
|
||
| - name: Build ${{ steps.version.outputs.version }} | ||
| if: steps.version.outputs.version != '' | ||
| run: ./ferretdb_packaging/build_packages.sh --os ${{ matrix.os }} --pg ${{ matrix.pg }} --version ${{ steps.version.outputs.version }} --test-clean-install | ||
|
|
||
| - name: Upload | ||
|
|
||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.os }}-${{ matrix.pg }}-${{ steps.version.outputs.version }} | ||
| path: packaging/*.deb | ||
| retention-days: 1 | ||
| if-no-files-found: error | ||
| compression-level: 0 | ||
| overwrite: false | ||
|
|
||
| - name: Check dirty | ||
| run: | | ||
| git status | ||
| git diff --exit-code | ||
|
|
||
| docker: | ||
|
|
||
| name: Build Docker (Pg${{ matrix.pg }}) | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 40 | ||
|
|
||
| if: > | ||
| github.event_name != 'pull_request' || | ||
| ( | ||
| !contains(github.event.pull_request.labels.*.name, 'not ready') && | ||
| contains(github.event.pull_request.labels.*.name, 'packages') | ||
| ) | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| pg: [15.12, 16.8, 17.4] | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Go | ||
| uses: FerretDB/github-actions/setup-go@main | ||
|
|
||
| - name: Define Docker tags | ||
| id: tag | ||
| run: | | ||
| cd ferretdb_packaging | ||
| go mod tidy | ||
| go mod verify | ||
| go run ./defineversion --command docker-tags | ||
| env: | ||
| INPUT_PG_VERSION: ${{ matrix.pg }} | ||
|
|
||
| # Build and push Docker images | ||
|
|
||
| - name: Check dirty | ||
|
Comment on lines
+281
to
+291
Check failureCode scanning / CodeQL Checkout of untrusted code in a privileged context Critical
Potential execution of untrusted code on a privileged workflow (
pull_request_target Error loading related location Loading |
||
| run: | | ||
| git status | ||
| git diff --exit-code | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,9 @@ | |
| *.idb | ||
| *.pdb | ||
|
|
||
| # FerretDB packaging | ||
| *.deb | ||
|
|
||
| # Kernel Module Compile Results | ||
| *.mod* | ||
| *.cmd | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # FerretDB packaging | ||
| !*go.mod |
Uh oh!
There was an error while loading. Please reload this page.