Skip to content

Conversation

@cisagovbot
Copy link

@cisagovbot cisagovbot commented Dec 6, 2024

Lineage Pull Request: CONFLICT

Achtung!!!

Lineage has created this pull request to incorporate new changes found in an
upstream repository:

Upstream repository: https://github.com/cisagov/skeleton-docker.git
Remote branch: HEAD

Check the changes in this pull request to ensure they won't cause issues with
your project.

The lineage/skeleton branch has one or more unresolved merge conflicts
that you must resolve before merging this pull request!

How to resolve the conflicts

  1. Take ownership of this pull request by removing any other assignees.

  2. Clone the repository locally, and reapply the merge:

    git clone [email protected]:cisagov/pshtt_reporter.git pshtt_reporter
    cd pshtt_reporter
    git remote add skeleton https://github.com/cisagov/skeleton-docker.git
    git remote set-url --push skeleton no_push
    git switch develop
    git switch --create lineage/skeleton --track origin/develop
    git pull skeleton HEAD
    git status
  3. Review the changes displayed by the status command. Fix any conflicts and
    possibly incorrect auto-merges.

  4. After resolving each of the conflicts, add your changes to the
    branch, commit, and push your changes:

    git add .github/CODEOWNERS .github/workflows/build.yml Dockerfile README.md docker-compose.yml requirements-dev.txt src/version.txt tests/container_test.py 
    git commit
    git push --force --set-upstream origin lineage/skeleton

    Note that you may append to the default merge commit message
    that git creates for you, but please do not delete the existing
    content
    . It provides useful information about the merge that is
    being performed.

  5. Wait for all the automated tests to pass.

  6. Confirm each item in the "Pre-approval checklist" below.

  7. Remove any of the checklist items that do not apply.

  8. Ensure every remaining checkbox has been checked.

  9. Mark this draft pull request "Ready for review".

✅ Pre-approval checklist

  • ✌️ The conflicts in this pull request have been resolved.
  • All future TODOs are captured in issues, which are referenced in code comments.
  • All relevant type-of-change labels have been added.
  • All relevant repo and/or project documentation has been updated to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Bump major, minor, patch, or pre-release version as appropriate via the bump_version.sh script if this repository is versioned and the changes in this PR warrant a version bump.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

Note

You are seeing this because one of this repository's maintainers has
configured Lineage to open pull requests.

For more information:

🛠 Lineage configurations for this project are stored in .github/lineage.yml

📚 Read more about Lineage

mcdonnnj and others added 30 commits December 6, 2024 08:40
…s_from_v3_to_v4

Bump `actions/download-artifact` and `actions/upload-artifact` from v3 to v4
⚠️ CONFLICT! Lineage pull request for: skeleton
There is no reason to have any information but the version in the
version tracking file for Docker image projects. The current format
is simply an artifact of mirroring things over from the
cisagov/skeleton-python-library project.
We were previously getting the version in three different tests. It
makes more sense to turn getting the project version into a fixture and
to use that fixture anywhere the project version is needed.
…format

Change the format of the version tracking file
This helps ensure that when a Docker image is built the expacted source
image is used regardless of what repository is configured as the
default on the host system. It also makes our Dockerfiles more
seamlessly convertible to using the GitHub Container Registry or any
other Open Container Initiative (OCI) compatible registry.
Instead of downloading the source archive, extracting it, and then
installing it with pip we instead just let pip directly install the
package.
Use the full tag that includes the Alpine Linux version to ensure the
pulled image is always the same.
Since we are now installing cisagov/skeleton-python-library directly
with pip we no longer need these OS packages.
Use the full path for source container images
We should not blindly upgrade all pre-installed packages. This can
create inconsistent build results due to changes in installed versions.
Now that we are not overwriting the internal Python package file the
text we look for must match what is output by default. The Docker
Compose secret configuration is left in place to continue to serve as
an example and to be leveraged for a future update to
cisagov/skeleton-python-library that can provide similar functionality
to what was removed in this project.
Pin the versions of the pip, setuptools, and wheel packages that are
installed.
…hon-library_directly

Install cisagov/skeleton-python-library directly with `pip`
Instead of relying on `pip3` being on the PATH we instead call the
module through the Python executable. This ensures that the `pip` being
used is in the same environment as the `python3` being used.
We can move this instruction to the end of the Dockerfile now that we
are no longer working with files in the Docker container when building.
Using a virtual environment is a Python best practice. We also
consolidate all of the Python dependency installation steps into a
single RUN instruction. This ensures that Python setup is cached in one
layer and mirrors the logical organization of this being a single step.
…eatable

Pin Python package versions and improve build repeatability
This configuration includes a Pipfile configuration file and the
generated Pipfile.lock file that pins to specific versions for the
Python dependencies for this project. This will help us ensure
repeatable builds. The pipenv package is added as a developmental
requirement to support these files.
Since we cannot use long options on Alpine Linux we should explain what
the short options we are using do. I also changed the order of options
so that they are in alphabetical order.

Co-authored-by: Shane Frasier <[email protected]>
Now that we have a pipenv configuration we will use it to install the
Python dependencies for the image. The `build` workflow is updated to
no longer pass the VERSION build argument in line with this change.
Switch to using a multi-stage build in the Dockerfile. This reduces
image size since pipenv and its dependencices are not needed in the
final image. It also ensures that the system Python environment is
unmodified.
Install the core Python packages (pip, setuptools, and wheel) into the
system Python environment before installing pipenv. This keeps things
consistent with our usual approach to Python environments.
The comment references a command that is no longer being run.

Co-authored-by: Shane Frasier <[email protected]>
Change the tags used in the table to match the version of the project.
Previously "1.2.3" was used as an example version but there is no
reason not to use the real version of the image.
…tion

Install Python dependencies with `pipenv`
jsf9k added 6 commits October 24, 2025 10:38
These changes get rid of some errors from our black pre-commit linter.
Such code is not conducive to repeatable builds.
This is unnecessary now that we use a multi-stage build.
@jsf9k
Copy link
Member

jsf9k commented Oct 27, 2025

FYI, there is currently no fix for the pypdf2 vulnerability that the Dependency review checks turns up.

The GitHub runners run out of disk space when building for all these
platforms, so we comment out a few of the less common ones: arm/v6 and
s390x.
jsf9k added 2 commits October 27, 2025 15:23
It takes too bloody long to build wheels for these platforms, and we
are not currently using them.
@jsf9k jsf9k marked this pull request as ready for review October 28, 2025 12:32
@jsf9k jsf9k moved this from In progress to Review in progress in BOD 18-01 Oct 28, 2025
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

👍 👍

@github-project-automation github-project-automation bot moved this from Review in progress to Reviewer approved in BOD 18-01 Oct 28, 2025
This facilitates reproducible builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file docker Pull requests that update Docker code documentation This issue or pull request improves or adds to documentation github-actions Pull requests that update GitHub Actions code python Pull requests that update Python code test This issue or pull request adds or otherwise modifies test code upstream update This issue or pull request pulls in upstream updates version bump This issue or pull request increments the version number

Projects

Status: Reviewer approved
Status: In Progress

Development

Successfully merging this pull request may close these issues.

5 participants