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: fix hash.txt issue from build.yaml #1001

Merged
merged 2 commits into from
Jan 15, 2025
Merged

fix: fix hash.txt issue from build.yaml #1001

merged 2 commits into from
Jan 15, 2025

Conversation

ofirc77
Copy link
Collaborator

@ofirc77 ofirc77 commented Jan 7, 2025

Description

Test and fix the issue with hash.txt file that needs to be created during the build process

@ofirc77 ofirc77 requested a review from NoamGaash as a code owner January 7, 2025 21:19
@ofirc77 ofirc77 force-pushed the fix_hash_issue branch 2 times, most recently from 86f48f9 to 2375ef1 Compare January 7, 2025 21:56
Copy link
Member

@NoamGaash NoamGaash left a comment

Choose a reason for hiding this comment

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

Hi :)
Thanks for working on it
Just making sure we're on the same page - the preview uses s3 storage, so the fact the commit sha is available on https://s3.amazonaws.com/noam-gaash.co.il/12659976140/open-bus/268/hash.txt doesn't guarantee it will be served from the nginx docker file used in production. Anyway, we can try merging it and see if it helps 🤞 🙏
It is possible to add a verification in the test workflow, as it's using the real docker image that will be deployed to production later:

- name: Run application
run: docker run -d -p 3000:80 ${{ env.DOCKER_APP_IMAGE_NAME }}:${{ env.DOCKER_APP_IMAGE_TAG }}

@ofirc77 ofirc77 force-pushed the fix_hash_issue branch 2 times, most recently from 291aee1 to 362560b Compare January 13, 2025 19:49
@ofirc77
Copy link
Collaborator Author

ofirc77 commented Jan 13, 2025

I added the test for file existence as you said and it seems to be missing.
I will try to think of another solution. Please assist if you have ideas

@NoamGaash
Copy link
Member

seems like you're testing for the existence of public/hash.txt - and I don't think we should expect this file to be found in this stage because this job is not the same job that created this file.
I do think we want to test that http://localhost:3000/hash.txt returns a text string (mime type text/plain) that is short (less then 100 chars or so).
This test can also be performed locally if you run docker build and docker run, and then navigate to this url in your browser.
also, please consider adding separated commits so it will be easier to follow what have we tried

@ofirc77
Copy link
Collaborator Author

ofirc77 commented Jan 15, 2025

I will push this commit and create another one for the fix that you mentioned

@ofirc77 ofirc77 self-assigned this Jan 15, 2025
@ofirc77 ofirc77 enabled auto-merge (squash) January 15, 2025 16:00
@ofirc77 ofirc77 merged commit ec13a2a into main Jan 15, 2025
16 of 17 checks passed
@ofirc77 ofirc77 deleted the fix_hash_issue branch January 15, 2025 16:10
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