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 semicolon error masking #3457

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Fix semicolon error masking #3457

merged 1 commit into from
Apr 22, 2024

Conversation

ialarmedalien
Copy link
Collaborator

Description of PR purpose/changes

A misplaced semicolon in some shell script in the Dockerfile was masking errors that might have occurred in commands earlier in the script.

Jira Ticket / Issue

Related Jira ticket: https://kbase-jira.atlassian.net/browse/DATAUP-X

  • Added the Jira Ticket to the title of the PR (e.g. DATAUP-69 Adds a PR template)

Testing Instructions

  • Details for how to test the PR:
  • Tests pass locally and in GitHub Actions

Dev Checklist:

  • My code follows the guidelines at https://sites.google.com/lbl.gov/trussresources/home?authuser=0
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Updating Version and Release Notes (if applicable)

@ialarmedalien ialarmedalien requested a review from briehl April 22, 2024 14:41
@ialarmedalien ialarmedalien self-assigned this Apr 22, 2024
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@@ -46,7 +46,8 @@ RUN \
/bin/bash scripts/install_narrative_docker.sh && \
cd /tmp && \
mkdir /tmp/narrative && \
chown -R nobody:www-data /tmp/narrative /kb/dev_container/narrative ; find / -xdev \( -perm -4000 \) -type f -print -exec rm {} \;
chown -R nobody:www-data /tmp/narrative /kb/dev_container/narrative && \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With a semicolon, the find command would execute regardless of whether any of the previous steps errored out, so it was possible to create a narrative image where none of the JS or Python stuff was installed. 😱

Copy link
Member

Choose a reason for hiding this comment

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

Oops.

Copy link
Member

@briehl briehl left a comment

Choose a reason for hiding this comment

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

👍

@@ -46,7 +46,8 @@ RUN \
/bin/bash scripts/install_narrative_docker.sh && \
cd /tmp && \
mkdir /tmp/narrative && \
chown -R nobody:www-data /tmp/narrative /kb/dev_container/narrative ; find / -xdev \( -perm -4000 \) -type f -print -exec rm {} \;
chown -R nobody:www-data /tmp/narrative /kb/dev_container/narrative && \
Copy link
Member

Choose a reason for hiding this comment

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

Oops.

@briehl briehl merged commit cb155c3 into develop Apr 22, 2024
6 of 8 checks passed
@briehl briehl deleted the fix_semi_colon_error_masking branch April 22, 2024 15:13
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