Commit Graph

40 Commits (55a0d1f73035554ddf63b9a377330ce54dd83f4b)

Author SHA1 Message Date
Ivan Vyazmitinov 2fae91c5df
Force LC_COLLATE=C for sort in check_gucs_are_alphabetically_sorted.sh (#7489)
Fixed gucs check, as described
[here](https://github.com/citusdata/citus/pull/7286#discussion_r1481049261)
2024-02-08 12:21:21 +01:00
Onur Tirtir 9c243d4477
Improve check_gucs_are_alphabetically_sorted.sh (#7460)
Apparently https://github.com/citusdata/citus/pull/7452 was not enough,
need to consider the GUC-like expressions only within
RegisterCitusConfigVariables
function.
2024-01-26 12:10:35 +00:00
Onur Tirtir 24188959ed
Improve the script that sorts GUCs in alphabetical order (#7452)
Soon we will have occurrences of "citus.X" in shared_library_init.c that
are not part of GUC defs, so we need to use a more precise regular
expression.
2024-01-25 11:22:39 +03:00
Nils Dijk 0620c8f9a6
Sort includes (#7326)
This change adds a script to programatically group all includes in a
specific order. The script was used as a one time invocation to group
and sort all includes throught our formatted code. The grouping is as
follows:

 - System includes (eg. `#include<...>`)
 - Postgres.h (eg. `#include "postgres.h"`)
- Toplevel imports from postgres, not contained in a directory (eg.
`#include "miscadmin.h"`)
 - General postgres includes (eg . `#include "nodes/..."`)
- Toplevel citus includes, not contained in a directory (eg. `#include
"citus_verion.h"`)
 - Columnar includes (eg. `#include "columnar/..."`)
 - Distributed includes (eg. `#include "distributed/..."`)

Because it is quite hard to understand the difference between toplevel
citus includes and toplevel postgres includes it hardcodes the list of
toplevel citus includes. In the same manner it assumes anything not
prefixed with `columnar/` or `distributed/` as a postgres include.

The sorting/grouping is enforced by CI. Since we do so with our own
script there are not changes required in our uncrustify configuration.
2023-11-23 18:19:54 +01:00
Naisila Puka 0d1f18862b
Propagates SECURITY LABEL ON ROLE stmt (#7304)
We propagate `SECURITY LABEL [for provider] ON ROLE rolename IS
labelname` to the worker nodes.
We also make sure to run the relevant `SecLabelStmt` commands on a
newly added node by looking at roles found in `pg_shseclabel`.

See official docs for explanation on how this command works:
https://www.postgresql.org/docs/current/sql-security-label.html
This command stores the role label in the `pg_shseclabel` catalog table.

This commit also fixes the regex string in
`check_gucs_are_alphabetically_sorted.sh` script such that it escapes
the dot. Previously it was looking for all strings starting with "citus"
instead of "citus." as it should.

To test this feature, I currently make use of a special GUC to control
label provider registration in PG_init when creating the Citus extension.
2023-11-16 13:12:30 +03:00
Gokhan Gulbiz ce58c04304
Disable CircleCI (#7276)
We are switching to Github Actions. In the test period it has worked well enough, so now we can stop using CircleCI.
2023-10-31 16:00:10 +01:00
Gokhan Gulbiz e0b0cdbb87
CircleCI to GHA migration (#7154)
Co-authored-by: Hanefi Onaldi <Hanefi.Onaldi@microsoft.com>
2023-10-10 16:58:50 +03:00
Gokhan Gulbiz f027a47ca8
Fix string eval bug in migration files check (#6740) 2023-03-02 08:44:57 +03:00
Hanefi Onaldi 902d4262f9
CI checks to check for missing downgrade updates (#6661)
A branch that touches a set of upgrade scripts is also expected to touch
corresponding downgrade scripts as well. To ensure that I introduce a
new CI script. If this script fails, read the output and make sure you
update the downgrade scripts in the printed list.
2023-02-15 18:20:14 +03:00
Jelte Fennema 7bf3084b28 Add python tools to check-style and reindent make targets 2023-02-10 13:14:28 +01:00
Naisila Puka 9c78f693f2
Fix typo in fix_style.sh (#6577)
For reference, this is the print stack trace PR
https://github.com/citusdata/citus/pull/6539
2022-12-22 16:24:26 +03:00
aykut-bozkurt 80686907a3
print stack trace from core files instead of uploading them (#6539)
Prints stack trace from core files instead of uploading them.
2022-12-12 18:53:17 +03:00
rajeshkt78 7d75bbf734
Update fix_gitignore.sh 2022-11-10 15:31:55 +05:30
Rajesh Kumar Thandapani d5abcefc98 Added a workaround for a bug in git ls-files command. 2022-11-10 15:28:21 +05:30
Hanefi Onaldi a58523f1d8
Remove all references to .source files 2022-08-09 14:15:52 +03:00
Hanefi Onaldi 3ca2be85a7
Introduce new error message on enterprise merge checks 2022-02-17 13:48:36 +03:00
Hanefi Onaldi 78795251e1
Revert "Improve CI checks for enterprise merges on master (#4981)"
This reverts commit b649dffabd.
2022-02-17 13:48:36 +03:00
Hanefi Onaldi 4c135de9e4 Introduce CI checks for hash comments in specs
We do not use comments starting with # in spec files because it creates
errors from C preprocessor that expects directives after this character.
Instead use C style comments, i.e:
// single line comment

You can also use multiline comments as well
/*
 * multi line comment
 */
2021-11-26 14:52:51 +03:00
Hanefi Onaldi 9ae912a8c8
Prevent C-style comments in all directories (#5250) 2021-09-09 11:54:58 +03:00
Ahmet Gedemenli 51d410bb7b Add check for alphabetically sorted gucs
Move to a separate script

Add the new script to readme
2021-08-05 16:37:49 +03:00
Hanefi Onaldi b649dffabd
Improve CI checks for enterprise merges on master (#4981) 2021-05-12 19:15:15 +03:00
Hanefi Onaldi 6b2c9d3567
Remove ignored files from git tree 2021-05-12 09:49:07 +03:00
Hanefi Onaldi c96b439a48
Introduce scripts to sync gitignore rules for .source files 2021-05-12 09:49:06 +03:00
Jelte Fennema 7ee9a0d1c4
Enable security flags in CI (#4924) 2021-04-26 10:28:35 +02:00
Nils Dijk a748729998
rework ci 2020-12-18 18:04:45 +01:00
Nils Dijk 7c891a01a9 create missing objects during upgrade path 2020-11-17 19:01:51 +01:00
SaitTalhaNisanci dba7e052df
Merge enterprise branch if it exists (#4181)
* Merge enterprise branch if it exists

We should merge the enterprise branch if it exists in the check
enterpise merge job, otherwise the following can happen:
- there is some change on community that breaks the compilation on
enterprise without creating any conflicts
- we fix the compilation issue by opening a branch on enterprise
- the job doesn't see the enterprise specific fix because it doesn't try
to merge enterprise branch if there are no conflicts

* Update ci/check_enterprise_merge.sh

Co-authored-by: Jelte Fennema <github-tech@jeltef.nl>

* Simplify the steps

Co-authored-by: Jelte Fennema <github-tech@jeltef.nl>
2020-09-21 19:31:10 +03:00
SaitTalhaNisanci 2baf3e0bae
Fail if merge to enterprise causes compilation issues (#4027)
* check compilation of enterprise job

* test that enterprise merge job fails with compilation error

* Revert "test that enterprise merge job fails with compilation error"

This reverts commit 0eaccd58c207a4c15365186017bf47601cc95552.

* Update readme and use citus extbuilder:13beta3
2020-08-31 13:56:15 +03:00
Jelte Fennema 1c9dc80e8f
merge-enterprise script instructions to resolve outdated branches (#4073)
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
Co-authored-by: SaitTalhaNisanci <s.talhanisanci@gmail.com>
2020-08-31 11:10:32 +02:00
Jelte Fennema 8ab47f4f37
Add a CI check to see if all tests are part of a schedule (#3959)
I recently forgot to add tests to a schedule in two of my PRs. One of
these was caught by review, but the other one was not. This adds a
script to causes CI to ensure that each test in the repo is included in
at least one schedule.

Three tests were found that were currently not part of a schedule. This PR
adds those three tests to a schedule as well and it also fixes some small
issues with these tests.
2020-07-03 11:34:55 +02:00
Jelte Fennema 9311978487 Add README for CI scripts
We keep accumulating more and more scripts to flag issues in CI. This is
good, but we are currently missing consistent documentation for them.
This commit moves all these scripts to the `ci` directory and adds some
documentation for all of them in the README. It also makes sure that the
last line of output of a failed script points to this documentation.
2020-07-03 10:22:48 +02:00
Hanefi Önaldı e61ced53e3
Disallow long changelog entries 2020-06-22 23:45:46 +03:00
Hanefi Önaldı 618453a2ba
Disallow C-style comments in migration files 2020-06-22 12:51:16 +03:00
Jelte Fennema a3513c8902 Ignore symlinks and directories editorconfig CI script 2020-03-19 11:53:05 +01:00
Jelte Fennema 8de8b62669 Convert unsafe APIs to safe ones 2020-02-25 15:39:27 +01:00
Jelte Fennema b7841267dc vendor github.com/intel/safestringlib 2020-02-25 15:39:27 +01:00
Jelte Fennema 9a819d401a Ensure that only normalized test output is commited 2020-01-03 11:30:08 +01:00
SaitTalhaNisanci 91f8be76e1
Add a script that fixes style related things (#3234)
* Add a script that fixes style related things

It is kind of tedious that we need make sure that every style check
passes with any change we make. A script is added, which does all the
things for us so that we dont have to run separate commands.

* run fix style string in reindent target
2019-12-09 14:23:53 +03:00
Philip Dubé c563e0825c Strip trailing whitespace and add final newline (#3186)
This brings files in line with our editorconfig file
2019-11-21 14:25:37 +01:00
Jelte Fennema 1d8dde232f
Automatically convert useless declarations using regex replace (#3181)
* Add declaration removal to CI

* Convert declarations
2019-11-21 13:47:29 +01:00