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

Add script to lock object sub-tree and fix object locking bugs #7855

Merged
merged 24 commits into from
Oct 10, 2024

Conversation

akhenry
Copy link
Contributor

@akhenry akhenry commented Sep 30, 2024

Closes #7877

Describe your changes:

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes? Filed followup - Define tests for #7877 #7881
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 22.58065% with 24 lines in your changes missing coverage. Please review.

Project coverage is 57.41%. Comparing base (c43ef64) to head (60e2fc4).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/ui/layout/BrowseBar.vue 13.04% 19 Missing and 1 partial ⚠️
src/plugins/duplicate/DuplicateAction.js 33.33% 2 Missing ⚠️
.../inspectorViews/properties/PropertiesComponent.vue 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7855      +/-   ##
==========================================
+ Coverage   57.16%   57.41%   +0.24%     
==========================================
  Files         676      676              
  Lines       27326    27350      +24     
  Branches     2673     2684      +11     
==========================================
+ Hits        15622    15704      +82     
+ Misses      11368    11309      -59     
- Partials      336      337       +1     
Flag Coverage Δ
e2e-ci 62.45% <50.00%> (-0.01%) ⬇️
e2e-full 41.82% <50.00%> (+18.35%) ⬆️
unit 49.30% <22.58%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
src/plugins/formActions/EditPropertiesAction.js 93.93% <100.00%> (ø)
src/plugins/duplicate/DuplicateAction.js 29.31% <33.33%> (-1.73%) ⬇️
.../inspectorViews/properties/PropertiesComponent.vue 84.41% <50.00%> (-1.89%) ⬇️
src/ui/layout/BrowseBar.vue 40.33% <13.04%> (-5.12%) ⬇️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c43ef64...60e2fc4. Read the comment docs.

package.json Outdated Show resolved Hide resolved
… Default to environment variables for couch config. Simplify batching mechanism to make it synchronouse
@akhenry akhenry force-pushed the fix-object-locking branch 3 times, most recently from d9a72d7 to fc8355f Compare October 8, 2024 00:41
@akhenry akhenry added the pr:e2e:couchdb npm run test:e2e:couchdb label Oct 9, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Oct 9, 2024
@akhenry akhenry added this to the Build 9 RC11 milestone Oct 9, 2024
@akhenry akhenry added the notable_change A change which should be noted in the changelog label Oct 9, 2024
@akhenry
Copy link
Contributor Author

akhenry commented Oct 9, 2024

@charlesh88 When set by a script the lock button gets an additional css class l-browse-bar__lock_button__disallow_unlock. To simulate this for development purposes install this bookmarklet:

javascript:(function() { let disallowUnlock=(window.prompt('disallowUnlock?', true) === "true"); openmct.objects.mutate(openmct.router.path[0], 'disallowUnlock', disallowUnlock); openmct.actions.getAction('reload').invoke(openmct.router.path);})()

@akhenry
Copy link
Contributor Author

akhenry commented Oct 10, 2024

This is just pending some UI changes from @charlesh88

@akhenry akhenry marked this pull request as ready for review October 10, 2024 18:15
@charlesh88
Copy link
Contributor

Notes on the bookmarklet:

  1. Nav to the object you want to lock.
  2. Lock it first by clicking the button.
  3. Run the bookmarklet.

charlesh88 and others added 3 commits October 10, 2024 11:54
- Front-end sanding and shimming: displays <span> instead of button when domainObject.disallowUnlock.
startObjectKeystring: {
type: 'string',
short: 'o',
default: 'mine'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should error out instead. this should be required

}
})
.catch((error) => {
console.log(`Error ${error}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.error ?

@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Oct 10, 2024
@ozyx ozyx added pr:e2e:couchdb npm run test:e2e:couchdb and removed pr:e2e:couchdb npm run test:e2e:couchdb labels Oct 10, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Oct 10, 2024
@akhenry akhenry enabled auto-merge (squash) October 10, 2024 22:08
@akhenry akhenry merged commit 703186a into master Oct 10, 2024
24 checks passed
@akhenry akhenry deleted the fix-object-locking branch October 10, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notable_change A change which should be noted in the changelog type:enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support locking objects en-masse to prevent ad-hoc changes in restricted environments.
4 participants