Skip to content
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

fix: resolve conflict #1

Merged
merged 259 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
259 commits
Select commit Hold shift + click to select a range
66adfea
chore: support AWS RDS connection (#11796)
ecmadao Apr 25, 2024
2dfbf46
chore: remove maximum limit in pagination (#11798)
ecmadao Apr 25, 2024
103cfdb
chore: redact query response (#11791)
RainbowDashy Apr 25, 2024
5204f4f
chore: default pagesize (#11795)
LiuJi-Jim Apr 25, 2024
ccd200f
feat: migrate sql query export activity to audit log (#11794)
RainbowDashy Apr 25, 2024
e15dcf8
feat(schema-editor): support procedure and function nodes (#11693)
LiuJi-Jim Apr 25, 2024
a57ae95
feat(auto-complete): SQL Server auto completion (#11793)
h3n4l Apr 25, 2024
20c5c2a
chore(issue): remove unused query field (#11799)
boojack Apr 25, 2024
560d9eb
chore: disable switch when task done (#11801)
boojack Apr 25, 2024
cc353a1
fix: immediate defer rows.Close() (#11800)
RainbowDashy Apr 25, 2024
c4303de
chore: no bb (#11802)
d-bytebase Apr 25, 2024
56a9fa8
chore: update helm (#11803)
boojack Apr 25, 2024
006536a
chore: remove bb script (#11804)
boojack Apr 25, 2024
5f7b3cc
fix: NPE (#11805)
d-bytebase Apr 25, 2024
ecf8f28
feat(sql-review): check table size on DDLs (#11788)
Azusain Apr 25, 2024
0e62780
fix: mysql tls (#11807)
RainbowDashy Apr 25, 2024
4eaa8c4
chore: tls2 (#11808)
d-bytebase Apr 25, 2024
2942a89
chore: support pg dump for rds with iam (#11809)
ecmadao Apr 25, 2024
70b70ea
fix: feature guard for data source update (#11810)
ecmadao Apr 26, 2024
cf59fc7
chore: frontend update (#11814)
ecmadao Apr 26, 2024
cd9761b
chore: add limit.table-size in mergeIndividualConfigAsRule (#11812)
h3n4l Apr 26, 2024
8f28b3f
feat: impl search audit logs iam (#11815)
RainbowDashy Apr 26, 2024
a36526b
chore: move const (#11813)
d-bytebase Apr 26, 2024
7abdc12
chore: remove Hive from getAdvisorTypeByRule() and rename advisor's f…
Azusain Apr 26, 2024
2ffda76
chore: allow to edit statement for db group issue (#11811)
boojack Apr 26, 2024
92ff6d1
chore: exceeded error (#11817)
d-bytebase Apr 26, 2024
4e562ee
fix: unspecified change db type in table.limit-size (#11819)
Azusain Apr 26, 2024
44575a9
chore: fix dynamic suggestions (#11820)
boojack Apr 26, 2024
9e44bcd
chore: check result size on the loop (#11821)
d-bytebase Apr 26, 2024
9997877
chore: enable audit logs by default (#11823)
RainbowDashy Apr 26, 2024
3e6e73a
chore: Google CloudSQL to Google Cloud SQL (#11824)
tianzhou Apr 26, 2024
a100201
chore: update user store (#11825)
boojack Apr 26, 2024
69ef979
chore: migrate eslint to flat config format (#11827)
boojack Apr 26, 2024
d60c021
chore: remove unused dependencies (#11828)
boojack Apr 26, 2024
4eee1d7
feat: store task run sheet uid (#11829)
RainbowDashy Apr 26, 2024
f247358
feat(sql-editor): custom result rows limit and result page size (#11822)
LiuJi-Jim Apr 26, 2024
fc4d9d2
chore: oracle legacy (#11830)
d-bytebase Apr 28, 2024
9ebd588
fix: pass change type (#11831)
RainbowDashy Apr 28, 2024
518ccd4
chore: update range mask algorithm (#11832)
ecmadao Apr 28, 2024
f596cdf
feat: sheet engine (#11833)
RainbowDashy Apr 28, 2024
5c0d753
chore(frontend): add `stringEnums` flag (#11834)
boojack Apr 28, 2024
a872cc0
chore(deps): update dependency @iconify/json to v2.2.204 (#11836)
renovate[bot] Apr 29, 2024
4d948eb
fix(deps): update module github.com/clickhouse/clickhouse-go/v2 to v2…
renovate[bot] Apr 29, 2024
e91a98a
fix(deps): update github.com/bytebase/tsql-parser digest to 8846238 (…
renovate[bot] Apr 29, 2024
a19f982
fix(deps): update module github.com/sashabaranov/go-openai to v1.23.0…
renovate[bot] Apr 29, 2024
a185b6a
chore(deps): update dependency rollup to v4.17.0 (#11844)
renovate[bot] Apr 29, 2024
87d5a1c
fix(deps): update module github.com/sijms/go-ora/v2 to v2.8.14 (#11843)
renovate[bot] Apr 29, 2024
f137dab
fix(deps): update dependency sql-formatter to v15.3.1 (#11842)
renovate[bot] Apr 29, 2024
d4eceb6
fix(deps): update dependency dayjs to v1.11.11 (#11841)
renovate[bot] Apr 29, 2024
1b81f95
feat: import changelist via .sql or .zip file (#11846)
LiuJi-Jim Apr 29, 2024
9ec1481
chore(deps): update dependency eslint to v9.1.1 (#11839)
renovate[bot] Apr 29, 2024
74eec4c
chore(deps): update vue monorepo to v3.4.25 (#11840)
renovate[bot] Apr 29, 2024
91f9c8f
chore(deps): update dependency @tailwindcss/typography to v0.5.13 (#1…
renovate[bot] Apr 29, 2024
3f5db89
chore(deps): update dependency vitest to v1.5.2 (#11847)
renovate[bot] Apr 29, 2024
d75269a
chore(deps): update golangci/golangci-lint-action action to v5 (#11852)
renovate[bot] Apr 29, 2024
2e0f7c0
fix(deps): update dependency dompurify to v3.1.1 (#11848)
renovate[bot] Apr 29, 2024
b1e1337
chore(deps): update dependency code-inspector-plugin to ^0.13.0 (#11849)
renovate[bot] Apr 29, 2024
a3fb369
chore(deps): update dependency ws to v8.17.0 (#11850)
renovate[bot] Apr 29, 2024
4411502
fix(deps): update module google.golang.org/api to v0.176.1 (#11851)
renovate[bot] Apr 29, 2024
a45a18b
chore(deps): update dependency vue-tsc to v2.0.14 (#11853)
renovate[bot] Apr 29, 2024
c72630d
fix(deps): update dependency lucide-vue-next to ^0.376.0 (#11854)
renovate[bot] Apr 29, 2024
a55e6b0
chore: fix proto message about kerberos (#11855)
Azusain Apr 29, 2024
858817f
feat: convert sheet engine (#11856)
RainbowDashy Apr 29, 2024
d2568c3
chore: fix reactive i18n for BBButtonConfirm (#11857)
boojack Apr 29, 2024
68dd5aa
chore: support config hive with kerberos (#11858)
ecmadao Apr 29, 2024
2c7e5d8
feat(proto): sheet command (#11859)
RainbowDashy Apr 29, 2024
8833abd
chore: retire branch from changelist items (#11861)
LiuJi-Jim Apr 29, 2024
ea321e8
chore: use `auditLogService` in frontend (#11863)
boojack Apr 29, 2024
c63705e
chore: pgquerygo2 (#11862)
d-bytebase Apr 29, 2024
a8f0367
chore: use source string (#11864)
RainbowDashy Apr 29, 2024
174716c
chore: risk dml (#11865)
d-bytebase Apr 29, 2024
bc865e6
fix: database schema version (#11868)
d-bytebase Apr 29, 2024
802c3c4
chore: fix function names (#11869)
MarkDaveny Apr 30, 2024
6dd58b5
chore: implement `orderBy` for searching audit logs (#11870)
boojack Apr 30, 2024
b4e9c55
feat: split sheet eagerly (#11866)
RainbowDashy Apr 30, 2024
2f93386
chore: make engine required (#11871)
RainbowDashy Apr 30, 2024
7e65713
chore: retire logging service in frontend (#11872)
boojack Apr 30, 2024
431de02
chore: optimize ui when missing permission (#11874)
ecmadao Apr 30, 2024
617ee53
chore: rename worksheet (#11873)
d-bytebase Apr 30, 2024
a0c8f80
fix: npe (#11875)
h3n4l Apr 30, 2024
ced7bd7
chore(proto): add export audit logs definition (#11876)
boojack Apr 30, 2024
e1c2305
chore: implement audit logs export (#11877)
boojack Apr 30, 2024
c8085aa
chore(frontend): implement export audit logs (#11878)
boojack Apr 30, 2024
9c9f0e1
chore: redact user (#11879)
RainbowDashy Apr 30, 2024
cdbd837
feat(sql-review): new rule for checking fully qualified object name (…
Azusain Apr 30, 2024
6035c8d
chore: update sql view in data table (#11881)
boojack Apr 30, 2024
58bb96b
chore(sql-review): append fullt-qualified-object-name to dev template…
Azusain Apr 30, 2024
6e13697
fix: export request project id (#11882)
RainbowDashy Apr 30, 2024
7575b4f
chore: fix gitops issue demo data (#11886)
tianzhou Apr 30, 2024
772fc54
chore: improve Restrict adding \"NOT NULL\" constraint to existing co…
tianzhou Apr 30, 2024
f4b65ce
fix(deps): update google.golang.org/genproto/googleapis/api digest to…
renovate[bot] May 1, 2024
8c75454
fix(deps): update google.golang.org/genproto digest to 8cf5692 (#11887)
renovate[bot] May 1, 2024
5d325b7
chore(deps): update dependency @iconify/json to v2.2.205 (#11890)
renovate[bot] May 1, 2024
a896cb7
chore(deps): update dependency rollup to v4.17.2 (#11891)
renovate[bot] May 1, 2024
699a23d
chore(deps): update dependency vue-tsc to v2.0.15 (#11893)
renovate[bot] May 1, 2024
0c01cad
chore(deps): update vue monorepo to v3.4.26 (#11894)
renovate[bot] May 1, 2024
8737250
chore(deps): update dependency vitest to v1.5.3 (#11892)
renovate[bot] May 1, 2024
4711361
fix(deps): update module google.golang.org/api to v0.177.0 (#11896)
renovate[bot] May 1, 2024
05efe3c
fix(deps): update module cloud.google.com/go/spanner to v1.61.0 (#11895)
renovate[bot] May 1, 2024
7257b2d
fix(deps): update dependency canvas-confetti to v1.9.3 (#11898)
renovate[bot] May 1, 2024
8e5b0c9
fix(deps): update dependency dompurify to v3.1.2 (#11899)
renovate[bot] May 1, 2024
bbcac6d
chore(deps): update dependency vue-tsc to v2.0.16 (#11900)
renovate[bot] May 1, 2024
a773df7
chore(deps): update dependency ts-proto to v1.173.0 (#11901)
renovate[bot] May 1, 2024
9b1e6c9
fix(deps): update dependency node-sql-parser to v5.1.0 (#11902)
renovate[bot] May 1, 2024
7f561c7
chore: update err msg (#11904)
RainbowDashy May 6, 2024
3894ffe
chore: frontend fix and update (#11906)
ecmadao May 6, 2024
2e12fcc
chore(sql-review): separate rule for truncate cascading (#11905)
Azusain May 6, 2024
e3ec153
fix: obo select version (#11908)
RainbowDashy May 6, 2024
21c75c6
chore: add column comments to prompt (#11907)
boojack May 6, 2024
778252a
chore: fix droppable textarea state (#11909)
boojack May 6, 2024
0de5a88
chore: fix i18n (#11911)
boojack May 6, 2024
084ea4d
feat(proto): task run log (#11912)
RainbowDashy May 6, 2024
33277f5
feat: add task run log table (#11913)
RainbowDashy May 6, 2024
39bf2f0
fix(deps): update module google.golang.org/protobuf to v1.34.1 (#11897)
renovate[bot] May 7, 2024
2de7084
refactor: extract file upload and parse logic (#11915)
LiuJi-Jim May 7, 2024
958277d
chore: use `NVirtualList` in matched database/table view (#11916)
boojack May 7, 2024
6dc96ee
fix: nil (#11917)
RainbowDashy May 7, 2024
7cb9795
feat: upload file when creating changelist (#11918)
LiuJi-Jim May 7, 2024
84c88d4
feat(dump): implement mssql dump (#11826)
rebelice May 7, 2024
594a43d
feat: click plan check detail line anchor element will navigate to li…
h3n4l May 7, 2024
824efc6
chore: support set issue label (#11919)
ecmadao May 7, 2024
5c3f61b
chore: add filterable to affected table select (#11920)
boojack May 7, 2024
a500f35
chore: hide docs reference in standalone mode (#11921)
boojack May 7, 2024
c3bdaaf
feat: implement dump mssql indexes (#11922)
rebelice May 7, 2024
215c32c
chore: filter issues by label (#11923)
ecmadao May 7, 2024
17294f3
chore: button style and text (#11924)
LiuJi-Jim May 7, 2024
5ab44db
feat: taskRunLog for MySQL (#11925)
RainbowDashy May 7, 2024
ae71065
fix: column does not exist (#11926)
Azusain May 7, 2024
2aedc26
fix: refine mysql pre-backup (#11928)
rebelice May 7, 2024
0cc9219
chore: scan mssql (null)identifier type (#11929)
h3n4l May 7, 2024
bbc34a3
chore: implement filter audit logs by create time (#11930)
boojack May 8, 2024
695eeac
feat: impl GetTaskRunLog v1 api (#11932)
RainbowDashy May 8, 2024
3b76e26
chore(frontend): specify sheet.engine if possible in CreateSheet (#11…
LiuJi-Jim May 8, 2024
e969bd1
feat(proto): add all affected rows (#11933)
RainbowDashy May 8, 2024
d6718e7
feat: sync mssql func and procedures (#11934)
rebelice May 8, 2024
32c1dcf
feat: use raw conn to get affected rows of each stmt (#11935)
RainbowDashy May 8, 2024
b4f2b8d
fix: task run log index (#11936)
RainbowDashy May 9, 2024
e062ee9
feat(proto): sheet commands (#11937)
RainbowDashy May 9, 2024
53131c5
chore: update advanced search utils definition (#11938)
boojack May 9, 2024
0ebb900
feat: convert sheet commands (#11940)
RainbowDashy May 9, 2024
1a5bd3e
feat: store command indexes (#11939)
RainbowDashy May 9, 2024
537a5c0
chore: implement advanced search for audit logs (#11943)
boojack May 9, 2024
f1e6073
fix: issue label (#11944)
ecmadao May 9, 2024
c6d31e5
feat: allow 100m via REST (#11945)
RainbowDashy May 9, 2024
25c01d0
chore: duplicate the database schema metadata and add last updater re…
h3n4l May 9, 2024
f1c020a
chore: update sql (#11946)
RainbowDashy May 9, 2024
8552040
chore: optimize issue labels (#11950)
ecmadao May 10, 2024
208c786
feat(frontend): show task run log detail (#11949)
LiuJi-Jim May 10, 2024
f43274d
refactor: combine advanced search components (#11951)
boojack May 10, 2024
2dacddb
chore: fix scope tags (#11952)
boojack May 10, 2024
1a1ba78
fix: pass DBSchema (#11955)
RainbowDashy May 10, 2024
e440180
fix: one migration at the same time (#11957)
RainbowDashy May 10, 2024
76cc46c
chore: update search scopes for data exporting issues (#11954)
boojack May 10, 2024
9a22686
chore: upgrade plsql parser (#11956)
Azusain May 10, 2024
e9cd9fb
chore: tweak issue search styles (#11959)
boojack May 11, 2024
d1a00e3
chore: style (#11960)
LiuJi-Jim May 11, 2024
e040b35
chore: move classification to database config (#11941)
ecmadao May 11, 2024
5acb6bf
chore: only show error line for latest plan check run (#11961)
boojack May 11, 2024
9af00c3
chore: update sql result view buttons (#11964)
boojack May 11, 2024
43971a4
chore: add expand button to plan check bar (#11963)
boojack May 11, 2024
67c07d4
fix: use instance id (#11968)
RainbowDashy May 13, 2024
6966387
fix: sanitize comment (#11969)
ecmadao May 13, 2024
ef1f14c
chore: update i18n of classification (#11972)
boojack May 13, 2024
2e4938e
fix: i18n test (#11973)
ecmadao May 13, 2024
69652ec
chore: hide delete label button (#11974)
boojack May 13, 2024
e497697
chore: 2.17.0
ecmadao May 13, 2024
f88ccc8
chore: map task run log index (#11976)
RainbowDashy May 13, 2024
effc804
chore: fallback to affectedRows (#11979)
LiuJi-Jim May 13, 2024
62d7ac9
fix: project ids (#11978)
RainbowDashy May 13, 2024
c7f06bc
feat: impl task run log for pg (#11977)
RainbowDashy May 13, 2024
0cad73b
chore: store last updater in database config (#11980)
h3n4l May 13, 2024
875eb88
feat(sql-editor): Improve the UX of project group by experience (#11967)
LiuJi-Jim May 13, 2024
55cbc63
chore: i18n (#11981)
LiuJi-Jim May 14, 2024
9cc8ad8
chore: redirect to configure labels (#11982)
ecmadao May 14, 2024
e4c5b98
chore: add labels column to data export issue table (#11983)
boojack May 14, 2024
06f819d
feat: show task run log error (#11984)
LiuJi-Jim May 14, 2024
bb0865d
feat: update branch updater info (#11985)
h3n4l May 14, 2024
f3f45ed
chore: update mysql task run log (#11986)
RainbowDashy May 14, 2024
3e6d5ee
chore: use allAffectedRows if there's a one to one mapping (#11987)
RainbowDashy May 14, 2024
fe667f2
chore: update composed issue definition (#11988)
boojack May 14, 2024
39a3fd0
chore: force to set issue labels (#11989)
ecmadao May 14, 2024
2a5f6d3
fix: typo (#11991)
Azusain May 15, 2024
7652e70
fix: unspecific risk source (#11992)
ecmadao May 15, 2024
390dd4f
feat: support mask_inner and mask_outer (#11975)
Azusain May 15, 2024
31db85b
fix: fix npe in IndexTotalNumberLimitAdvisor (#11993)
whhe May 15, 2024
70ddce1
chore: distinguish functions and procedures for sql server (#11994)
rebelice May 15, 2024
2d17baa
chore: remove task in plan check run related components (#11995)
boojack May 15, 2024
b4ed4b0
chore: no cancel for CreateAuditLog (#11996)
RainbowDashy May 15, 2024
4a13044
feat(proto): add additional host/port and replicaset name in data sou…
h3n4l May 15, 2024
1fba23e
feat(differ): implement mssql differ part I (#11958)
rebelice May 15, 2024
cb0a966
chore: open drawer for change history (#11998)
ecmadao May 15, 2024
84d4096
feat(data-masking): add ui for inner and outer maskers (#12000)
Azusain May 15, 2024
5434d2b
feat(sql-review): new rule for checking no position in add column cla…
whhe May 16, 2024
ebece32
feat(sql-review): new rule that disallows dropping columns (#11966)
whhe May 16, 2024
489ef48
chore: no auto-complete for huge sql (#12003)
rebelice May 16, 2024
d1445bf
fix(frontend): Changelist issue creation failed when apply to multipl…
LiuJi-Jim May 16, 2024
b0bd091
feat(sql-review): new rule for OceanBase (MySQL mode) offline ddl (#1…
whhe May 16, 2024
69e78fc
feat(branch): display the latest updater info in branch (#12002)
LiuJi-Jim May 16, 2024
f6a4428
chore: support not in operator in deployment config (#12005)
ecmadao May 16, 2024
0f6eb33
chore: retire activity (#12006)
boojack May 16, 2024
4293240
chore: silence data source update mask (#12009)
d-bytebase May 16, 2024
e0552e2
fix: compare diff (#12010)
ecmadao May 16, 2024
fd0bd62
chore: change stage wording active to current (#12011)
tianzhou May 16, 2024
221c2ce
feat: handle latest updater in create/update/merge (#12008)
h3n4l May 16, 2024
71b08c5
chore: remove vitnamesse for now (#12013)
tianzhou May 16, 2024
a687357
docs: improve force label wording (#12012)
tianzhou May 16, 2024
717d2b2
chore: update demo data from 2.15.0 to 2.17.0 (#12014)
tianzhou May 16, 2024
8a0be89
refactor(schema-editor): use SchemaEditorLite to replace SchemaEditor…
LiuJi-Jim May 17, 2024
70a0851
fix: task run sheet id sql (#12016)
RainbowDashy May 17, 2024
968f781
fix: use UTC time (#12018)
RainbowDashy May 17, 2024
6afc550
feat: impl task run log for mssql oracle (#12007)
RainbowDashy May 17, 2024
d42a60e
chore: fix allowRollback condition (#12021)
LiuJi-Jim May 17, 2024
28d64e8
chore: remove rollback switch checks (#12023)
boojack May 17, 2024
6c4963a
fix: sql rollback preview (#12024)
LiuJi-Jim May 17, 2024
f9b9c89
chore: support filtering no pipeline issues (#12025)
boojack May 17, 2024
2002d31
chore: check doUpdateSheet in related specs without pipeline (#12026)
boojack May 17, 2024
02c7b0c
fix(tbl-limit-size): check row count instead of table data size (#12027)
Azusain May 17, 2024
80231aa
chore: add slow query to demo data (#12029)
tianzhou May 17, 2024
faaf583
chore: retire unused (#12031)
LiuJi-Jim May 17, 2024
ecd8159
chore(frontend): minor updates (#12032)
LiuJi-Jim May 17, 2024
45f364f
chore: update issue filter specs (#12030)
boojack May 17, 2024
0b75c21
feat: implement review issue template (#12020)
boojack May 17, 2024
c8b8389
fix: task run log for mssql & oracle (#12028)
RainbowDashy May 17, 2024
5bd3ffe
chore: support upload algorithm json file (#12033)
ecmadao May 17, 2024
1b33af6
chore: add example for upload json file (#12035)
ecmadao May 18, 2024
626b143
chore: go 1.22.3 (#12034)
d-bytebase May 18, 2024
90a2d04
chore: no binary (#12036)
d-bytebase May 18, 2024
c748e15
fix: use endOf the day as the upper limit of date time filter (#12038)
LiuJi-Jim May 20, 2024
0509829
chore: add back i18n of review center (#12039)
boojack May 20, 2024
23eec30
feat(mongodb): support mongodb replica set (#12037)
h3n4l May 20, 2024
53615e6
chore: retire oracle sql rollback (#12040)
LiuJi-Jim May 20, 2024
84289cb
chore: tweak issue options display (#12041)
boojack May 20, 2024
b372937
fix(mysql): scientific notation (#12042)
Azusain May 20, 2024
1e54de9
refactor: remove to_jsonb in jsonb_build_object (#12043)
h3n4l May 20, 2024
693e1d1
chore: sort issues (#12044)
ecmadao May 20, 2024
eb36c0c
Add SSL options support for MongoDB connections (#12046)
boojack May 20, 2024
6b8638a
feat: add direct connection in datasource proto (#12047)
h3n4l May 20, 2024
94b461f
feat(mongodb): support direct connection (#12048)
h3n4l May 20, 2024
797c1c3
chore: upgrade tsql parser for performance (#12049)
rebelice May 20, 2024
81769f7
refactor: move plan related methods from rollout service to plan serv…
boojack May 20, 2024
3fd9b2d
fix: bool algebra (#12052)
d-bytebase May 20, 2024
bab1ffc
chore: unused proto (#12053)
d-bytebase May 20, 2024
03277fe
chore: audit log user uid (#12054)
d-bytebase May 21, 2024
ca9fe7a
chore: retire issue assignee (#12055)
LiuJi-Jim May 21, 2024
e3a3a61
chore: press ESC key to hide recent visited databases (#12056)
LiuJi-Jim May 21, 2024
1513813
chore: deprecate issue comment assignee change (#12057)
d-bytebase May 21, 2024
1638080
chore(frontend): retire assignee (more) (#12058)
LiuJi-Jim May 21, 2024
3e234be
chore: add user_group table (#12059)
ecmadao May 21, 2024
75ddcab
Merge branch 'main' of github.com:bytebase/bytebase into chore/conflict
ecmadao May 21, 2024
09af09e
chore: update
ecmadao May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.6
go-version: 1.22.3
cache: false
- name: Verify go.mod is tidy
run: |
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Install dependencies
run: go generate -tags mysql ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v5
with:
version: v1.57.2
args: -j 8 --verbose --timeout 20m --max-same-issues=30 --allow-parallel-runners
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/build-artifacts-and-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,10 @@ on:
- "*.*.*"

jobs:
build-linux-binary:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.6
- uses: pnpm/[email protected]
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: "20.12.2"
cache: pnpm
cache-dependency-path: "frontend/pnpm-lock.yaml"
- run: pnpm install --frozen-lockfile
working-directory: frontend
- run: pnpm release
working-directory: frontend
- name: Build
uses: goreleaser/goreleaser-action@v5
with:
args: release --skip-publish --config scripts/.goreleaser-for-linux.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload
uses: actions/upload-artifact@v4
with:
name: bytebase-linux
path: dist/bytebase*
draft-release:
needs: [build-linux-binary]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.6
- name: Make directories
run: |
mkdir -p ./bytebase-build/linux
- name: Download linux binaries
uses: actions/download-artifact@v4
with:
name: bytebase-linux
path: ./bytebase-build/linux
- name: Release
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.6
go-version: 1.22.3
cache: false
- name: Validate links
run: go test -timeout 600s -v ./scripts/... | tee test.log; exit ${PIPESTATUS[0]}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Below diagram describes a typical mapping between an engineering org and the cor

### Prerequisites

- [Go](https://golang.org/doc/install) (1.21.6 or later)
- [Go](https://golang.org/doc/install) (1.22.3 or later)
- [pnpm](https://pnpm.io/installation)
- [Air](https://github.com/bytebase/air) (**our forked repo @87187cc with the proper signal handling**). This is for backend live reload.
```bash
Expand Down
3 changes: 3 additions & 0 deletions backend/api/gitops/gitops.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Service struct {
activityManager *activity.Manager
stateCfg *state.State
licenseService enterprise.LicenseService
planService *v1pb.PlanService
rolloutService *v1pb.RolloutService
issueService *v1pb.IssueService
}
Expand All @@ -28,6 +29,7 @@ func NewService(
activityManager *activity.Manager,
stateCfg *state.State,
licenseService enterprise.LicenseService,
planService *v1pb.PlanService,
rolloutService *v1pb.RolloutService,
issueService *v1pb.IssueService,
) *Service {
Expand All @@ -37,6 +39,7 @@ func NewService(
activityManager: activityManager,
stateCfg: stateCfg,
licenseService: licenseService,
planService: planService,
rolloutService: rolloutService,
issueService: issueService,
}
Expand Down
90 changes: 88 additions & 2 deletions backend/api/gitops/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ import (
"github.com/labstack/echo/v4"
"github.com/pkg/errors"

"github.com/bytebase/bytebase/backend/utils"

"github.com/bytebase/bytebase/backend/common"
"github.com/bytebase/bytebase/backend/common/log"
"github.com/bytebase/bytebase/backend/component/activity"
api "github.com/bytebase/bytebase/backend/legacyapi"
"github.com/bytebase/bytebase/backend/plugin/vcs"

sc "github.com/bytebase/bytebase/backend/component/sheet"

"github.com/bytebase/bytebase/backend/store"
storepb "github.com/bytebase/bytebase/proto/generated-go/store"
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
Expand Down Expand Up @@ -182,21 +186,32 @@ func validateGitHubWebhookSignature256(signature, key string, body []byte) (bool

func (s *Service) createIssueFromPRInfo(ctx context.Context, project *store.ProjectMessage, vcsProvider *store.VCSProviderMessage, vcsConnector *store.VCSConnectorMessage, prInfo *pullRequestInfo) (*v1pb.Issue, error) {
creatorID := api.SystemBotID
creatorName := common.FormatUserUID(api.SystemBotID)
user, err := s.store.GetUser(ctx, &store.FindUserMessage{Email: &prInfo.email})
if err != nil {
slog.Error("failed to find user by email", slog.String("email", prInfo.email), log.BBError(err))
}
if user != nil {
creatorID = user.ID
creatorName = common.FormatUserUID(user.ID)
}

engine, err := s.getDatabaseEngineSample(ctx, project, vcsConnector)
if err != nil {
return nil, errors.Wrapf(err, "failed to get database engine")
}

var sheets []int
for _, change := range prInfo.changes {
sheet, err := s.store.CreateSheet(ctx, &store.SheetMessage{
sheet, err := sc.CreateSheet(ctx, s.store, &store.SheetMessage{
CreatorID: creatorID,
ProjectUID: project.UID,
Title: change.path,
Statement: change.content,

Payload: &storepb.SheetPayload{
Engine: engine,
},
})
if err != nil {
return nil, errors.Wrapf(err, "failed to create sheet for file %s", change.path)
Expand All @@ -212,7 +227,7 @@ func (s *Service) createIssueFromPRInfo(ctx context.Context, project *store.Proj
childCtx := context.WithValue(ctx, common.PrincipalIDContextKey, creatorID)
childCtx = context.WithValue(childCtx, common.UserContextKey, user)
childCtx = context.WithValue(childCtx, common.LoopbackContextKey, true)
plan, err := s.rolloutService.CreatePlan(childCtx, &v1pb.CreatePlanRequest{
plan, err := s.planService.CreatePlan(childCtx, &v1pb.CreatePlanRequest{
Parent: fmt.Sprintf("projects/%s", project.ResourceID),
Plan: &v1pb.Plan{
Title: prInfo.title,
Expand Down Expand Up @@ -265,6 +280,19 @@ func (s *Service) createIssueFromPRInfo(ctx context.Context, project *store.Proj
return nil, errors.Wrapf(err, "failed to create activity payload")
}

if err := s.store.CreateAuditLog(ctx, &storepb.AuditLog{
Parent: project.GetName(),
Method: store.AuditLogMethodProjectRepositoryPush.String(),
Resource: issue.Name,
User: creatorName,
Severity: storepb.AuditLog_INFO,
Request: "",
Response: "",
Status: nil,
}); err != nil {
slog.Warn("failed to create audit log after creating issue from push event", "issueUID", issueUID)
}

activityCreate := &store.ActivityMessage{
CreatorUID: creatorID,
ResourceContainer: project.GetName(),
Expand All @@ -280,6 +308,64 @@ func (s *Service) createIssueFromPRInfo(ctx context.Context, project *store.Proj
return issue, nil
}

func (s *Service) getDatabaseEngineSample(
ctx context.Context,
project *store.ProjectMessage,
vcsConnector *store.VCSConnectorMessage,
) (storepb.Engine, error) {
sample, err := func() (*store.DatabaseMessage, error) {
if dbg := vcsConnector.Payload.GetDatabaseGroup(); dbg != "" {
projectID, databaseGroupID, err := common.GetProjectIDDatabaseGroupID(dbg)
if err != nil {
return nil, errors.Wrapf(err, "failed to get project id and database group id from %q", dbg)
}
if projectID != project.ResourceID {
return nil, errors.Errorf("project id %q in databaseGroup %q does not match project id %q in plan config", projectID, dbg, project.ResourceID)
}
databaseGroup, err := s.store.GetDatabaseGroup(ctx, &store.FindDatabaseGroupMessage{ProjectUID: &project.UID, ResourceID: &databaseGroupID})
if err != nil {
return nil, errors.Wrapf(err, "failed to get database group %q", databaseGroupID)
}
if databaseGroup == nil {
return nil, errors.Errorf("database group %q not found", databaseGroupID)
}
allDatabases, err := s.store.ListDatabases(ctx, &store.FindDatabaseMessage{ProjectID: &project.ResourceID})
if err != nil {
return nil, errors.Wrapf(err, "failed to list databases for project %q", project.ResourceID)
}

matchedDatabases, _, err := utils.GetMatchedAndUnmatchedDatabasesInDatabaseGroup(ctx, databaseGroup, allDatabases)
if err != nil {
return nil, errors.Wrapf(err, "failed to get matched and unmatched databases in database group %q", databaseGroupID)
}
if len(matchedDatabases) == 0 {
return nil, errors.Errorf("no matched databases found in database group %q", databaseGroupID)
}
return matchedDatabases[0], nil
}
allDatabases, err := s.store.ListDatabases(ctx, &store.FindDatabaseMessage{ProjectID: &project.ResourceID})
if err != nil {
return nil, errors.Wrapf(err, "failed to list databases for project %q", project.ResourceID)
}
if len(allDatabases) == 0 {
return nil, errors.Errorf("no database in the project %q", project.ResourceID)
}
return allDatabases[0], nil
}()
if err != nil {
return 0, errors.Wrapf(err, "failed to get sample database")
}

instance, err := s.store.GetInstanceV2(ctx, &store.FindInstanceMessage{ResourceID: &sample.InstanceID})
if err != nil {
return 0, errors.Wrapf(err, "failed to get instance")
}
if instance == nil {
return 0, errors.Errorf("instance not found")
}
return instance.Engine, nil
}

func (s *Service) getChangeSteps(
ctx context.Context,
project *store.ProjectMessage,
Expand Down
12 changes: 11 additions & 1 deletion backend/api/lsp/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ import (
storepb "github.com/bytebase/bytebase/proto/generated-go/store"
)

const (
// 1MB.
contentLengthLimit = 1024 * 1024
)

func newEmptyCompletionList() *lsp.CompletionList {
return &lsp.CompletionList{
IsIncomplete: false,
Expand All @@ -33,6 +38,10 @@ func (h *Handler) handleTextDocumentCompletion(ctx context.Context, _ *jsonrpc2.
if err != nil {
return nil, err
}
if len(content) > contentLengthLimit {
// We don't want to parse a huge file.
return newEmptyCompletionList(), nil
}
_, valid, why := offsetForPosition(content, params.Position)
if !valid {
return nil, errors.Errorf("invalid position %d:%d (%s)", params.Position.Line, params.Position.Character, why)
Expand All @@ -45,7 +54,8 @@ func (h *Handler) handleTextDocumentCompletion(ctx context.Context, _ *jsonrpc2.
// Nothing.
case storepb.Engine_POSTGRES, storepb.Engine_REDSHIFT, storepb.Engine_RISINGWAVE, storepb.Engine_GAUSSDB:
// Nothing.
case storepb.Engine_ORACLE, storepb.Engine_DM, storepb.Engine_OCEANBASE_ORACLE, storepb.Engine_SNOWFLAKE, storepb.Engine_MSSQL:
case storepb.Engine_MSSQL:
case storepb.Engine_ORACLE, storepb.Engine_DM, storepb.Engine_OCEANBASE_ORACLE, storepb.Engine_SNOWFLAKE:
default:
slog.Debug("Engine is not supported", slog.String("engine", engine.String()))
return newEmptyCompletionList(), nil
Expand Down
13 changes: 7 additions & 6 deletions backend/api/v1/acl_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,17 @@ var methodPermissionMap = map[string]iam.Permission{
v1pb.VCSProviderService_DeleteVCSProvider_FullMethodName: iam.PermissionVCSProvidersDelete,
v1pb.VCSProviderService_SearchVCSProviderRepositories_FullMethodName: iam.PermissionVCSProvidersSearchProjects,
v1pb.VCSProviderService_ListVCSConnectorsInProvider_FullMethodName: iam.PermissionVCSProvidersListProjects,
v1pb.RolloutService_ListPlans_FullMethodName: iam.PermissionPlansList,
v1pb.RolloutService_GetPlan_FullMethodName: iam.PermissionPlansGet,
v1pb.RolloutService_CreatePlan_FullMethodName: iam.PermissionPlansCreate,
v1pb.RolloutService_UpdatePlan_FullMethodName: iam.PermissionPlansUpdate,
v1pb.RolloutService_GetRollout_FullMethodName: iam.PermissionRolloutsGet,
v1pb.RolloutService_CreateRollout_FullMethodName: iam.PermissionRolloutsCreate,
v1pb.RolloutService_PreviewRollout_FullMethodName: iam.PermissionRolloutsPreview,
v1pb.RolloutService_ListTaskRuns_FullMethodName: iam.PermissionTaskRunsList,
v1pb.RolloutService_ListPlanCheckRuns_FullMethodName: iam.PermissionPlanCheckRunsList,
v1pb.RolloutService_RunPlanChecks_FullMethodName: iam.PermissionPlanCheckRunsRun,
v1pb.RolloutService_GetTaskRunLog_FullMethodName: iam.PermissionTaskRunsList,
v1pb.PlanService_ListPlans_FullMethodName: iam.PermissionPlansList,
v1pb.PlanService_GetPlan_FullMethodName: iam.PermissionPlansGet,
v1pb.PlanService_CreatePlan_FullMethodName: iam.PermissionPlansCreate,
v1pb.PlanService_UpdatePlan_FullMethodName: iam.PermissionPlansUpdate,
v1pb.PlanService_ListPlanCheckRuns_FullMethodName: iam.PermissionPlanCheckRunsList,
v1pb.PlanService_RunPlanChecks_FullMethodName: iam.PermissionPlanCheckRunsRun,
v1pb.SettingService_ListSettings_FullMethodName: iam.PermissionSettingsList,
v1pb.SettingService_GetSetting_FullMethodName: iam.PermissionSettingsGet,
v1pb.SettingService_UpdateSetting_FullMethodName: iam.PermissionSettingsSet,
Expand Down
6 changes: 4 additions & 2 deletions backend/api/v1/acl_iam.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func isSkippedMethod(fullMethod string) bool {
return true
// handled in the method because we need to consider plan.Creator.
case
v1pb.RolloutService_UpdatePlan_FullMethodName:
v1pb.PlanService_UpdatePlan_FullMethodName:
return true
// handled in the method because we need to consider issue.Creator and issue type.
// additional bb.plans.action and bb.rollouts.action permissions are required if the issue type is change database.
Expand Down Expand Up @@ -146,6 +146,8 @@ func isSkippedMethod(fullMethod string) bool {
return true
// handled in the method because checking is complex.
case
v1pb.AuditLogService_SearchAuditLogs_FullMethodName,
v1pb.AuditLogService_ExportAuditLogs_FullMethodName,
v1pb.InstanceService_SearchInstances_FullMethodName,
v1pb.DatabaseService_ListSlowQueries_FullMethodName,
v1pb.DatabaseService_ListDatabases_FullMethodName,
Expand All @@ -155,7 +157,7 @@ func isSkippedMethod(fullMethod string) bool {
v1pb.ProjectService_ListDatabaseGroups_FullMethodName,
v1pb.ProjectService_SearchProjects_FullMethodName,
v1pb.ChangelistService_ListChangelists_FullMethodName,
v1pb.RolloutService_ListPlans_FullMethodName,
v1pb.PlanService_ListPlans_FullMethodName,
v1pb.ProjectService_ListSchemaGroups_FullMethodName:
return true
}
Expand Down
Loading