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 the emergency shutoff button unclickeable when disabled #3028

Merged

Conversation

MelakuAlehegn
Copy link
Contributor

This PR is for a fix for #2610

  • Button clickable and enabled at first
  • Button gets disabled and click wont redo the disabling again, like it used to.
  • Button becomes disabled and unclickable after disabled updates

Here I have selected a product: Fennect: beta
image

Enabled button: Clickable at first
enabled button

Disabling updates
disabling

Disabled and button unclickable
disabled and unclickable

agent/run.sh Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

This changes are hitting some script files not related with the issue. Seems like file metadata was changed or something like this.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@allan-silva, I have only changed ui/src/views/Rules/ListRules/index.jsx file, but somehow this files have been added too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I create another PR with a different branch name for this issue?, seems like this could be resolved if I only stages the index.js file to git so that the files wouldn't get pushed.

Copy link
Contributor

Choose a reason for hiding this comment

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

If that's the easiest way for you to get a clean PR, please go ahead. It is also possible to revert the changes from your current branch.

@MelakuAlehegn
Copy link
Contributor Author

@gabrielBusta @bhearsum Can you take a look at my solution to this issue please?

@MelakuAlehegn
Copy link
Contributor Author

@bhearsum Can you give suggestions on this failing test? It seems related to the commit hash.

@bhearsum
Copy link
Contributor

@bhearsum Can you give suggestions on this failing test? It seems related to the commit hash.

It looks like it was an intermittent issue - a rebuild fixed it.

@MelakuAlehegn
Copy link
Contributor Author

@bhearsum Can you give suggestions on this failing test? It seems related to the commit hash.

It looks like it was an intermittent issue - a rebuild fixed it.

Thanks @bhearsum can I get a review on this one so I could move forward pick up another issue please?

Copy link
Member

@gabrielBusta gabrielBusta left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @MelakuAlehegn.

The changes you're seeing are changes to the file permissions in the Git repository.

100755 means the file is executable.

100644 means the file is not executable.

To restore the files you could run this command on each of the files with the modified permissions:

git restore --source=2181f9233850bcefd42a25b862d0f9a5c8083225 --staged --worktree <filename>

This approach will restore the file's state (including its permissions) to 2181f92 (which is the commit your changes are based on), and you can then commit the change as you usually would.

(balrog) ➜  balrog git:(emergency-shutoff-button) ✗ git restore --source=2181f9233850bcefd42a25b862d0f9a5c8083225 --staged --worktree maintenance/pin.sh 
(balrog) ➜  balrog git:(emergency-shutoff-button) ✗ git status -v
On branch emergency-shutoff-button
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   maintenance/pin.sh

diff --git a/maintenance/pin.sh b/maintenance/pin.sh
old mode 100644
new mode 100755

@MelakuAlehegn
Copy link
Contributor Author

Thanks for the contribution @MelakuAlehegn.

The changes you're seeing are changes to the file permissions in the Git repository.

100755 means the file is executable.

100644 means the file is not executable.

To restore the files you could run this command on each of the files with the modified permissions:

git restore --source=2181f9233850bcefd42a25b862d0f9a5c8083225 --staged --worktree <filename>

This approach will restore the file's state (including its permissions) to 2181f92 (which is the commit your changes are based on), and you can then commit the change as you usually would.

(balrog) ➜  balrog git:(emergency-shutoff-button) ✗ git restore --source=2181f9233850bcefd42a25b862d0f9a5c8083225 --staged --worktree maintenance/pin.sh 
(balrog) ➜  balrog git:(emergency-shutoff-button) ✗ git status -v
On branch emergency-shutoff-button
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   maintenance/pin.sh

diff --git a/maintenance/pin.sh b/maintenance/pin.sh
old mode 100644
new mode 100755

@gabrielBusta I have changed the file permissions back.

@gabrielBusta
Copy link
Member

Thanks @MelakuAlehegn, I see the issue has been resolved on a lot of the files.

I still see permission changes on these files that should be reverted:

  1. agent/run.sh
  2. scripts/run.sh
  3. scripts/test-rules.py
  4. src/auslib/blobs/apprelease.py
  5. src/auslib/blobs/base.py
  6. taskcluster/docker/skopeo/push_image.sh
  7. tests/blobs/test_apprelease.py
  8. ui/scripts/deploy

@MelakuAlehegn
Copy link
Contributor Author

MelakuAlehegn commented Oct 25, 2023

@gabrielBusta I have reverted the permission changes for all files on this commit. Please take a look.

@MelakuAlehegn
Copy link
Contributor Author

@gabrielBusta I have reverted the permission changes for all files on this commit. Please take a look.

@bhearsum

Copy link
Contributor

@allan-silva allan-silva left a comment

Choose a reason for hiding this comment

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

I made tests on MelakuAlehegn:emergency-shutoff-button, LGTM.

Thanks!

@MelakuAlehegn
Copy link
Contributor Author

I made tests on MelakuAlehegn:emergency-shutoff-button, LGTM.

Thanks!

Thanks @allan-silva ,

@gabrielBusta
Copy link
Member

Looks great :)

Thanks @MelakuAlehegn

@gabrielBusta gabrielBusta merged commit dbc3348 into mozilla-releng:main Oct 25, 2023
6 checks passed
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.

4 participants