-
Notifications
You must be signed in to change notification settings - Fork 106
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
Fix multiple small (but sometimes serious) issues #1144
Conversation
Build succeeded.
|
a0d889b
to
026691f
Compare
Build succeeded.
|
026691f
to
4636f69
Compare
Build succeeded.
|
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.
The changes are looking good, could you just add a news file to this PR?
Name it PR1144.bug
and add it to news
folder. The text could be something like
Fix documentation and javascript issue`
@@ -207,8 +207,8 @@ The backends available are: | |||
You need to provide **Sourceforge name** if the name on RSS feed is different then the | |||
project name on Sourceforge. | |||
|
|||
* **Sourceforge (git) for projects hosted on | |||
`sourceforge.net <https://sourceforge.net>`_ | |||
* **Sourceforge (git)** for projects hosted on |
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.
I'm surprised this wasn't caught by the tests. It was recently added in #1134.
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.
I was too. I looked at it again, Zuul configuration is wrong,
job anitya-tox-docs
is actually running Bandit.
Probably just a copy paste error and easy to fix?
Otherwise, Vagrant uses the Makefile in the docs
folder
while Zuul runs some commands embedded inside tox.ini
.
That could cause varying results, too.
- job:
name: anitya-tox-docs
...
parent: tox
run: ci/test-tox.yaml
vars:
tox_env: bandit
...
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.
This really looks like a copy paste error on my side. I will fix it. I will also unify how the docs are built in vagrant and in tox.
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.
I looked at the makefile and the docs tox target and they are almost identical, the tox one is even running ./generate_db_schema
. So I would just fix the zuul file.
@@ -377,7 +377,7 @@ <h1>{{ context }} project</h1> | |||
$(btn).show(); $(btn + "-spinner").hide(); | |||
alert( | |||
'Unable to retrieve the latest version from upstream!\n' | |||
+ 'ERROR: ' + res.responseJSON ); | |||
+ 'ERROR: ' + JSON.stringify(res.responseJSON) ); |
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.
I'm not that familiar with javascript, so this will be probably my error. Thanks for fixing this.
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.
You are not the only one 😆
This is a very common mistake in error handlers.
The default string resulting from adding an object to string is the useless [Object object]
and it is even easier to accidentally write that kind of code
because e.g. console.log(object)
actually prints something useful.
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.
That's why people are using some JavaScript replacements on serious projects?
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.
It would be nice to get rid of Javascript entirely, but I'm not frontend developer, so this is not my cup of tea.
Vagrant development environment setup failed during 'vagrant up' with the following errors during from task 'Build the Anitya documentation': > user-guide.rst:210:Inline strong start-string without end-string. > user-guide.rst:3:Duplicate explicit target name: \"sourceforge.net\" Like the errors say, the entry about 'Sourceforge (git)' was corrupted in two different ways: 1. Strong string was started with `**`, but never terminated. The fix is obvious. 2. The same document had two links using format '`text <url>`_', which is not allowed in reStructured Text. Fixed by using '__' in the second link, making it "anonymous". Signed-off-by: Otto Urpelainen <[email protected]>
Caused the page it was on malfunction in serious ways. Signed-off-by: Otto Urpelainen <[email protected]>
When Test Check failed in the Edit Project page, resulting error was displayed as '[Object object]'. This was a result of concatenating an object to string. Fixed by using JSON.stringify(). Signed-off-by: Otto Urpelainen <[email protected]>
4636f69
to
ffad6dd
Compare
Build succeeded.
|
Uh, sorry. I was not entirely sure if there is required or encouraged for every pull request. Fixed. |
I don't create them, if this is only about fixing tests or some small changes in dev environment, but it's good to have them if this is anything that affects users of release-monitoring.org |
Let me first fix the documentation build so I can see that it really fails, then I will merge this PR. |
The Zuul PR is #1147 |
The PR #1147 failed, so let's merge this one and see if it will pass. |
@oturpe Thanks for the fixes! I missed it totally. |
Master branch has multiple issues small (but sometimes very serious).
Vagrant development environment setup failed during 'vagrant up'
Errors during from task Build the Anitya documentation:
Like the errors say, the entry about Sourceforge (git) was corrupted
in two different ways:
**
, but never terminated.The fix is obvious.
which is not allowed in reStructured Text.
Fixed by using '__' in the second link, making it "anonymous".
Fix corrupted javascript
Caused the page it was on malfunction in serious ways.
Display error correctly when Test Check fails
When Test Check failed in the Edit Project page,
resulting error was displayed as '[Object object]'.
This was a result of concatenating an object to string.
Fixed by using JSON.stringify().