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

Stop parameters page in Wiki from just disappearing #6576

Merged
merged 5 commits into from
Jan 29, 2025

Conversation

peterbarker
Copy link
Contributor

From what I've gleaned from the logs on the Wiki server, it is possible for build_parameters.py to parse out 0 versions to build from its scanning of the firmware server's directory listing pages.

This leads us to removing the parameters.rst file but not copying in a special "versioning" replacement for it based on the master branch.

So. Run update.sh with -e so that it doesn't just rumble on if there's an error.

Change build_parameters.py to exit with a non-zero exit code if there's ever an error in it.

Require at least one version/commit from each directory listing parsed from the firmware server.

Future enhancements here:

  • make build_parameters.py a library, call it from update.py
  • stop parsing directory listing of firmware server in build_binaries.py, grab the manifest file instead and interpret it

so we exit after an error has happened rather than do more damage
prevents returning an empty set of commits which can make the Wiki's parameters page break
Copy link
Contributor

@timtuxworth timtuxworth left a comment

Choose a reason for hiding this comment

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

Some spelling and minor cleanup.

@@ -305,6 +305,8 @@ def fetch_commit_hash(version_link, board, file):
for i in commits_and_codes:
if commits_and_codes[i][0] != 'error':
commite_and_codes_cleanned[i] = commits_and_codes[i]
if len(commite_and_codes_cleanned) == 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

cleaned (spelling) - ok I see it's a pre-existing wierdness, but an opportunity to fix it? (and commite)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really a good time to fix this sort of thing. The variable needs a completely new name, not just a spelling fix :-)

... and I don't even know if "commite" comes from a language-other-than-English or is just a typo...

@@ -1,9 +1,12 @@
#!/bin/bash
# check for changes in docs and run sphinx

set -e
set -x

Copy link
Contributor

Choose a reason for hiding this comment

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

debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I'm leaving it like this deliberately. One of these is even called out in the commit messages...

update.sh Outdated
cp new_logmessages/$site.rst old_logmessages/$site.rst
changed=1
fi
done

[ $changed = 1 ] || exit 0
[ $changed = 1 ] || {
progress "Nothing changed; no rebuild required, exitting"
Copy link
Contributor

Choose a reason for hiding this comment

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

exiting (spelling)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks.

also create a separate log file for the current build
we're always going to want to do this, and probably fold build_parameters.py into update.py
@peterbarker peterbarker force-pushed the pr/build-parameters-fixes branch from a23ac36 to 0a072b3 Compare January 27, 2025 00:20
@peterbarker peterbarker merged commit e1d1c94 into ArduPilot:master Jan 29, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants