Skip to content

Commit

Permalink
Merge pull request #1056 from hpehl/HAL-1963
Browse files Browse the repository at this point in the history
HAL-1963: Make --no-resolve-local-cache the default
  • Loading branch information
hpehl authored Jan 12, 2024
2 parents cb3af25 + c8f57f7 commit 00da2db
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Fixed

- [HAL-1963](https://issues.redhat.com/browse/HAL-1963): Make --no-resolve-local-cache the default
- [HAL-1961](https://issues.redhat.com/browse/HAL-1961): fix progress bar width setting
- [HAL-1960](https://issues.redhat.com/browse/HAL-1960): Mark variable parts in attributes in the DB wizards
- [HAL-1953](https://issues.redhat.com/browse/HAL-1953): Unable to add unamanaged deployment for server group
- [HAL-1952](https://issues.redhat.com/browse/HAL-1952): Adding string constants have been used directly in the Encrypt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.jboss.hal.dmr.dispatch.Dispatcher;
import org.jboss.hal.meta.StatementContext;
import org.jboss.hal.resources.Resources;

import com.google.web.bindery.event.shared.EventBus;

import static org.jboss.hal.client.installer.AddressTemplates.INSTALLER_TEMPLATE;
Expand All @@ -33,6 +32,7 @@
import static org.jboss.hal.core.finder.FinderColumn.RefreshMode.RESTORE_SELECTION;
import static org.jboss.hal.dmr.ModelDescriptionConstants.PREPARE_REVERT;
import static org.jboss.hal.dmr.ModelDescriptionConstants.REVISION;
import static org.jboss.hal.dmr.ModelDescriptionConstants.USE_DEFAULT_LOCAL_CACHE;

class RevertWizard {

Expand Down Expand Up @@ -66,6 +66,7 @@ void show(UpdateColumn column) {
.addStep(PREPARE_SERVER, new PrepareStep<RevertState>(
context -> new Operation.Builder(INSTALLER_TEMPLATE.resolve(statementContext), PREPARE_REVERT)
.param(REVISION, context.updateItem.getName())
.param(USE_DEFAULT_LOCAL_CACHE, true)
.build(),
eventBus, dispatcher, statementContext, resources))
.addStep(APPLY_REVERT, new ApplyStep<RevertState>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.List;

import javax.inject.Inject;

import org.jboss.hal.ballroom.Format;
import org.jboss.hal.ballroom.dialog.Dialog;
import org.jboss.hal.core.finder.ColumnAction;
Expand All @@ -47,15 +46,13 @@
import org.jboss.hal.spi.Message;
import org.jboss.hal.spi.MessageEvent;
import org.jboss.hal.spi.Requires;

import com.google.web.bindery.event.shared.EventBus;

import elemental2.dom.HTMLElement;
import elemental2.promise.Promise;

import static java.util.Comparator.comparing;
import static java.util.stream.Collectors.toList;

import static org.jboss.elemento.Elements.p;
import static org.jboss.hal.client.installer.AddressTemplates.INSTALLER_ADDRESS;
import static org.jboss.hal.client.installer.AddressTemplates.INSTALLER_TEMPLATE;
Expand All @@ -70,6 +67,7 @@
import static org.jboss.hal.dmr.ModelDescriptionConstants.TIMESTAMP;
import static org.jboss.hal.dmr.ModelDescriptionConstants.TYPE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.UPDATES;
import static org.jboss.hal.dmr.ModelDescriptionConstants.USE_DEFAULT_LOCAL_CACHE;
import static org.jboss.hal.resources.CSS.fontAwesome;
import static org.jboss.hal.resources.CSS.pfIcon;

Expand Down Expand Up @@ -203,7 +201,9 @@ public List<ItemAction<UpdateItem>> actions() {

private void updateOnline() {
progress.reset();
Operation operation = new Operation.Builder(INSTALLER_TEMPLATE.resolve(statementContext), LIST_UPDATES).build();
Operation operation = new Operation.Builder(INSTALLER_TEMPLATE.resolve(statementContext), LIST_UPDATES)
.param(USE_DEFAULT_LOCAL_CACHE, true)
.build();
dispatcher.execute(operation,
result -> {
List<ModelNode> updates = result.get(UPDATES).asList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.jboss.hal.dmr.dispatch.Dispatcher;
import org.jboss.hal.meta.StatementContext;
import org.jboss.hal.resources.Resources;

import com.google.web.bindery.event.shared.EventBus;

import static org.jboss.hal.client.installer.AddressTemplates.INSTALLER_TEMPLATE;
Expand All @@ -29,8 +28,8 @@
import static org.jboss.hal.client.installer.UpdateOfflineState.PREPARE_SERVER;
import static org.jboss.hal.client.installer.UpdateOfflineState.UPLOAD_ARCHIVES;
import static org.jboss.hal.core.finder.FinderColumn.RefreshMode.CLEAR_SELECTION;
import static org.jboss.hal.dmr.ModelDescriptionConstants.NO_RESOLVE_LOCAL_CACHE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.PREPARE_UPDATES;
import static org.jboss.hal.dmr.ModelDescriptionConstants.USE_DEFAULT_LOCAL_CACHE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.WORK_DIR;

class UpdateOfflineWizard {
Expand Down Expand Up @@ -72,7 +71,7 @@ void show(UpdateColumn column) {
updateManagerContext -> new Operation.Builder(INSTALLER_TEMPLATE.resolve(statementContext),
PREPARE_UPDATES)
.param(WORK_DIR, updateManagerContext.workDir)
.param(NO_RESOLVE_LOCAL_CACHE, true)
.param(USE_DEFAULT_LOCAL_CACHE, false)
.build(),
eventBus, dispatcher, statementContext, resources))
.addStep(APPLY_UPDATE, new ApplyStep<UpdateOfflineState>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.jboss.hal.dmr.dispatch.Dispatcher;
import org.jboss.hal.meta.StatementContext;
import org.jboss.hal.resources.Resources;

import com.google.web.bindery.event.shared.EventBus;

import static org.jboss.hal.client.installer.AddressTemplates.INSTALLER_TEMPLATE;
Expand All @@ -32,6 +31,7 @@
import static org.jboss.hal.client.installer.UpdateOnlineState.PREPARE_SERVER;
import static org.jboss.hal.core.finder.FinderColumn.RefreshMode.CLEAR_SELECTION;
import static org.jboss.hal.dmr.ModelDescriptionConstants.PREPARE_UPDATES;
import static org.jboss.hal.dmr.ModelDescriptionConstants.USE_DEFAULT_LOCAL_CACHE;

class UpdateOnlineWizard {

Expand Down Expand Up @@ -63,7 +63,9 @@ void show(UpdateColumn column) {
resources.constants().prepareServerCandidate(),
resources.constants().applyUpdates())))
.addStep(PREPARE_SERVER, new PrepareStep<UpdateOnlineState>(
(__) -> new Operation.Builder(INSTALLER_TEMPLATE.resolve(statementContext), PREPARE_UPDATES).build(),
(__) -> new Operation.Builder(INSTALLER_TEMPLATE.resolve(statementContext), PREPARE_UPDATES)
.param(USE_DEFAULT_LOCAL_CACHE, true)
.build(),
eventBus, dispatcher, statementContext, resources))
.addStep(APPLY_UPDATE, new ApplyStep<UpdateOnlineState>(
resources.constants().applyUpdates(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@
import elemental2.promise.Promise;

import static java.util.Collections.singletonList;

import static org.jboss.elemento.Elements.div;
import static org.jboss.hal.client.installer.AddressTemplates.INSTALLER_TEMPLATE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.LIST_UPDATES;
import static org.jboss.hal.dmr.ModelDescriptionConstants.MAVEN_REPO_FILES;
import static org.jboss.hal.dmr.ModelDescriptionConstants.NO_RESOLVE_LOCAL_CACHE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.UPDATES;
import static org.jboss.hal.dmr.ModelDescriptionConstants.USE_DEFAULT_LOCAL_CACHE;
import static org.jboss.hal.dmr.ModelDescriptionConstants.WORK_DIR;
import static org.jboss.hal.flow.Flow.sequential;

Expand Down Expand Up @@ -85,7 +84,7 @@ public void onNext(final UpdateManagerContext context, final WorkflowCallback ca
}
Operation operation = new Operation.Builder(INSTALLER_TEMPLATE.resolve(statementContext), LIST_UPDATES)
.param(MAVEN_REPO_FILES, mavenRepoFiles)
.param(NO_RESOLVE_LOCAL_CACHE, true)
.param(USE_DEFAULT_LOCAL_CACHE, false)
.build();
List<Task<FlowContext>> tasks = singletonList(
flowContext -> dispatcher.upload(uploadElement.getFiles(), operation).then(result -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,6 @@ public interface ModelDescriptionConstants {
String NEW_VERSION = "new-version";
String NEXT_TIMEOUT = "next-timeout";
String NILLABLE = "nillable";
String NO_RESOLVE_LOCAL_CACHE = "no-resolve-local-cache";
String NO_TX_SEPARATE_POOL = "no-tx-separate-pool";
String NODE = "node";
String NON_DURABLE_MESSAGE_COUNT = "non-durable-message-count";
Expand Down Expand Up @@ -1038,6 +1037,7 @@ public interface ModelDescriptionConstants {
String UNDERTOW = "undertow";
String UNIT = "unit";
String UNREGISTERED = "unregistered";
String USE_DEFAULT_LOCAL_CACHE = "use-default-local-cache";
String UP = "UP";
String UPLOAD_CUSTOM_PATCH = "upload-custom-patch";
String UPDATE = "update";
Expand Down

0 comments on commit 00da2db

Please sign in to comment.