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

Fix README TypeError when one container is running #395

Merged
merged 1 commit into from
May 30, 2024

Conversation

inknos
Copy link
Contributor

@inknos inknos commented May 29, 2024

closes #379

PTAL @jwhonce

Copy link

We were not able to find or create Copr project packit/containers-podman-py-395 specified in the config with the following error:

Cannot create a new Copr project (owner=packit project=containers-podman-py-395 chroots=['fedora-39-x86_64', 'fedora-rawhide-x86_64', 'fedora-40-x86_64']): Copr: 'packit/containers-podman-py-395' already exists

Please check your configuration for:

  1. typos in owner and project name (groups need to be prefixed with @)
  2. whether the project name doesn't contain not allowed characters (only letters, digits, underscores, dashes and dots must be used)
  3. whether the project itself exists (Packit creates projects only in its own namespace)
  4. whether Packit is allowed to build in your Copr project
  5. whether your Copr project/group is not private

README.md Outdated
container = client.containers.get(first_name)
# it is important to get the container object again with the get()
# method to get all the fields like container.status populated
container = client.containers.get(container.name)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
container = client.containers.get(container.name)
container.reload()

would also populate all the fields.

PS. The comment could also include a notice that sparse=True is our default. Future work could allow sparse=False on the list() call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks @jwhonce, good idea. I committed new changes

@jwhonce
Copy link
Member

jwhonce commented May 30, 2024

LGTM

@rhatdan
Copy link
Member

rhatdan commented May 30, 2024

/approve
/lgtm

Copy link
Contributor

openshift-ci bot commented May 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inknos, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 8267ed2 into containers:main May 30, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example from Readme fails with TypeError
3 participants