Skip to content

Updating Dockerfile to standard format - #211

Open
cmlsn wants to merge 3 commits into
masterfrom
chore_dockerupdates
Open

cmlsn wants to merge 3 commits into
masterfrom
chore_dockerupdates

Conversation

@cmlsn

@cmlsn cmlsn commented Nov 25, 2026 •

Copy link
Copy Markdown

Improvements

  • Updating Dockerfile to company standards.
  • Gracefully handle concurrent request errors when updating AWS resource tags

@github-actions

Copy link
Copy Markdown

The style in this PR agrees with black. ✔️

This formatting comment was generated automatically by a script in uc-cdis/wool.

@coveralls

coveralls commented Nov 25, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 45653703220

Coverage decreased (-0.9%) to 86.801%

Details

  • Coverage decreased (-0.9%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 52 coverage regressions across 3 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

52 previously-covered lines in 3 files lost coverage.

File Lines Losing Coverage Coverage
aws/bucket.py 39 74.86%
aws/aws_utils.py 8 89.57%
aws/s3_files.py 5 97.09%

Coverage Stats

Coverage Status
Relevant Lines: 1788
Covered Lines: 1552
Line Coverage: 86.8%
Coverage Strength: 0.87 hits per line

💛 - Coveralls

@github-actions

Copy link
Copy Markdown

Integration Tests on Kind

filepath passed skipped SUBTOTAL
tests/test_task_token.py 0 10 10
tests/test_gen3_workflow.py 32 1 33
TOTAL 32 11 43

@github-actions

Copy link
Copy Markdown

Integration Tests

filepath passed error SUBTOTAL
tests/test_task_token.py 10 0 10
tests/test_gen3_workflow.py 10 23 33
TOTAL 20 23 43

Test(s) failures encountered in PR

Please find the detailed integration test report here

Please find the Github Action logs here

@github-actions

Copy link
Copy Markdown

Failure Analysis

Please find the detailed test analysis report here

Comment thread tests/test_start.py
from gen3workflow.start import prepare_metrics_directory


def test_prepare_metrics_directory_clears_stale_metrics(tmp_path, monkeypatch):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The lint check is failing:

************* Module gen3workflow.start
gen3workflow/start.py:7:0: C0116: Missing function or method docstring (missing-function-docstring)
gen3workflow/start.py:17:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module tests.test_start
tests/test_start.py:8:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_start.py:22:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_start.py:31:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_start.py:38:0: C0116: Missing function or method docstring (missing-function-docstring)

Comment thread tests/test_start.py
assert directory.is_dir()


def test_prepare_metrics_directory_surfaces_cleanup_errors(tmp_path):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This test fails for me locally:

gen3workflow/start.py:13: in prepare_metrics_directory
    metric_file.unlink()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = PosixPath('/private/var/folders/_8/5_1db5ds3h3fbjvxvb7q6z7h0000gn/T/pytest-of-paulineribeyre/pytest-3/test_prepare_metrics_directory2/counter_123.db'), missing_ok = False

    def unlink(self, missing_ok=False):
        """
        Remove this file or link.
        If the path is a directory, use rmdir() instead.
        """
        try:
>           os.unlink(self)
E           PermissionError: [Errno 1] Operation not permitted: '/private/var/folders/_8/5_1db5ds3h3fbjvxvb7q6z7h0000gn/T/pytest-of-paulineribeyre/pytest-3/test_prepare_metrics_directory2/counter_123.db'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm wondering if this could be an OS specific error? Since it works in GH action which runs on Linux, and we are testing it in MacOS. We could let ths line expect a broader error maybe?
with pytest.raises(IsADirectoryError):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see both PermissionError and IsADirectory error are subclasses of OSError

Comment thread Dockerfile
WORKDIR /${appname}

# The base image already selects the non-root gen3 user, so USER is left alone everywhere.
CMD ["/bin/bash", "-c", "/${appname}/dockerrun.bash"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should we delete the dockerrun.bash, bin/_common_setup.sh and bin/setup_prometheus.sh files? And i guess bin/test.sh too?

@nss10 nss10 Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CI still uses bin/test.sh -- See here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

True - i would rather not have 2 different paths if we can avoid it

@github-actions

Copy link
Copy Markdown

Integration Tests on Kind

filepath passed skipped SUBTOTAL
tests/test_task_token.py 0 10 10
tests/test_gen3_workflow.py 32 1 33
TOTAL 32 11 43

@github-actions

Copy link
Copy Markdown

Integration Tests

filepath passed SUBTOTAL
tests/test_task_token.py 10 10
tests/test_gen3_workflow.py 33 33
TOTAL 43 43

Please find the detailed integration test report here

Please find the Github Action logs here

@nss10
nss10 added this pull request to stack #213 November 25, 2026 18:22
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.

4 participants