Adding create and delete apis for instance namespace filters
What does this MR do and why?
As part of consolidation of external audit event streaming destinations in &12339, this MR introduces APIs for creating and deleting namespace_filters
for instance level external audit event destinations.
How to set up and validate locally
- Make sure you have a GitLab instance with Ultimate license. Also have some groups and projects in the instance.
- First create an external audit event destination for the instance by running following mutation in http://gitlab.localdev:3000/-/graphql-explorer.
mutation instanceAuditEventStreamingDestinationsCreate {
instanceAuditEventStreamingDestinationsCreate(input: {
name: "testdest7",
category: "http",
secretToken: "random_secret_token",
config: {
url: "https://www.example.com"
}
}) {
errors
externalAuditEventDestination {
id
name
config
category
}
}
}
- Now create a namespace filter for the destination by running following mutation, here you can pass any group or project that exists in the instance:
mutation auditEventsInstanceDestinationNamespaceFilterCreate {
auditEventsInstanceDestinationNamespaceFilterCreate(input: {
destinationId: "gid://gitlab/AuditEvents::Instance::ExternalStreamingDestination/1",
namespacePath: "<group or project full_path, for example flightjs/Flight>"
}) {
errors
namespaceFilter {
id
namespace {
id
name
fullName
}
}
}
}
- For deleting the namespace filter you can run following mutation:
mutation auditEventsInstanceDestinationNamespaceFilterDelete {
auditEventsInstanceDestinationNamespaceFilterDelete(input: {
namespaceFilterId: "gid://gitlab/AuditEvents::Instance::NamespaceFilter/1"
}) {
errors
}
}
- You should not get errors in any of the above mutations.
- You can also list down all the streaming destination with their namespace filters by running
query auditEventsInstanceStreamingDestinations {
auditEventsInstanceStreamingDestinations {
nodes {
id
name
category
config
namespaceFilters {
id
}
}
}
}
Related to #436613 (closed)
Merge request reports
Activity
changed milestone to %17.1
assigned to @hraghuvanshi
- A deleted user
added documentation label
1 Warning 682997f5: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. 1 Message This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge. Documentation review
The following files require a review from a technical writer:
-
doc/api/graphql/reference/index.md
(Link to current live version) -
doc/user/compliance/audit_event_types.md
(Link to current live version)
The review does not need to block merging this merge request. See the:
-
Metadata for the
*.md
files that you've changed. The first few lines of each*.md
file identify the stage and group most closely associated with your docs change. - The Technical Writer assigned for that stage and group.
- Documentation workflows for information on when to assign a merge request for review.
Reviewer roulette
Category Reviewer Maintainer backend @srajadas
(UTC-7, 12.5 hours behind author)
@drew
(UTC+0, 5.5 hours behind author)
groupauthorization Reviewer review is optional for groupauthorization @hmehra
(UTC+10, 4.5 hours ahead of author)
Please check reviewer's status!
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Danger-
added pipelinetier-1 label
added 3623 commits
-
b87cc242...62d34ae3 - 3620 commits from branch
master
- 4cbba0fa - Merge branch 'master' into 436613-instance-namespace-apis
- f45cc75d - Updated audit event docs
- 7d9c4e02 - Fixed linter issues
Toggle commit list-
b87cc242...62d34ae3 - 3620 commits from branch
added 220 commits
-
163aa1a6...3c4a293f - 219 commits from branch
master
- 2675bfb3 - Merge branch 'master' into 436613-instance-namespace-apis
-
163aa1a6...3c4a293f - 219 commits from branch
added 69 commits
-
462a707e...90e847b8 - 68 commits from branch
master
- 95a53963 - Added create and delete apis for instance level namespace filters
-
462a707e...90e847b8 - 68 commits from branch
- Resolved by Jarka Košanová
@harsimarsandhu Can you please do initial backend review here? Also, assign to
@jarka
for backend maintainer and groupauthorization review.
requested review from @harsimarsandhu
added pipeline:mr-approved label
- Resolved by Jarka Košanová
@harsimarsandhu
, thanks for approving this merge request.This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break
master
, a new pipeline will be started shortly.Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.
added pipelinetier-2 label and removed pipelinetier-1 label
requested review from @jarka and removed review request for @harsimarsandhu
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 69d8c7caexpand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Govern | 65 | 0 | 0 | 0 | 65 | ✅ | | Release | 5 | 0 | 0 | 0 | 5 | ✅ | | Plan | 56 | 0 | 2 | 0 | 58 | ✅ | | Create | 121 | 0 | 11 | 0 | 132 | ✅ | | Package | 19 | 0 | 12 | 0 | 31 | ✅ | | Data Stores | 31 | 0 | 0 | 0 | 31 | ✅ | | Analytics | 2 | 0 | 0 | 0 | 2 | ✅ | | Monitor | 8 | 0 | 0 | 0 | 8 | ✅ | | Verify | 30 | 0 | 2 | 0 | 32 | ✅ | | Manage | 0 | 0 | 1 | 0 | 1 | ➖ | | Fulfillment | 1 | 0 | 0 | 0 | 1 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 338 | 0 | 28 | 0 | 366 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for 69d8c7caexpand test summary
+-------------------------------------------------------------+ | suites summary | +--------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +--------+--------+--------+---------+-------+-------+--------+ | Govern | 106 | 1 | 8 | 1 | 115 | ❌ | | Create | 276 | 0 | 30 | 0 | 306 | ✅ | | Plan | 4 | 0 | 0 | 0 | 4 | ✅ | +--------+--------+--------+---------+-------+-------+--------+ | Total | 386 | 1 | 38 | 1 | 425 | ❌ | +--------+--------+--------+---------+-------+-------+--------+
e2e-test-on-cng:
test report for 69d8c7caexpand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Create | 134 | 1 | 15 | 0 | 150 | ❌ | | Verify | 55 | 0 | 11 | 0 | 66 | ✅ | | Govern | 79 | 0 | 9 | 0 | 88 | ✅ | | Package | 23 | 0 | 15 | 0 | 38 | ✅ | | Data Stores | 34 | 0 | 9 | 0 | 43 | ✅ | | Plan | 79 | 0 | 6 | 0 | 85 | ✅ | | Monitor | 8 | 0 | 12 | 0 | 20 | ✅ | | Fulfillment | 2 | 0 | 24 | 0 | 26 | ✅ | | Manage | 2 | 0 | 8 | 0 | 10 | ✅ | | Release | 5 | 0 | 1 | 0 | 6 | ✅ | | Configure | 0 | 0 | 3 | 0 | 3 | ➖ | | Growth | 0 | 0 | 2 | 0 | 2 | ➖ | | Ai-powered | 0 | 0 | 1 | 0 | 1 | ➖ | | Secure | 3 | 0 | 1 | 0 | 4 | ✅ | | ModelOps | 0 | 0 | 1 | 0 | 1 | ➖ | | Analytics | 2 | 0 | 0 | 0 | 2 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 426 | 1 | 118 | 0 | 545 | ❌ | +-------------+--------+--------+---------+-------+-------+--------+
- Resolved by Jarka Košanová
- Resolved by Jarka Košanová
- Resolved by Jarka Košanová
- Resolved by Jarka Košanová
- Resolved by Jarka Košanová
- Resolved by Jarka Košanová
- Resolved by Jarka Košanová
- Resolved by Jarka Košanová
- Resolved by Jarka Košanová
added 1628 commits
-
95a53963...bb69c7a5 - 1627 commits from branch
master
- e8359737 - Added create and delete apis for instance level namespace filters
-
95a53963...bb69c7a5 - 1627 commits from branch
- Resolved by Jarka Košanová
added 2 commits
reset approvals from @harsimarsandhu by pushing to the branch
added pipelinetier-1 label and removed pipelinetier-2 label
- Resolved by Evan Read
@eread Can you please do Technical Writing review here?
requested review from @eread
- Resolved by Hitesh Raghuvanshi
added Technical Writing label
removed review request for @eread
requested review from @eread
requested review from @jarka
added 300 commits
Toggle commit listmentioned in incident gitlab-org/quality/engineering-productivity/approved-mr-pipeline-incidents#510 (closed)
added docsfeature label
removed review request for @eread
added pipelinetier-2 label and removed pipelinetier-1 label
- Resolved by Jarka Košanová
Before you set this MR to auto-merge
This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.
Before you resolve this discussion, please check the following:
- You are the last maintainer of this merge request
- The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
- This pipeline is recent enough (created in the last 8 hours)
If all the criteria above apply, please resolve this discussion and the set auto-merge for this merge request.
See pipeline tiers and merging a merge request for more details.
reset approvals from @eread by pushing to the branch
added 164 commits
-
13b0a8e2...27181c0b - 156 commits from branch
master
- 7e9d9966 - Added create and delete apis for instance level namespace filters
- 682997f5 - Refactored test cases
- 18847647 - Updated graphql docs
- 1460acf3 - Fixed rubocop offence
- 4b11fc5e - Adding suggestion from reviewer
- 523bef66 - Adding auto generated graphql docs
- 821cd66e - Upgraded milestone version
- 69d8c7ca - Upgraded milestone version
Toggle commit list-
13b0a8e2...27181c0b - 156 commits from branch
added pipelinetier-1 label and removed pipelinetier-2 label
added pipelinetier-2 label and removed pipelinetier-1 label
changed milestone to %17.2
added pipelinetier-3 label and removed pipelinetier-2 label
enabled automatic add to merge train when the pipeline for 52321432 succeeds
Thanks @hraghuvanshi , looks great! MWPS set
enabled automatic add to merge train when the pipeline for e7269bac succeeds
mentioned in commit 7045aff7
added workflowstaging-canary label and removed workflowplanning breakdown label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
mentioned in issue #436613 (closed)
added workflowpost-deploy-db-staging label and removed workflowproduction label
added releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!3178 (merged)
added releasedpublished label and removed releasedcandidate label