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

Make latestVersion.js update without restart #1638

Merged
merged 6 commits into from May 7, 2020
Merged

Conversation

steven1046
Copy link
Member

What was fixed? (Issue # or description of fix)

Were the changes tested on

  • Firefox (Desktop)
  • Safari (Desktop)
  • Chrome (Desktop)
  • Internet Explorer (Desktop)
  • iOS (Mobile)
  • Android (Mobile)

Running validation tools

NottyCode and others added 6 commits May 6, 2020 13:41
Fixes #1616

Currently the LatestVersion servlet doesn't correctly show an new build
without a server restart so this fix aims to resolve that. The fix uses
CDI events to notify the change. This necessetated the following
changes:

1. BuildData is now a CDI beans which means using setter and getters for
    JSON-B.
2. BuildData now fires an event if the BuildType is a release.
3. The LatestVersion servlet now observes the event emitted by BuildData
4. The AtomicReference storing the latestVersion.js is now static since
    CDI events create random new instances for notification.
5. DHEBuildParser now has BuildData injected.
6. Written a test using MicroShed Testing and MockServer to support the
    updates. This new test won't pass with liberty dev mode though. Not
    quite sure how to resolve that at this time.
7. Added a pre destroy method to cancel the scheduled futures on
    shutdown. This means if using dev mode we correctly tidy up when in dev
    mode rather than relying on Liberty to do it.
8. Renamed the current Dockerfile to Dockerfile blogs since it is there
    to support building and editing the blog posts
9. Created a new Dockerfile that contains the website code.
10. Added catch blocks for JAX-RS RuntimeExceptions which will prevent
retries working.
Support latestVersion.js updating without restart
Add the target/jekyll-webapp back to pom.xml
Fix the JAX-RS endpoint so it only intercepts api requests
@steven1046 steven1046 requested a review from NottyCode May 7, 2020 22:30
@steven1046 steven1046 merged commit b8fde3f into master May 7, 2020
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.

None yet

2 participants