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

Not overwrite git_ref in CoprBuildEvent #496

Merged

Conversation

lbarcziova
Copy link
Member

@lbarcziova lbarcziova commented Mar 16, 2020

May fix #495

@softwarefactory-project-zuul
Copy link
Contributor

softwarefactory-project-zuul bot commented Mar 16, 2020

Build succeeded.

Copy link
Member

@jpopelka jpopelka left a comment

Thanks!

Copy link
Member

@lachmanfrantisek lachmanfrantisek left a comment

Thanks for finding the problem and fixing that!

self.base_repo_name = build_pg.pr.project.repo_name
self.base_repo_namespace = build_pg.pr.project.namespace
# FIXME: hardcoded, move this to PG
https_url = f"https://github.com/{self.base_repo_namespace}/{self.base_repo_name}.git"
git_ref = self.commit_sha # ref should be name of the branch, not a hash
Copy link
Member

@lachmanfrantisek lachmanfrantisek Mar 17, 2020

Choose a reason for hiding this comment

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

Moving down does not help, but the rewriting will help definitely.

An alternative solution can be to move the super call up and safely write these values after that. What do you think?

Copy link
Member Author

@lbarcziova lbarcziova Mar 17, 2020

Choose a reason for hiding this comment

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

yes, that was my first idea, but we need to get https_url from the db info as it is passed to the super constructor

Copy link
Member

@lachmanfrantisek lachmanfrantisek Mar 17, 2020

Choose a reason for hiding this comment

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

Good point. Then maybe only the https_url before the super calls.

(Feel free to merge it as is. I just don't like a lot of code before the super call. It usually leads to this kind of weird errors...)

Copy link
Member Author

@lbarcziova lbarcziova Mar 17, 2020

Choose a reason for hiding this comment

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

I will leave it as it is for now, as here https_url = f"https://github.com/{self.base_repo_namespace}/{self.base_repo_name}.git" we need other attributes anyway.

@lbarcziova lbarcziova added the mergeit When set, zuul wil gate and merge the PR. label Mar 17, 2020
@softwarefactory-project-zuul
Copy link
Contributor

softwarefactory-project-zuul bot commented Mar 17, 2020

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit a81043f into packit:master Mar 17, 2020
5 checks passed
@lbarcziova lbarcziova deleted the testing_farm_bug branch Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assert ref is github.GithubObject.NotSet or isinstance(ref, str), ref
3 participants