feat: gitlab-ci#2633
Merged
Merged
Conversation
21a6181 to
979ca59
Compare
Add CollectApiJobs Add ExtractApiJobs Alert _tool_gitlab_pipelines Nddtfjiang <zhicheng.jiang@merico.dev>
warren830
requested changes
Aug 3, 2022
Contributor
warren830
left a comment
There was a problem hiding this comment.
Good job, some minor issues need to be fixed
| 1,485865876,12345678,2022-03-07T08:04:56.406+00:00,failed,refs/merge-requests/74/head,db45efd231dbaca1337bd29bc1f65f404754e6bd,https://gitlab.com/merico-dev/ee/charts/-/pipelines/485865876,480,,,,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_pipeline,168, | ||
| 1,485877118,12345678,2022-03-07T08:22:48.943+00:00,failed,refs/merge-requests/74/head,09f81b1b2d083411c0bfecd32d7728479b594503,https://gitlab.com/merico-dev/ee/charts/-/pipelines/485877118,289,,,,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_pipeline,169, | ||
| 1,485905167,12345678,2022-03-07T09:02:09.994+00:00,failed,refs/merge-requests/74/head,cce432655861efafcd05edc8de09e305c772d2b8,https://gitlab.com/merico-dev/ee/charts/-/pipelines/485905167,687,,,,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_pipeline,170, | ||
| 1,485932863,12345678,2022-03-07T09:34:57.476+00:00,success,refs/merge-requests/74/head,12fc3a42080bb98ca520817bd4fe0ca33c0bb279,https://gitlab.com/merico-dev/ee/charts/-/pipelines/485932863,398,,,,"{""ConnectionId"":1,""ProjectId"":12345678}",_raw_gitlab_api_pipeline,171, |
Contributor
There was a problem hiding this comment.
we'd better do e2e after we finish design
| } | ||
|
|
||
| func (*alertPipeline) Up(ctx context.Context, db *gorm.DB) error { | ||
| err := db.Migrator().DropColumn(&archived.GitlabPipeline{}, "started_at") |
Contributor
There was a problem hiding this comment.
We can keep started_at and finished_at, we only need to add prefix for created_at which might be conflict to our devlake created_at
| if err != nil { | ||
| return err | ||
| } | ||
| err = db.Migrator().DropColumn(&archived.GitlabPipeline{}, "finished_at") |
| return err | ||
| } | ||
|
|
||
| err = db.Migrator().AddColumn(&GitlabPipeline20220729{}, "gitlab_finished_at") |
| return err | ||
| } | ||
|
|
||
| err = db.Migrator().AddColumn(&GitlabPipeline20220729{}, "gitlab_started_at") |
| "gorm.io/gorm" | ||
| ) | ||
|
|
||
| type alertPipeline struct{} |
Contributor
There was a problem hiding this comment.
how about using modifyCiCD, and also change the file name
|
|
||
| GitlabCreatedAt *time.Time | ||
| GitlabUpdatedAt *time.Time | ||
| GitlabStartedAt *time.Time |
Contributor
There was a problem hiding this comment.
keep started_at and finished_at
| Status: pipeline.Status, | ||
| GitlabCreatedAt: helper.Iso8601TimeToTime(pipeline.CreatedAt), | ||
| GitlabUpdatedAt: helper.Iso8601TimeToTime(pipeline.UpdatedAt), | ||
| GitlabStartedAt: helper.Iso8601TimeToTime(pipeline.StartedAt), |
Contributor
There was a problem hiding this comment.
keep started_at and finished_at
revert GitlabStartedAt and GitlabFinishedAt to StartedAt and FinishedAt
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add CollectApiJobs
Add ExtractApiJobs
Alert _tool_gitlab_pipelines
Does this close any open issues?
relates to #2583
Screenshots
Include any relevant screenshots here.
Other Information
Any other information that is important to this PR.