-
Notifications
You must be signed in to change notification settings - Fork 96
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
ISSUE-1231 Enable test environment which don't require importing cluster #1232
Conversation
HeartSaVioR
commented
Feb 28, 2018
- Add "test environment" (ID -1) to environment by default
- Add "readonly" field to namespace table
- default: false
- When readonly is true, default value (localhost) of Storm configuration is loaded
- it enables such environment to run topology test (good to test), but no more
* Add "test environment" (ID -1) to environment by default * Add "readonly" field to namespace table * default: false * When readonly is true, default value (localhost) of Storm configuration is loaded * it enables such environment to run topology test (good to test), but no more Change-Id: I027ee81eea1fc1480d0fd287ec13ffa6cc61ec88
@shahsank3t |
@arunmahadevan |
@HeartSaVioR Yes sure, I'll help you with the UI changes. Will this |
Sorry for confusion, the field name is “readonly”, not “rollback”.
…On Thu, 1 Mar 2018 at 00:16 Sanket Shah ***@***.***> wrote:
@HeartSaVioR <https://github.com/heartsavior> Yes sure, I'll help you
with the UI changes. Will this rollback field be part of the same
environment API? Couldn't find anything related to the field in this PR so
just confirming.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1232 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQZvXp4GAsUU4fpwgnnJcHQLZwoaNmCks5tZWzegaJpZM4SWtw8>
.
|
@HeartSaVioR I have a couple of doubts as follows -
|
@joylyn
@arunmahadevan Could you help me figuring out that "Test Environment" will be seen from all users? Sadly I'm not clear of ACL entry, and I don't add any ACL entry for such environment. @ALL |
Are we hiding this placeholder Enviroment (e.g. from the enviroment REST API) so that it does not show up in the UI ? The ACL entries are enforced at the Resource classes and catalog service can query any entry. However I don't see any permission checks currently happening for TestRunResource. We should protect these resources using the ACLs defined for the topology. (like how we protect the topology components using the underlying topology permissions here). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments.
Are we hiding the placeholder entry from the REST APIs ?
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
|
||
ALTER TABLE `namespace` ADD `readonly` BOOLEAN NOT NULL DEFAULT false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be better to name the flag testing
or internal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
internal
would be fine to me.
Service streamingEngineService = getFirstOccurenceServiceForNamespace(namespace, streamingEngine); | ||
if (streamingEngineService == null) { | ||
throw new RuntimeException("Streaming Engine " + streamingEngine + " is not associated to the namespace " + | ||
namespace.getName() + "(" + namespace.getId() + ")"); | ||
if (!namespace.getReadonly()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isTesting
or isInternal
based on previous comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
Nope. It is just guarded with assertion (flag check), and UI should hide the edit functionality on |
* change the name of field `readonly` to `internal` Change-Id: I6267b0087d6031b391c5ccc0824a22989d2d37da
@arunmahadevan changed the field name. |
@HeartSaVioR , does it require the UI changes to go along with it or can this be merged first ? |
@arunmahadevan Better to have follow-up patch since backend will throw exception whereas it is editable in UI, but the follow-up patch can be done after merging. I think @joylyn is following up the issue. |
Raised #1236 for UI |