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

Rebuild client only when needed #107

Open
nsoranzo opened this issue Mar 4, 2020 · 6 comments
Open

Rebuild client only when needed #107

nsoranzo opened this issue Mar 4, 2020 · 6 comments

Comments

@nsoranzo
Copy link
Member

nsoranzo commented Mar 4, 2020

Should the make client be handled by as part of calling scripts/common_startup.sh instead of invoked directly ? common_startup.sh has some smart logic to not rebuild the client if there are no changes since the last build and reimplement it in this role doesn't seem to make a lot of sense.

@mvdbeek
Copy link
Member

mvdbeek commented Mar 4, 2020

fwiw the logic is

            if git diff --quiet "$(cat static/client_build_hash.txt)" -- client/ config/plugins/visualizations/; then
                echo "The Galaxy client build is up to date and will not be rebuilt at this time."
                SKIP_CLIENT_BUILD=1
            else
                echo "The Galaxy client is out of date and will be built now."
            fi

@natefoo
Copy link
Member

natefoo commented Mar 4, 2020

common_startup.sh does too much stuff to just call it (imo), deconstructing it gives the role more power and also makes it much easier to debug when some part of it goes wrong.

That said, if we wanted to make it an option (much like we do with the "deconstructed client build" (there is an option to run the individual steps of make client-production-maps), that would be ok.

@nsoranzo
Copy link
Member Author

nsoranzo commented Mar 4, 2020

What about splitting up the reusable parts of common_startup.sh in smaller scripts that the role can reuse?
The goal be to not reinvent the wheel in 2 separate places.

@mvdbeek
Copy link
Member

mvdbeek commented Mar 4, 2020

it'd also be more version agnostic that way

@dannon
Copy link
Member

dannon commented Mar 4, 2020

Probably worth mentioning here that I'd like to split it out to be able to check individual plugins as well.

So, instead of checking a single build hash for everything, having one for the primary client, one for each of the plugins in config/plugins/visualizations/, with those being individually comparable and buildable.

@natefoo
Copy link
Member

natefoo commented Mar 4, 2020

What about splitting up the reusable parts of common_startup.sh in smaller scripts that the role can reuse?

This is better, and I am on board with the idea of deduplication, but I still find it's clearer to understand what's failed when using proper Ansible modules rather than running command a bunch of times.

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

No branches or pull requests

4 participants