Move tags from dast_scanner_profiles to dast_profile
What does this MR do and why?
In the Merge Request !104909 (merged) we added the table dast_profiles_tags
and in the MR !107521 (merged) we update the GraphQL api and the related mutations and services. However we realized that runner tags should be linked to the Dast::Profile
instead of the DastScannerProfile
.
This Merge Request adds the table dast_profiles_tags
and updates the related mutations and services.
The dast_scanner_profiles_tags
table will be removed in a follow-up MR.
Migrations
Add dast_profiles_tags
up
main: == 20230106184809 CreateDastProfilesTags: migrating ===========================
main: -- create_table(:dast_profiles_tags)
main: -> 0.0099s
main: == 20230106184809 CreateDastProfilesTags: migrated (0.0103s) ==================
down
main: == 20230106184809 CreateDastProfilesTags: reverting ===========================
main: -- drop_table(:dast_profiles_tags)
main: -> 0.0029s
main: == 20230106184809 CreateDastProfilesTags: reverted (0.0051s) ==================
This MR is part of issue #345430 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Create a new DastProfile
with tags.
Update the tags of a DastScannerProfile
.
How to set up and validate locally
Create a new DastProfile with tags
- Go to
/-/graphql-explorer
- Get a
dastScannerProfile
, anddastSiteProfiles
ids - Type a query like
mutation dastProfileCreate($input: DastProfileCreateInput!) {
dastProfileCreate(input: $input) {
dastProfile {
id
editPath
tagList
}
pipelineUrl
errors
}
}
with a Query Variable like:
{
"input": {
"fullPath": "root/apiscantest",
"name": "Test TagList",
"dastSiteProfileId": "gid://gitlab/DastSiteProfile/16",
"dastScannerProfileId": "gid://gitlab/DastScannerProfile/6",
"tagList": ["ruby", "dast"]
}
}
- Check the result
{
"data": {
"dastProfileCreate": {
"dastProfile": {
"id": "gid://gitlab/Dast::Profile/8",
"editPath": "/root/apiscantest/-/on_demand_scans/8/edit",
"tagList": [
"dast",
"ruby"
]
},
"pipelineUrl": null,
"errors": []
}
}
}
Update the tags of a DastProfile
- Go to
/-/graphql-explorer
- Type a query like
mutation dastProfileUpdate($input: DastProfileUpdateInput!) {
dastProfileUpdate(input: $input) {
errors
dastProfile {
tagList
}
}
}
{
"input": {
"id": "gid://gitlab/Dast::Profile/8",
"name": "Test TagList",
"tagList": ["rails", "on-demand"]
}
}
- Check the result
{
"data": {
"dastProfileUpdate": {
"errors": [],
"dastProfile": {
"tagList": [
"on-demand",
"rails"
]
}
}
}
}
Run an on-demand scan
- Go to
/-/on_demand_scans#/saved
- Find the DastProfile scan created in the previous step.
- Click in
Run scan
. - Check the job created. It should have the
DastProfile
tags.
- Wait for the job to start. It should run on the runner with all
DastProfile
tags.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Merge request reports
Activity
changed milestone to %15.8
assigned to @mc_rocha
- A deleted user
added backend database databasereview pending documentation labels
2 Warnings If you are in a revert MR, consider using the revert MR template to add labels to skip changelog checks (docs). If this is reverting something in the current milestone, we don't need to add a changelog. In this case, we can skip changelog checks by adding
~"regression:*"
label, and re-run the danger job (there is a link at the bottom of this comment).This merge request is quite big (702 lines changed), please consider splitting it into multiple merge requests. 2 Messages This merge request adds or changes files that require a review from the Database team. 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. This merge request requires a database review. To make sure these changes are reviewed, take the following steps:
-
Ensure the merge request has database and databasereview pending labels. If the merge request modifies database files, Danger will do this for you.
-
Prepare your MR for database review according to the docs.
-
Assign and mention the database reviewer suggested by Reviewer Roulette.
-
Kick off the
db:gitlabcom-database-testing
manual job. This job can also be used before requesting review to test your migrations against production data.
The following files require a review from the Database team:
db/migrate/20230106184809_create_dast_profiles_tags.rb
db/schema_migrations/20230106184809
db/structure.sql
Documentation review
The following files require a review from a technical writer:
-
db/docs/dast_profiles_tags.yml
(Link to current live version) -
doc/api/graphql/reference/index.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
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Alina Mihaila (
@alinamihaila
) (UTC+2, 7 hours ahead of@mc_rocha
)Mehmet Emin Inac (
@minac
) (UTC+1, 6 hours ahead of@mc_rocha
)database Mehmet Emin Inac (
@minac
) (UTC+1, 6 hours ahead of@mc_rocha
)Dylan Griffith (
@DylanGriffith
) (UTC+11, 16 hours ahead of@mc_rocha
)~"migration" No reviewer available No maintainer available To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Danger-
added 200 commits
-
0676145b...17ff21ff - 192 commits from branch
master
- bbb672a9 - Add dast_profiles_tags table
- b8a4d090 - Add tag_list to DastProfileType
- 55b53bcc - Add tag_list to DastProfileType
- b7723dcc - Move tag_list to DastProfile
- e77070fd - Move tag_list to DastProfile
- 0311cdb7 - Move tag_list to DastProfile
- ff14c8fc - Move tag_list to DastProfile
- a8e78724 - Move tag_list to DastProfile
Toggle commit list-
0676145b...17ff21ff - 192 commits from branch
requested review from @philipcunningham
added 292 commits
-
a8e78724...6ef94685 - 283 commits from branch
master
- 0a75e17c - Add dast_profiles_tags table
- 4d85c4f0 - Add tag_list to DastProfileType
- c452e980 - Add tag_list to DastProfileType
- 1d7257b8 - Move tag_list to DastProfile
- 1ed98963 - Move tag_list to DastProfile
- 3b826864 - Move tag_list to DastProfile
- aa89f74d - Move tag_list to DastProfile
- 4526f543 - Move tag_list to DastProfile
- 1ffe407f - Move tag_list to DastProfile
Toggle commit list-
a8e78724...6ef94685 - 283 commits from branch
- Resolved by Philip Cunningham
- Resolved by Philip Cunningham
- Resolved by Philip Cunningham
- Resolved by Philip Cunningham
- Resolved by Marcos Rocha
- Resolved by Philip Cunningham
- Resolved by Philip Cunningham
- Resolved by Philip Cunningham
- Resolved by Marcos Rocha
- Resolved by Marcos Rocha
removed review request for @philipcunningham
added 51 commits
-
44a87e11...e2dc4bbc - 48 commits from branch
master
- 98c3fada - Add dast_profiles_tags table
- ee4ddeef - Address MR comments
- 91c1ce69 - Fix spec attribute alignment
Toggle commit list-
44a87e11...e2dc4bbc - 48 commits from branch
added 554 commits
-
91c1ce69...19586bbb - 551 commits from branch
master
- 807fa6f7 - Add dast_profiles_tags table
- 81a3b846 - Address MR comments
- b699c3b9 - Fix spec attribute alignment
Toggle commit list-
91c1ce69...19586bbb - 551 commits from branch
requested review from @philipcunningham
- Resolved by Philip Cunningham
removed review request for @philipcunningham
added 108 commits
-
145d0b17...f5893993 - 102 commits from branch
master
- a78d81ac - Add dast_profiles_tags table
- e8928a21 - Address MR comments
- 1046fffe - Fix spec attribute alignment
- e1340a4c - Fix spec error message check
- dcec4c9d - Deprecate tag_list on DastScannerProfile
- 578dcbf5 - Deprecate tag_list on DastScannerProfile
Toggle commit list-
145d0b17...f5893993 - 102 commits from branch
added 13 commits
-
578dcbf5...0f293c98 - 6 commits from branch
master
- 1b89f8f9 - Add dast_profiles_tags table
- 9e06ce4a - Address MR comments
- 382b9ef0 - Fix spec attribute alignment
- 6079198c - Fix spec error message check
- 665927f4 - Deprecate tag_list on DastScannerProfile
- a184aa43 - Deprecate tag_list on DastScannerProfile
- 2fa9c438 - Deprecate tag_list on DastScannerProfile
Toggle commit list-
578dcbf5...0f293c98 - 6 commits from branch
requested review from @philipcunningham
@philipcunningham
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.
For more info, please refer to the following links:
added pipeline:mr-approved label
requested review from @stanhu and removed review request for @philipcunningham
- Resolved by Stan Hu
- Resolved by Stan Hu
added 653 commits
-
2fa9c438...edb1ddd8 - 645 commits from branch
master
- 91969bbb - Add dast_profiles_tags table
- 08f38c4e - Address MR comments
- a6d7af1f - Fix spec attribute alignment
- 2d360075 - Fix spec error message check
- 292b7309 - Deprecate tag_list on DastScannerProfile
- 5766a714 - Deprecate tag_list on DastScannerProfile
- 1c00562b - Deprecate tag_list on DastScannerProfile
- b09e73b8 - Update tag_list description and resolve signature
Toggle commit list-
2fa9c438...edb1ddd8 - 645 commits from branch
changed milestone to %15.9
@stanhu, did you forget to run a pipeline before you merged this work? Based on our code review process, if the latest pipeline was created more than 6 hours ago, and finished more than 2 hours ago, you should:
- Ensure the merge request is not in Draft status.
- Start a pipeline (especially important for Community contribution merge requests).
- Set the merge request to merge when pipeline succeeds.
This is a guideline, not a rule. Please consider replying to this comment for transparency.
This message was generated automatically. You're welcome to improve it.
mentioned in commit 852a7d39
mentioned in issue #345430 (closed)
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
mentioned in merge request !103634 (merged)
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!1922 (merged)
added releasedpublished label and removed releasedcandidate label
mentioned in issue #505982