-
Notifications
You must be signed in to change notification settings - Fork 440
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
WIP: Refactoring SCMWebhook away #15956
Open
hennevogel
wants to merge
66
commits into
openSUSE:master
Choose a base branch
from
hennevogel:refactoring/scm_webhook
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
hennevogel
force-pushed
the
refactoring/scm_webhook
branch
2 times, most recently
from
April 10, 2024 13:57
b848e29
to
d9d43cb
Compare
krauselukas
force-pushed
the
refactoring/scm_webhook
branch
4 times, most recently
from
April 11, 2024 12:59
167b33c
to
0d9c7ab
Compare
hennevogel
commented
Apr 11, 2024
krauselukas
force-pushed
the
refactoring/scm_webhook
branch
from
April 11, 2024 14:41
a4f308b
to
c21a8a2
Compare
hennevogel
commented
Apr 11, 2024
krauselukas
force-pushed
the
refactoring/scm_webhook
branch
from
April 11, 2024 15:10
c21a8a2
to
0c123d2
Compare
hennevogel
commented
Apr 11, 2024
hennevogel
commented
Apr 11, 2024
hennevogel
commented
Apr 11, 2024
hennevogel
commented
Apr 11, 2024
krauselukas
force-pushed
the
refactoring/scm_webhook
branch
from
April 11, 2024 15:24
0c123d2
to
77e681a
Compare
hennevogel
commented
Apr 11, 2024
krauselukas
force-pushed
the
refactoring/scm_webhook
branch
2 times, most recently
from
April 12, 2024 12:47
ce4dfbb
to
940a867
Compare
hennevogel
force-pushed
the
refactoring/scm_webhook
branch
5 times, most recently
from
April 12, 2024 14:56
1737385
to
70217b1
Compare
hennevogel
force-pushed
the
refactoring/scm_webhook
branch
from
April 19, 2024 14:58
b4656e1
to
68287e5
Compare
krauselukas
force-pushed
the
refactoring/scm_webhook
branch
from
June 20, 2024 12:38
68287e5
to
c361ced
Compare
Typo in one of the commits title: "Regernerate database_consistency todo" should be "Regenerate database_consistency todo" |
krauselukas
force-pushed
the
refactoring/scm_webhook
branch
from
June 20, 2024 14:57
aba15d8
to
cc43e34
Compare
…thod We have to pass it a `WorkflowRun` object, otherwise its failing...
Adapt Workflow::Step#target_package_name to avoid duplication and remove the implementation in Workflow::Step::SetFlags.
We have to make sure the attributes are set before the validation happens to catch eventual errors. We also have to make sure that the attributes are only set from the request payload if they havent been set explicitly when creating the record.
We can simply handle the active record exceptions and render the appropriate error. Also, we can authorize first the token, there is no need to even initialize a workflow run if a user is not permitted to run a workflow. Also get rid of the create_workflow_run method. The workflow creation is moved to the 'create' method but the request_headers extraction is moved to a specific method (to not increase complexity).
These migrations and specs need adaptation that is not worth it. The data migrations were applied to production long ago. It's safe to remove it now. - BackfillScmVendorAndHookEventInWorkflowRun. Workflow run has a new validation that doesn't allow to create it without scm_vendor. - RemoveUnsupportedHookEvents. The constants are moved to another model.
Thats what the TAR SCM service expects, there are not other types that are supported....
Now the ReportToSCMJob needs to have the workflow run set.
saraycp
force-pushed
the
refactoring/scm_webhook
branch
from
July 1, 2024 14:56
c865e73
to
1406429
Compare
krauselukas
changed the title
Refactoring SCMWebhook away
WIP: Refactoring SCMWebhook away
Jul 1, 2024
saraycp
force-pushed
the
refactoring/scm_webhook
branch
from
July 2, 2024 08:34
3a0c39d
to
3dd4dec
Compare
Those values are now defined in workflow_run, so we need to set the workflow run in all the specs too.
saraycp
force-pushed
the
refactoring/scm_webhook
branch
from
July 2, 2024 08:44
3dd4dec
to
5aaf4ac
Compare
krauselukas
reviewed
Jul 2, 2024
commit_sha: @event_subscription_payload[:commit_sha], | ||
api_endpoint: @workflow_run.api_endpoint, | ||
target_repository_full_name: @workflow_run.target_repository_full_name, | ||
commit_sha: @workflow_run[:commit_sha], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be @workflow_run.commit_sha
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.
No description provided.