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

Fake tagging for separate changelogs as well #7776

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

juliogonzalez
Copy link
Member

@juliogonzalez juliogonzalez commented Oct 26, 2023

What does this PR change?

Fake tagging for separate changelogs as well.

As otherwise if no changes are present in the main changelog, no fake tagging was performed, and therefore checking the changes on the package on a live instance for development was tricky.

CLI diff

If the package has no changes in any changelog file

It still builds as expected:

$ rel-eng/build-packages-for-obs.sh spacewalk
spacewalk
Going to build new obs packages in /tmp/push-packages-to-obs/SRPMS...
=== Building package [spacewalk-4.4.4-1] from spacewalk/package/ (Try 1)
66 bloques
======================================================================
Built obs packages:  1
======================================================================

If the package has entries on the main changelog file and extra changelog files

To test it I added an entry -blah at spacewalk-java.changes

Then the entries from the extra changelog files get added on top:

-------------------------------------------------------------------
Fri Jan 01 00:00:00 CEST 2038 - [email protected]

- Revert action executor fix that was intended to prevent blocking of Taskomatic threads (bsc#1214121)
- Improve Taskomatic by removing invalid triggers before starting and enhancing logs
- Consider server id when removing invalid erratas from rhnSet (bsc#1204235,bsc#1207012,bsc#1211560)
- Fix unscheduling actions when the trigger name changed after retry (bsc#1214121)
- Fix failed actions rescheduling (bsc#1214121)
- Token cleanup process removing invalid tokens using sql query (bsc#1213376)
- fix FQDN machine name mapping on proxy configuration
- Fix token validation for shared (public) child channels (bsc#1216128)
- Handle spaces in /ks/dist/ file names (bsc#1213680)
- Fix issue where bad scc creds were preventing other credentials to refresh (bsc#1211355)
- Fix bug about listing Ansible inventories (bsc#1213132)
- Add payg info to UI and rest API
Fix system.provisionSystem xmlrpc endpoint to calculate host properly (bsc#1215209)
- wait for lock to execute scc sync task (bsc#1216030)
- add salt-api socket timeout to abort stuck taskomatic jobs (bsc#1211649)
- look for the PAYG CA certificate location in different order to
  find and import the correct one (bsc#1214759)
- fix notification messages email content (bsc#1216041)
- implement different way to copy data for SystemPackageUpdate report database table (bsc#1211912)
- Update tomcat jars to version greater than 9.0.75
- add detection of Debian 12
- Do not warn about missing Client Tools Channel subscription in a 
  PAYG environment
- Improved detection of the best authentication for accessing a 
  repository in case of PAYG credentials (bsc#1215362)
- Combine the PAYG credentials and the repository paths when they 
  collide (bsc#1215413)
- Do not call SCC when updating the repositories authentication 
  for PAYG (bsc#1215857)
- Restart the bunch from where it was interrupted when rescheduling
- Moved the Ubuntu errata processing in its own separate taskomatic
  task (bsc#1211145)
- Stop the taskomatic bunch execution if it was not possible to
  execute one of the tasks
- Fixed detection in case RHEL-based products (bsc#1214280)
- fix token issue with cloned deb channels (bsc#1214982)
- Add a config to specify the number of minutes to wait before
 performing a system reboot
- Fix server error when visiting the notifications page
- Include reboot_suggested and restart_suggested booleans in 
  errata.getDetails API response
- Improved logging to better capture third-party library issues
- Fix the use of page size preference in systems and packages lists
- Respect user email preferences when sending 'user creation' emails (bsc#1214553)
- Change list endpoints in saltkey namespace to accept GET
  requests instead of POST (bsc#1214463)
- Sync GPG properties on each build in CLM (bsc#1213689)
- Blah

-------------------------------------------------------------------
Wed Sep 27 17:44:34 CEST 2023 - [email protected]

- version 4.4.20-1
  * Fix RHUI support for RHEL 7 clients (bsc#1215756)

If the package there are only entries on extra changelog files

Then the entries get added to the main changelog:

-------------------------------------------------------------------
Fri Jan 01 00:00:00 CEST 2038 - [email protected]

- Revert action executor fix that was intended to prevent blocking of Taskomatic threads (bsc#1214121)
- Improve Taskomatic by removing invalid triggers before starting and enhancing logs
- Consider server id when removing invalid erratas from rhnSet (bsc#1204235,bsc#1207012,bsc#1211560)
- Fix unscheduling actions when the trigger name changed after retry (bsc#1214121)
- Fix failed actions rescheduling (bsc#1214121)
- Token cleanup process removing invalid tokens using sql query (bsc#1213376)
- fix FQDN machine name mapping on proxy configuration
- Fix token validation for shared (public) child channels (bsc#1216128)
- Handle spaces in /ks/dist/ file names (bsc#1213680)
- Fix issue where bad scc creds were preventing other credentials to refresh (bsc#1211355)
- Fix bug about listing Ansible inventories (bsc#1213132)
- Add payg info to UI and rest API
Fix system.provisionSystem xmlrpc endpoint to calculate host properly (bsc#1215209)
- wait for lock to execute scc sync task (bsc#1216030)
- add salt-api socket timeout to abort stuck taskomatic jobs (bsc#1211649)
- look for the PAYG CA certificate location in different order to
  find and import the correct one (bsc#1214759)
- fix notification messages email content (bsc#1216041)
- implement different way to copy data for SystemPackageUpdate report database table (bsc#1211912)
- Update tomcat jars to version greater than 9.0.75
- add detection of Debian 12
- Do not warn about missing Client Tools Channel subscription in a 
  PAYG environment
- Improved detection of the best authentication for accessing a 
  repository in case of PAYG credentials (bsc#1215362)
- Combine the PAYG credentials and the repository paths when they 
  collide (bsc#1215413)
- Do not call SCC when updating the repositories authentication 
  for PAYG (bsc#1215857)
- Restart the bunch from where it was interrupted when rescheduling
- Moved the Ubuntu errata processing in its own separate taskomatic
  task (bsc#1211145)
- Stop the taskomatic bunch execution if it was not possible to
  execute one of the tasks
- Fixed detection in case RHEL-based products (bsc#1214280)
- fix token issue with cloned deb channels (bsc#1214982)
- Add a config to specify the number of minutes to wait before
 performing a system reboot
- Fix server error when visiting the notifications page
- Include reboot_suggested and restart_suggested booleans in 
  errata.getDetails API response
- Improved logging to better capture third-party library issues
- Fix the use of page size preference in systems and packages lists
- Respect user email preferences when sending 'user creation' emails (bsc#1214553)
- Change list endpoints in saltkey namespace to accept GET
  requests instead of POST (bsc#1214463)
- Sync GPG properties on each build in CLM (bsc#1213689)

-------------------------------------------------------------------
Wed Sep 27 17:44:34 CEST 2023 - [email protected]

- version 4.4.20-1
  * Fix RHUI support for RHEL 7 clients (bsc#1215756)
  • DONE

Documentation

  • No documentation needed: No doc, this is not for users, and we don't have it in any internal doc. It's just a goodie.

  • DONE

Test coverage

  • No tests: We don't have tests for this.

  • DONE

Links

Backport to SUSE Manager 4.3: https://github.com/SUSE/spacewalk/pull/22894

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

@juliogonzalez juliogonzalez requested a review from a team as a code owner October 26, 2023 13:14
FILELIST="$(ls ${GIT_DIR}/${PKG_DIR}${PKG_NAME}.changes.* 2> /dev/null; true)"
for FILE in $FILELIST; do
if [ ${PREVIOUS_CHANGELOGS} -eq 0 -a ${EXTRA_CHANGELOGS} -eq 0 ]; then
sed -i '1i\\' ${CHANGES}
Copy link
Member Author

@juliogonzalez juliogonzalez Oct 26, 2023

Choose a reason for hiding this comment

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

This means: add an empty new line at the first line.

else
PREVIOUS_CHANGELOGS=1
fi
FILELIST="$(ls ${GIT_DIR}/${PKG_DIR}${PKG_NAME}.changes.* 2> /dev/null; true)"
Copy link
Member Author

@juliogonzalez juliogonzalez Oct 26, 2023

Choose a reason for hiding this comment

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

Here we send errors to /dev/null and we always return 0, so we don't break the script if no files are available.

If no separate changelogs are found, then the section is skipped.

LINENUMBER=1
while IFS= read -r LINE; do
if [ "${LINE}" != "" ]; then
sed -i "${LINENUMBER}i\\${LINE}" ${CHANGES}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is done this way so we add the lines from each changelog file in the right order.

EXTRA_CHANGELOGS=1
LINENUMBER=1
while IFS= read -r LINE; do
if [ "${LINE}" != "" ]; then
Copy link
Member Author

@juliogonzalez juliogonzalez Oct 26, 2023

Choose a reason for hiding this comment

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

Some developers add empty lines by mistake. The changelog checker @cbbayburt is doing should be handling this, but for now we had this to avoid an error in the script.

Copy link
Contributor

@deneb-alpha deneb-alpha left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@deneb-alpha deneb-alpha left a comment

Choose a reason for hiding this comment

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

Still, it LGTM :D

@juliogonzalez
Copy link
Member Author

Merge authorized by @deneb-alpha

@juliogonzalez juliogonzalez merged commit d78abe5 into uyuni-project:master Oct 26, 2023
2 of 4 checks passed
@juliogonzalez juliogonzalez deleted the merge-changelogs branch October 26, 2023 14:16
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.

3 participants