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

verify_cot fails to validate pull requests on repos that are forks #645

Open
ahal opened this issue Apr 26, 2024 · 3 comments
Open

verify_cot fails to validate pull requests on repos that are forks #645

ahal opened this issue Apr 26, 2024 · 3 comments
Assignees

Comments

@ahal
Copy link
Contributor

ahal commented Apr 26, 2024

While testing some bitrisescript changes on staging-firefox-ios, @isabelrios discovered a CoT failure:
https://firefox-ci-tc.services.mozilla.com/tasks/C4i1LZAQS1iLhBbATtJBBw/runs/0/logs/public/logs/chain_of_trust.log

This is a json-e rendering error:

jsone.shared.InterpreterError: InterpreterError at template.tasks[0].repoUrl: infix: . expects objects

It happens because the .taskcluster.yml evaluates event.pull_request.head.repo.html_url (which is standard in all our .taskcluster.yml files), but the Github context that verfiy_cot resolves has:

pull_request:
    head:
        repo: None

I believe this is happening because staging-firefox-ios is a fork of firefox-ios, so it means we hit this condition:

if repo_definition["fork"]:

This causes us to use mozilla-mobile/firefox-ios as the head repository instead, and my theory is this causes the pull_request.head.repo to be None as the pull request in question doesn't exist over there.

@ahal
Copy link
Contributor Author

ahal commented Apr 26, 2024

My intuition is that the if repo_definition["fork"] logic is wrong and should be deleted. Whether a repo is a fork or not shouldn't matter, we should only care about where the task is running.

But I'm not super confident about this and would love some more eyes on this.

@ahal
Copy link
Contributor Author

ahal commented Apr 26, 2024

I can confirm that removing the if repo_definition["fork"] block fixes Isabel's failure.

@bhearsum
Copy link
Contributor

Did #646 resolve this?

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

No branches or pull requests

2 participants