Commit Graph

178 Commits (release/3.0.0-beta.10)

Author SHA1 Message Date
Dhruv Dhruv 38023da2db feat: [CDE-286]: Moving user and git mgmt to respective services. (#2634)
* feat: [CDE-286]: Moving user and git mgmt to respective services.
2024-09-02 10:27:27 +00:00
Arvind Choudhary 77e93d587c [AH-310]: temp push; need to check (#2607)
* [AH-310]: Updated secret flows
* [AH-310]: Fixed build issues
* [AH-310]: temp push; need to check
2024-08-29 19:42:22 +00:00
Dhruv Dhruv d50945fd60 feat: [CDE-278]: Ensure infra is in provisioned state before triggering stop or delete, or before fectching logs. (#2616)
* feat: [CDE-278]: Ensure infra is in provisioned state before triggering stop or delete, or before fectching logs.
2024-08-29 13:38:54 +00:00
Marko Gaćeša 75042e9293 add pullreq list API for spaces (#2606)
* moved the service to the existing pullreq package
* add pullreq list API for spaces
2024-08-29 11:49:33 +00:00
Akhilesh Pandey 0578be8afe feat: [CODE-1941]: user group changes (#2134)
* feat: [CODE-1941]: remove usergroup filter from request
* feat: [CODE-1941]: decrement page for harness-core
* feat: [CODE-1941]: update pagination request
* feat: [CODE-1941]: change interface from find to list
* feat: [CODE-1941]: change reviewer add permissions
* feat: [CODE-1941]: comments
* feat: [CODE-1941]: comments
* fix wire issues
* feat: [CODE-1941]: remove users from the db table usergroups
* feat: [CODE-1941]: annotate errors
* feat: [CODE-1941]: annotate errors
* feat: [CODE-1941]: sql style
* feat: [CODE-1941]: revert common.go change for parse limit
* feat: [CODE-1941]: move usergroup listing to space level
* feat: [CODE-1941]: update usergroup listing and update delete to push permission
* feat: [CODE-1941]: Update combined listing
* feat: [CODE-1941]: Update combined listing
* feat: [CODE-1941]: format
* feat: [CODE-1941]: rebase
* feat: [CODE-1941]: separate db struct for usergroup.go
* feat: [CODE-1941]: change usergroup filter to default query and review comments
* feat: [CODE-1941]: change usergroup filter to default
* feat: [CODE-1941]: change return type for search service interface
* feat: [CODE-1941]: change return type for search service interface
* feat: [CODE-1941]: change return type for search service interface
* feat: [CODE-1941]: Search Service interface and wire changes
* feat: [CODE-1941]: Search Service interface and wire changes
* feat: [CODE-1941]: Search UserGroups Handler change - codeformat
* feat: [CODE-1941]: Search UserGroups Handler change - codeformat
* feat: [CODE-1941]: Search UserGroups Handler change - codeformat
* feat: [CODE-1941]: Search UserGroups Handler change
* feat: [CODE-1941]: Big change: New LOGIC for UserGroup Reviewers
* feat: [CODE-1941]: DB changes
* feat: [CODE-1941]: listing api
* feat: [CODE-1941]: mapping methods
* feat: [CODE-1941]: list method for pullreq_reviewers db
* feat: [CODE-1941]: database queries
* feat: [CODE-1941]: database queries
* feat: [CODE-2058]: dbstore changes
* feat: [CODE-1941]: Controller and Database code
* feat: [CODE-1941]: update reviewer_add.go code
* feat: [CODE-1941]: update reviewers and usergroup db migrations
* feat: [CODE-1941]: Update API ops
* feat: [CODE-1941]: Update DB ops for reviewers
* feat: [CODE-1941]: db migration update
* feat: [CODE-1941]: db migration update
* feat: [CODE-1941]: code comments
* feat: [CODE-1941]: update migration numbering
* feat: [CODE-1941]: Add postgresql migrations
* feat: [CODE-1941]: Update DB ops for reviewers

feat: [CODE-1941]: Update API ops

feat: [CODE-1941]: update reviewers and usergroup db migrations

feat: [CODE-1941]: update reviewer_add.go code

feat: [CODE-1941]: break pr

feat: [CODE-1941]: break pr

feat: [CODE-1941]: Update migration numbering
* feat: [CODE-1941]: create table usergroups
* feat: [CODE-1941]: table migrations
* feat: [CODE-1941]: user group changes
2024-08-26 15:35:27 +00:00
Dhruv Dhruv 01e26bdb82 feat: [CDE-263]: Changes to track Gitspaces usage across installations. (#2584)
* feat: [CDE-263]: Changes to track Gitspaces usage across installations.
2024-08-26 08:24:06 +00:00
Tudor Macari 40ee05ca11 feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
Yogesh Chauhan 59614e73f4 feat: [ML-302]: Framework For Harness Intelligence APIs (#2547)
* feat: [ML-302]: Framework For Harness Intelligence APIs
2024-08-20 22:05:29 +00:00
Ansuman Satapathy 93af2c724e feat: [CDE-192]: show user info for gitspace listing. (#2531)
* feat: [CDE-192]: added TODO to move to user int as key
* feat: [CDE-192]: added created by col for gitspace config
* feat: [CDE-192]: added created by col for gitspace config
* feat: [CDE-192]: added created by col for gitspace config
* feat: [CDE-192]: added created by col for gitspace config
* feat: [CDE-192]: wire principal info cache
* feat: [CDE-192]: show user info for gitspace listing.
* feat: [CDE-192]: show user info for gitspace listing.
2024-08-20 09:34:10 +00:00
Enver Biševac 6d0db9512e feat: instrumentation, intitial work (#2475)
* requested changes
* requested changes
* feat: instrumentation, intitial work
2024-08-18 22:04:34 +00:00
Ansuman Satapathy 2f3b6a6f85 feat: [CDE-177]: Update listing page for CDE (#2506)
* feat: [CDE-207]: Fixed typecheck (#2513)

* feat: [CDE-207]: remove currentUserInfo app prop
* Merge branch 'CDE-207-FixTypeCheck' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into CDE-207-FixTypeCheck
* feat: [CDE-207]: remove currentUserInfo app prop
* feat: [CDE-207]: Fixed typecheck
* feat: [CDE-207]: Fixed typecheck
* feat: [CDE-207]: Fixed typecheck
* feat: [CDE-207]: Fixed typecheck
* fix lint errors (#2520)

* add copyright header
* add copyright header
* fix lint errors
* feat: [CDE-192]: mark stuck actions as error
* feat: [CDE-192]: mark stuck actions as error
* feat: [CDE-192]: mark stuck actions as error
* feat: [CDE-192]: fix gitspace instance store
* Merge remote-tracking branch 'origin/main' into CDE-New
* add secret resolver in gitness (#2493)

* rename identifier to space identifier
* update factory method
* remove access_key from gitspace table
* add access key and type to devcontainer exec
* add migration for gitspace access key ref
* fix error message for resolver factory
* update resolver interface
* add secret resolver in gitness
* feat: [CDE-192]: correctly update date and sync update
* Merge remote-tracking branch 'origin/main' into CDE-New

# Conflicts:
#	app/api/controller/gitspace/action.go
#	app/api/controller/gitspace/delete.go
* feat: [CDE-192]: correctly update dates for updated
* feat: [CDE-192]: handle empty inputparams
* feat: [CDE-192]: handle empty inputparams
* Merge remote-tracking branch 'origin/main' into CDE-New
* Merge remote-tracking branch 'origin/main' into CDE-New
* feat: [CDE-207]: Use SCM api hook (#2499)

* feat: [CDE-207]: Updated Strings
* feat: [CDE-207]: Use SCM api hook
* feat: fixed string issue (#2476)

* feat: [CDE-211]: fixed lint issues
* feat: [CDE-211]: fixed lint issues
* feat: fixed string issue
* feat: fixed string issue (#2474)

* feat: fixed string issue
* add ssh identifier in map functions in gitness store
* add ssh fields in types
* feat: fixed GitspaceCodeRepoType in create payload
* feat: updated common hooks
* feat: update for listing
* feat: update for listing
* feat: removed cde folder
* feat: [CDE-177]: Update listing page for CDE
2024-08-16 06:46:02 +00:00
Dhruv Dhruv 008aa5c17a feat: [CDE-227]: Change SSH port for VSCode. (#2445)
* feat: [CDE-227]: Change SSH port for VSCode.
2024-08-09 08:31:14 +00:00
Atefeh Mohseni Ejiyeh cef6708a1e Support Repo Migration APIs (create repo, import PRs, webhooks, and branch rules) (#2158)
* update migrator mdoule
* added formatted forbidden error helper
* delete work sum
* check branch rule identifier check
* match migrator data contract for webhooks
* self review
* self review
* self review, code cleaning
* resolve conflicts
* updated import api calls
* resolve conflicts
* lint
* bypass pre-receive block ref update on push if it's migrator push
* migrate controller and apis
* pull main
* add migrate routes to terminate path prefix apis
* move apis to migrate pkg
* Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into atmsn/import_meta
* import branch rules API
* wip import webhooks
2024-08-07 23:40:09 +00:00
Ansuman Satapathy 9fc9a498e2 feat: [CDE-192]: modularize gitspace services (#2404)
* feat: [CDE-192]: resource identifier empty
* feat: [CDE-192]: resource identifier empty
* feat: [CDE-192]: resource identifier empty
* feat: [CDE-192]: resource identifier empty
* feat: [CDE-192]: address comments
* feat: [CDE-192]: split config and resource creation
* feat: [CDE-192]: split config and res creation
* feat: [CDE-192]: modularize gitspace services
2024-08-07 08:27:29 +00:00
Dhruv Dhruv 52bfdfb3f8 feat: [CDE-220]: Adding gitspace instance identifier to infra provisioning. Adding checks to ensure infra status is always same as required. Adding infra status type error enum. Adding util method to derive gitspace container name. Cleaning parameters to use values instead of references. Refactoring fields for infra struct to make them more explicit. Adding config to read agent port and pass it on to infra provider for provisioning and finding. (#2411)
* feat: [CDE:220]: Adding util method to get working dir from repo name.
* feat: [CDE:220]: Addressing review comments.
* feat: [CDE-220]: Adding gitspace instance identifier to infra provisioning. Adding checks to ensure infra status is always same as required. Adding infra status type error enum. Adding util method to derive gitspace container name. Cleaning parameters to use values instead of references. Refactoring fields for infra struct to make them more explicit. Adding config to read agent port and pass it on to infra provider for provisioning and finding.
2024-08-07 02:29:10 +00:00
Ansuman Satapathy 6338af6336 feat: [CDE-192]: modularize gitspace services (#2396)
* feat: [CDE-192]: modularize gitspace services
* feat: [CDE-192]: modularize gitspace services
2024-08-05 10:00:48 +00:00
Dhruv Dhruv 34a07f4d8b feat: [CDE-192]: Adding infra template and provisioned stores and using those in infra provisioning flows. (#2392)
* Addressing review comments and fixing lint issues.
* feat: [CDE-192]: modularize gitspace services
* feat: [CDE-192]: modularize gitspace services
* feat: [CDE-192]: Adding infra template and provisioned stores and using those in infra provisioning flows.
2024-08-05 07:48:47 +00:00
Dhruv Dhruv 9d5071b45c feat: [CDE-203]: Making infra processing async. (#2325)
* Cleaning the flow around gitspace instance update.
* Renaming params and param schema types.
* Correcting comments.
* feat: [CDE-203]: Making infra processing async.
* feat: [CDE-203]: Making infra processing async.
* feat: [CDE-203]: Making infra processing async.
2024-08-01 10:01:31 +00:00
Ansuman Satapathy 42af216dc7 feat: [CDE-195]: use dependency-injection for scm providers for gitspaces. (#2308)
* feat: [CDE-195]: use dependency-injection for scm providers for gitspaces.
* feat: [CDE-195]: use dependency-injection for scm providers for gitspaces.
* feat: [CDE-195]: use dependency-injection for scm providers for gitspaces.
2024-07-30 07:02:59 +00:00
Vistaar Juneja 722caeddf8 fix: [CI-13599]: use latest version of docker (#2288)
* fix merge conflicts
* fix pr checks
* fix go mod tidy
* fix: [CI-13599]: use latest version of docker
2024-07-26 13:04:45 +00:00
Ansuman Satapathy b6034a25aa feat: [CDE-195]: read devcontainer.json directly for gitness (#2294)
* feat: [CDE-195]: Run VS Code Web as non-root user.
* feat: [CDE-195]: read devcontainer.json directly for gitness
2024-07-26 12:44:36 +00:00
Dhruv Dhruv 9232029c74 WIP (#2284)
* feat: [CDE-194]: Reverting docker port range changes.
* feat: [CDE-194]: Removing extra types.
* feat: [CDE-194]: Restructuring code around port publishing and forwarding.
* WIP
* WIP
* WIP
* WIP
2024-07-26 06:26:22 +00:00
Darko Draskovic 81fcd524c8 Add label feature (#2073)
* Address PR comments
* Add list label from ancestor scopes query param
* Add label feature
2024-07-25 14:57:56 +00:00
Abhinav Singh d0562a573c feat: [CODE-2146]: add new router paradigm
* lint
* address comment
* fix
* ssh ctx
* add ctx for new places
* generate wiregen
* Merge remote-tracking branch 'harness0/main' into abhinav/new-router-paradigm
* Merge branch 'main' into abhinav/new-router-paradigm
* add new discussion changes
* address comment
* address comment
* address comment
* address comment
* address comment
* feat: abstract routers logic
* feat: abstract routers logic
* feat: abstract routers logic
* feat: abstract routers logic
* feat: abstract routers logic
* feat: abstract routers logic
* feat: abstract routers logic
* style
* remove nil context
* add ctx to missing
* style
* remvoe ctx
* remvoe ctx
* feat: provider should have ctx
2024-07-23 21:39:39 +00:00
Ansuman Satapathy 0bbcc98b61 feat: [CDE-142]: extract gitspace find to its own svc (#2251)
* feat: [CDE-142]: extract gitspace find to its own svc
* feat: [CDE-142]: extract gitspace find to its own svc
* feat: [CDE-142]: extract gitspace find to its own svc
* feat: [CDE-142]: extract gitspace find to its own svc
* feat: [CDE-142]: extract gitspace find to its own svc
2024-07-19 11:43:43 +00:00
Ansuman Satapathy 767bb717d9 feat: [CDE-142]: provider interface pass pointers. (#2232)
* feat: [CDE-142]: provider interface pass pointers.
* feat: [CDE-142]: provider interface pass pointers.
* feat: [CDE-142]: provider interface pass pointers.
* feat: [CDE-142]: provider interface pass pointers.
* feat: [CDE-142]: provider interface pass pointers.
* feat: [CDE-142]: provider interface pass pointers.
2024-07-16 13:06:08 +00:00
Dhruv Dhruv 6e516183fd feat: [CDE-163]: Moving dir creation and deletion to infra provider. Refactoring gitspace env variables. Renaming unprovisioning to deprovisioning. (#2231)
* feat: [CDE-163]: Moving dir creation and deletion to infra provider. Refactoring gitspace env variables. Renaming unprovisioning to deprovisioning.
2024-07-16 07:59:02 +00:00
Dhruv Dhruv b9d3bb4d2b feat: [CDE-140]: Adding docker machine host name config to identify the public host name on which the docker host is running. Updated the docker config to read from the default docker env variables if config values are not set. Updated the events timestamp to use nanoseconds. Fixed the working directory response and cleaned the logic of how the gitspace instance url is generated. Updated the scm service to parse repo name in a provider agnostic manner. (#2201)
* feat: [CDE-140]: Fixing ProvideGitspaceContainerOrchestratorConfig.
* feat: [CDE-140]: Fixing ProvideGitspaceContainerOrchestratorConfig.
* feat: [CDE-140]: Addressing review comments.
* feat: [CDE-140]: Reverting changes done for docker config default values. Adding default value of GITNESS_GITSPACE_DEFAULT_BIND_MOUNT_SOURCE_BASE_PATH and GITNESS_DOCKER_HOST to Dockerfile. Adding new column in gitspace_events table for storing event timestamp in nanoseconds and corresponding migrations.
* Lingting.
* feat: [CDE-140]: Adding docker machine host name config to identify the public host name on which the docker host is running. Updated the docker config to read from the default docker env variables if config values are not set. Updated the events timestamp to use nanoseconds. Fixed the working directory response and cleaned the logic of how the gitspace instance url is generated. Updated the scm service to parse repo name in a provider agnostic manner.
2024-07-13 04:35:20 +00:00
Ansuman Satapathy 050415afdf feat: [CDE-137]: add a service layer for infraproviders, autoadd infraprovider (#2204)
* feat: [CDE-137]: add missing type.
* feat: [CDE-137]: add missing type.
* feat: [CDE-137]: add missing type.
* feat: [CDE-137]: add missing type.
* feat: [CDE-137]: add a service layer for infraproviders, autoadd infraprovider
2024-07-12 08:45:10 +00:00
Ansuman Satapathy 18226c8914 feat: [CDE-137]: check valid code repository for CDE use. (#2197)
* feat: [CDE-137]: check valid code repository for CDE use.
* feat: [CDE-137]: check valid code repository for CDE use.
* feat: [CDE-137]: check valid code repository for CDE use.
2024-07-11 05:47:29 +00:00
Dhruv Dhruv e712903728 feat: [CDE-94]: Adding events for gitspace transitions. (#2195)
* feat: [CDE-94]: Fixing gitspace url.
* feat: [CDE-94]: Linting
* feat: [CDE-94]: Adding events for gitspace transitions.
2024-07-10 13:06:38 +00:00
Dhruv Dhruv 87157de7fa feat: [CDE-127]: Adding changes to include logging in container orchestration's start flow. (#2192)
* feat: [CDE-96]: Renaming reusable scanner as scanner doesn't support resetting the reader. Removing closec as return param in livelog.Tail method. CLosing the handler channel when the stream is closed, this ensures the consumer to know the channel is closed. Adding a check in the render.StreamSSE to close the stream when the events channel is closed and drained.
* feat: [CDE-127]: Changes to enable log stream API for gitspaces. Adding close channel to the logstream Tail method. Changes to use a default host and working dir from config for a running gitspace instance's URL. Change to append gitspaces to the bind mount of the gitspace container in the container orchestrator instead of in the config provider.
* Initial commit
* feat: [CDE-127]: Removing streams map from StatefulLogger. Flushing the stream every time the invoking function is closed.
* feat: [CDE-127]: Removing streams map from StatefulLogger. Flushing the stream every time the invoking function is closed.
* feat: [CDE-127]: Adding flush stream logic to delete gitspace in orchestrator. Linting.
* feat: [CDE-127]: Addressing review comments.
* feat: [CDE-127]: Adding changes to make logutil.StatefulLogger a wrapper on livelog.LogStream and adding initialisation and flush functions.
* feat: [CDE-127]: Adding changes to make logutil.StatefulLogger a wrapper on livelog.LogStream and adding initialisation and flush functions.
* feat: [CDE-127]: Adding changes to include logging in container orchestration's start flow.
2024-07-10 10:25:41 +00:00
Ansuman Satapathy 6e525fca4a feat: [CDE-127]: read multi-table and multi query data in a single SQL txn (#2193)
* feat: [CDE-127]: starting and stopping states.
* feat: [CDE-127]: read multi-table and multi query data in a single SQL txn
2024-07-10 07:10:54 +00:00
Dhruv Dhruv d577102d5e feat: [CDE-127]: Adding changes to include logging in container orchestration. (#2178)
* feat: [CDE-127]: Linting.
* Merge branch 'refs/heads/main' into CDE-127

# Conflicts:
#	app/gitspace/orchestrator/container/embedded_docker.go
#	cmd/gitness/wire.go
* feat: [CDE-127]: Addressing review comments.
* feat: [CDE-127]: Removing streams map from StatefulLogger. Flushing the stream every time the invoking function is closed.
* feat: [CDE-127]: Removing streams map from StatefulLogger. Flushing the stream every time the invoking function is closed.
* feat: [CDE-127]: Removing streams map from StatefulLogger. Flushing the stream every time the invoking function is closed.
* feat: [CDE-127]: Removing streams map from StatefulLogger. Flushing the stream every time the invoking function is closed.
* feat: [CDE-127]: Adding flush stream logic to delete gitspace in orchestrator. Linting.
* feat: [CDE-127]: Adding flush stream logic to delete gitspace in orchestrator. Linting.
* feat: [CDE-127]: Addressing review comments.
* feat: [CDE-127]: Adding changes to make logutil.StatefulLogger a wrapper on livelog.LogStream and adding initialisation and flush functions.
* feat: [CDE-127]: Adding changes to make logutil.StatefulLogger a wrapper on livelog.LogStream and adding initialisation and flush functions.
* feat: [CDE-127]: Adding changes to include logging in container orchestration's stop flow.
* feat: [CDE-127]: Adding changes to include logging in container orchestration's start flow.
2024-07-09 21:13:47 +00:00
Ansuman Satapathy bf0890bd07 feat: [CDE-127]: updated gitspace delete logic, fixed listing (#2183)
* fixed events list API query
* feat: [CDE-127]: fixed events list API
* fixed events list API query
* feat: [CDE-127]: updated gitspace delete logic, fixed listing
2024-07-09 14:03:54 +00:00
Ansuman Satapathy f78439593c gitspaces API Implementation (#2136)
* feat: [CDE-83]: fixed linting issues.
* feat: [CDE-83]: fixed linting issues.
* feat: [CDE-83]: fixed linting issues.
* feat: [CDE-83]: fixed types
* feat: [CDE-83]: fixed types
* feat: [CDE-83]: fixed types
* feat: [CDE-83]: fixed types
* feat: [CDE-83]: fixed types
* feat: [CDE-83]: fixed DB comments.
* feat: [CDE-83]: fixed DB comments.
* feat: [CDE-83]: Implemented the action API
* gitspaces API Implementation
2024-07-09 05:23:02 +00:00
Dhruv Dhruv f3d3f7392a feat: [CDE-93]: List API to fetch gitspace events. (#2176)
* feat: [CDE-93]: Adding openapi spec.
* feat: [CDE-93]: List API to fetch gitspace events.
2024-07-08 08:29:56 +00:00
Marko Gaćeša 5427130a42 pull request import (#2121)
* bypass lint
* bump golang version
* using types from migrator
* moving Importing to the RepositoryOutput
* minor changes; improved unit tests
* pr comments
* pr import
* pull request import
2024-07-06 00:46:36 +00:00
Ansuman Satapathy 728a419267 feat: [CDE-83]: Added scaffolding for APIs for gitspaces (#2173)
* feat: [CDE-83]: Added scaffolding for APIs
* feat: [CDE-83]: Added scaffolding for APIs
2024-07-05 13:03:10 +00:00
Abhinav Singh b333f42142 feat: add users check (#2132) 2024-07-01 20:45:12 +00:00
Enver Biševac 2f8900e463 [code-1946] initial work on ssh server (#2075) 2024-06-03 12:47:31 +00:00
Marko Gaćeša 0d72a20450 ssh public keys: db and api (#2058) 2024-05-27 14:26:21 +00:00
Johannes Batzill bc568edd85 fix cleanup for failed repo create, cleanup summary git api (#2064) 2024-05-24 00:38:29 +00:00
Atefeh Mohseni Ejiyeh c365ef246a Support Public Access (#2021) 2024-05-23 04:56:26 +00:00
Darko Draskovic e31f33adde Add comment mentions metadata and return id to principal info mapping in list activity response (#2024) 2024-05-10 23:22:59 +00:00
Enver Bisevac d31dd11fcf [code-1692] update repo settings audit log (#1231) 2024-04-19 09:43:51 +00:00
Enver Bisevac 2ce0f96b59 [code-1524] audit trail for import repositories (#1209) 2024-04-12 18:35:29 +00:00
Marko Gacesa 781b3547c0 refactor git hook calling and shared repo (#1200) 2024-04-12 09:48:35 +00:00
Enver Bisevac 227aac90b5 [code-1524] audit trails package (#1176) 2024-04-08 21:13:57 +00:00
Atefeh Mohseni-Ejiyeh b64f4c41fa Update default branch on empty repo for first commit (#1122) 2024-04-04 01:16:43 +00:00