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

[copr-dist-git] Don't assume the SCM repo has the same name as the package #1

Merged
merged 1 commit into from
Mar 8, 2016

Conversation

danvratil
Copy link
Contributor

Mock(-scm) expects the cloned directory to has the same name as the package
it's building. To make sure it is so we explicitly pass the package name to
git clone as a destination directory name.

This allows (amont other things) to have a single git repo for multiple spec
files.

…ckage

Mock(-scm) expects the cloned directory to has the same name as the package
it's building. To make sure it is so we explicitly pass the package name to
git clone as a destination directory name.

This allows (amont other things) to have a single git repo for multiple spec
files.
@clime
Copy link
Contributor

clime commented Mar 5, 2016

Can you provide copr-dist-git import-task description in the following form?

{
    "branch": "master",
    "project": "example",
    "source_json": "{\"scm_branch\": \"\", \"scm_url\": \"git@localhost:example.git\", \"scm_type\": \"git\", \"spec\": \"example.spec\"}",
    "source_type": 4,
    "task_id": "5-master",
    "user": "clime"
}

This will represent a test case for which the current codebase fails (scm_url and spec in the source_json field are the most import to me at the moment). You might also directly add it into http://pkgs.devel.redhat.com/cgit/tests/copr/tree/Regression/dist-git/fedata/data/import-tasks.json or I'll integrate it later.

@danvratil
Copy link
Contributor Author

Sorry for taking so long:

{
    "branch": "master",
    "project": "mypackage",
    "source_json": "{\"scm_branch\": \"\", \"scm_url\": \"git@localhost:example.git\", \"scm_type\": \"git\", \"spec\": \"mypackage.spec\"}",
    "source_type": 4,
    "task_id": "5-master",
    "user": "clime"
}

(or do you want a real-world data? I don't know if I can provide any persistent source data for that).

The idea is that package name (which dist_git_importer.py extracts from the spec key) is different from the name of the repository in scm_url. I don't know how the tests work, but this will only actually test the change if the git repo exists and you get all the way to running mock.

I don't have access to devel.redhat.com anymore, so please integrate it for me :)

@clime
Copy link
Contributor

clime commented Mar 8, 2016

Oki, I understand the problem and I'll make a nice test case out of it :). I meant real-world data that I would encapsulate later but I got the point and found one my own repositories that I can reproduce the problem on (https://github.com/clime/example2 with subpkg/example.spec). Anyway, thank you for the fix and the first pull request!

clime added a commit that referenced this pull request Mar 8, 2016
[copr-dist-git] Don't assume the SCM repo has the same name as the package
@clime clime merged commit 71566cd into fedora-copr:master Mar 8, 2016
fedora-copr-github-bot pushed a commit that referenced this pull request Jun 9, 2021
This shouldn't actually normally happen, but just in case (the problem
happened once when we had an old copr-rpmbuild package instlaled on
builders).  The error output would be:

Backend process error: Error while collecting built packages for 2134118-fedora-rawhide-x86_64:
Worker failed build, took 116.72690773010254
Retry request #1 on https://copr-fe-dev.cloud.fedoraproject.org/backend/update/: Request server error on https://copr-fe-dev.cloud.fedoraproject.org/backend/update/: 500 INTERNAL SERVER ERROR
Retry request #2 on https://copr-fe-dev.cloud.fedoraproject.org/backend/update/: Request server error on https://copr-fe-dev.cloud.fedoraproject.org/backend/update/: 500 INTERNAL SERVER ERROR
...

While I'm on it, let's move the _parse_results on a slightly better
place where the exceptions aren't ignored.
fedora-copr-github-bot pushed a commit that referenced this pull request Jun 10, 2021
New script #1: /usr/bin/copr-backend-analyze-results
    Run a 'du' command on the result storage directory and calculate
    several useful statistics.

New script #2: /usr/bin/copr-backend-generate-graphs
    Go through the results provided by script #1, and generate the
    interactive graphs.

New cron file: /etc/cron.weekly/copr-backend
    Execute script #1 and then script #2 to update the graphs.

Closes: #1739
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.

2 participants