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

Testing spackbot for a branch that needs an isort fix #15

Closed
wants to merge 1 commit into from

Conversation

vsoch
Copy link
Owner

@vsoch vsoch commented Jul 14, 2021

Signed-off-by: vsoch vsoch@users.noreply.github.com

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot HELLO

@spack-bot-develop
Copy link

👋️

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@spack-bot-develop
Copy link

I was able to run spack style --fix for you!

==> Running style checks on spack:
  selected: isort, mypy, flake8
==> Modified files:
==> Running isort checks
  isort checks were clean
==> Running mypy checks
  Success: no issues found in 508 source files
  mypy checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> spack style checks were clean

Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request.
I wasn't able to make any changes, but please see the message above for any remaining issues!

@spack-bot-develop
Copy link

It looks like you had an issue with style checks! To fix this, you can run:

$ spack style --fix

And then update the pull request here. Or you can just say @spackbot fix style and I'll do it!

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@spack-bot-develop
Copy link

Here is the output from spack style --fix, which I ran for you!

==> Running style checks on spack:
  selected: isort, mypy, flake8
==> Modified files:
==> Running isort checks
  isort checks were clean
==> Running mypy checks
  Success: no issues found in 508 source files
  mypy checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> spack style checks were clean

Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request.
I wasn't able to make any changes, but please see the message above for any remaining issues!

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@spack-bot-develop
Copy link

Here is the output from spack style --fix, which I ran for you!

==> Running style checks on spack:
  selected: isort, mypy, flake8
==> Modified files:
  lib/spack/spack/url.py
==> Running isort checks
  Fixing /tmp/tmp52p50mjy/spack/lib/spack/spack/url.py
  isort checks were clean
==> Running mypy checks
  Success: no issues found in 508 source files
  mypy checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> spack style checks were clean

Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request.
I've updated the branch with isort fixes.

But it looks like I'm not able to push to your branch. 😭️

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style !

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@spack-bot-develop
Copy link

Here is the output from spack style --fix, which I ran for you!

==> Running style checks on spack:
  selected: isort, mypy, flake8
==> Modified files:
  lib/spack/spack/url.py
==> Running isort checks
  Fixing /tmp/tmpa1fel0md/spack/lib/spack/spack/url.py
  isort checks were clean
==> Running mypy checks
  Success: no issues found in 508 source files
  mypy checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> spack style checks were clean

Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request.
I've updated the branch with isort fixes.

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot check style!

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot check style

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot r u ded

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot check style

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot hello!

@spack-bot-develop
Copy link

Hello!

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

yes I'm stupid.

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

@spackbot fix style

@spack-bot-develop
Copy link

Let me see if I can fix that for you! This might take a moment...

@spack-bot-develop spack-bot-develop bot mentioned this pull request Jul 14, 2021
@spack-bot-develop
Copy link

Here is the output from spack style --fix, which I ran for you!

==> Running style checks on spack:
  selected: isort, mypy, flake8
==> Modified files:
  lib/spack/spack/url.py
==> Running isort checks
  Fixing /tmp/tmp3faklf3z/spack/lib/spack/spack/url.py
  isort checks were clean
==> Running mypy checks
  Success: no issues found in 508 source files
  mypy checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> spack style checks were clean

Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request.
I've updated the branch with isort fixes! You can integrate fixes by merging the opened pull request at https://api.github.com/repos/vsoch/spack/pulls/16

1 similar comment
@spack-bot-develop
Copy link

Here is the output from spack style --fix, which I ran for you!

==> Running style checks on spack:
  selected: isort, mypy, flake8
==> Modified files:
  lib/spack/spack/url.py
==> Running isort checks
  Fixing /tmp/tmp3faklf3z/spack/lib/spack/spack/url.py
  isort checks were clean
==> Running mypy checks
  Success: no issues found in 508 source files
  mypy checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> spack style checks were clean

Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request.
I've updated the branch with isort fixes! You can integrate fixes by merging the opened pull request at https://api.github.com/repos/vsoch/spack/pulls/16

@vsoch vsoch closed this Jul 14, 2021
@tgamblin
Copy link
Collaborator

@vsoch what happens if the output gets long?

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

I don't think POST has any limit on the size of data, so I suspect it would just put all the output.

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

We could put a details instead, but then it's an extra click.

spack style --fix
==> Running style checks on spack:
  selected: isort, mypy, flake8
==> Modified files:
  lib/spack/spack/url.py
==> Running isort checks
  Fixing /tmp/tmp3faklf3z/spack/lib/spack/spack/url.py
  isort checks were clean
==> Running mypy checks
  Success: no issues found in 508 source files
  mypy checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> spack style checks were clean

@tgamblin
Copy link
Collaborator

Looks like there is a limit on comment size: https://github.community/t/maximum-length-for-the-comment-body-in-issues-and-pr/148867

PR body/Issue comments are still stored in MySQL as a mediumblob with a maximum value length of 262,144. This equals a limit of 65,536 4-byte unicode characters.

I suspect most people will just run it themselves if the bot fails -- could the bot just say "success!" and then make a recommendation to run spack style --fix yourself on failure? There isn't much other than that the user can do w/the output. What do you think?

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

Could it really be possible that the output would be that long? I do think having the output here is helpful - otherwise the user needs to run it themself (making the bot not super useful) or open up the CI (so many clicks!) For this likely edge case I could do a check for a little bit under that length and just truncate the output if it's too big, would that work?

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

okay all set.

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

And the bot already reads the status check failure (for style) and gives them a message they can run it.

@tgamblin
Copy link
Collaborator

For this likely edge case I could do a check for a little bit under that length and just truncate the output if it's too big, would that work?

We actually do PRs that affect tons of files at once -- so esp. in the first output section (modified files) we print all the names. For some of @adamjstewart's OCD PRs it's all 5000+ packages.

But given that, I think the solution isn't to limit it with the bot but in spack style. I'll add a flag that just prints number of modified files instead of all of them and we can have the bot use it.

@vsoch
Copy link
Owner Author

vsoch commented Jul 14, 2021

That works too! For now I added a details box so it's not visually so much text, and spackbot will always truncate within the limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants