-
Notifications
You must be signed in to change notification settings - Fork 125
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
Browser working from git source #1187
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
151d0df
to
eb5093d
Compare
eb5093d
to
d90313b
Compare
What's stopping us here? |
Probably one more rebase since I had to resurrect separate CSS assets for [#1346] 🙃 I'd love to have it to experiment with some browser ideas on more production-like data! |
d90313b
to
accfdb5
Compare
On every push we bulld browser JS and CSS files. These are uploaded as artifacts as a result of the build. There's not much use of these artifacts other than seeing the output of the source on particular commit.
In order to be able to use assets built per commit, they have to have guessable URL. By design github action artifact URLs are not. We send assets to S3 bucket, connected to Cloudfront CDN. Assets are prefixed by commit SHA, which makes their URL guessable. Short, 12-char SHA are in use to match with those used by Bundler in gem paths: https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/source/git.rb#L275-L281
When you use ruby_event_store-browser gem from git source, it lacks CSS and JS that built just before packaging gem. We're not versioning output files, only the source. In this commit we're enabling reaching for CDN hosted assets, that are built for every commit, when local assets are not available. This makes browser work, even when RES is used from git source. Related: #583
Not the most elegant but works.
Now we explicitly check if gem is from git-via-bundler, so presence of files should no longer be relevant for the logic.
b3ec3a3
to
fcd87c9
Compare
not to myself: alias CDN domain |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It was never possible to use
rails_event_store
from git source and have a functioning browser:#583.
We only version sources. Assets are bundled and baked into released browser gem.
Yet, with little help of:
we're finally able to make this surprise thing of a past. Also unblock some early adopters 😀
That's mostly proof of concept. It works but needs rewrite, and actually building assets of all pushed commits, not only the last one.
Seeing is believing:
What do you think?