Skip to content
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

frontend: add relationship between actions and projects/builds #2805

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

nikromen
Copy link
Member

@nikromen nikromen commented Jul 10, 2023

This will help to implement RFEs like #1108

TODO:

Merge after #2733 and change down_revision to 7d9f6f921fa0 done

Closes #2823

@nikromen nikromen marked this pull request as draft July 10, 2023 16:00
@nikromen nikromen force-pushed the action-foreign-keys branch 2 times, most recently from 7abbf61 to 1546133 Compare July 18, 2023 13:45
@nikromen nikromen marked this pull request as ready for review July 25, 2023 14:59
@FrostyX
Copy link
Member

FrostyX commented Jul 27, 2023

I am setting blocked so we don't accidentally merge before this

Merge after #2733 and change down_revision to 7d9f6f921fa0

@praiskup
Copy link
Member

praiskup commented Aug 1, 2023

Note that #2826 adds yet another migration script.

created_on=int(time.time()),
copr_id=copr_id,
)
db.session.add(action)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is weird, is the indent change intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. The send_delete_dirs_action works with multiple copr ids and I was thinking whether to create some new attribute copr_ids (array) but then I realised the object_type is "copr" so it confused me a bit and I was wondering if creating action for each copr_id will solve this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this sounds good, thanks!


def upgrade():
op.add_column('action', sa.Column('copr_id', sa.Integer(), nullable=True))
op.create_foreign_key(None, 'action', 'copr', ['copr_id'], ['id'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note for myself: check this is synced

@praiskup
Copy link
Member

praiskup commented Aug 3, 2023

I am setting blocked so we don't accidentally merge before this

Merge after #2733 and change down_revision to 7d9f6f921fa0

I actually think that we need to merge in vice-versa order :-) I just created a better tag for this than blocked.

@praiskup
Copy link
Member

praiskup commented Aug 3, 2023

Ah, no - #2733 is different.

with this we can get information about Actions in projects and
show it to user

Closes: fedora-copr#2807

# revision identifiers, used by Alembic.
revision = '08dd42f4c304'
down_revision = 'daa62cd0743d'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this.

Copy link
Member

@praiskup praiskup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thanks!

@nikromen nikromen merged commit 1c8f37f into fedora-copr:main Aug 7, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add relationship between actions and projects/builds
3 participants