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

Rename build to pipeline in code #1224

Merged
merged 45 commits into from
Oct 18, 2022
Merged

Conversation

qwerty287
Copy link
Contributor

@qwerty287 qwerty287 commented Sep 29, 2022

ref #745

TODO

  • add migration notice

@qwerty287 qwerty287 added the refactor delete or replace old code label Sep 29, 2022
@qwerty287 qwerty287 added this to the 1.0.0 milestone Sep 29, 2022
@6543
Copy link
Member

6543 commented Sep 29, 2022

nah please not rename CI_BUILD env vars!
before we do that I would rather stick to the term build and call the whole thing pipeline!

you have no idea how much work breaking env vars is ... sep if they are many

Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

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

BUILD

@anbraten

This comment was marked as outdated.

Copy link
Member

@anbraten anbraten left a comment

Choose a reason for hiding this comment

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

Again, crazy job. I absolutely love it.

agent/runner.go Outdated Show resolved Hide resolved
agent/runner.go Outdated Show resolved Hide resolved
agent/runner.go Show resolved Hide resolved
cli/pipeline/pipeline.go Show resolved Hide resolved
cli/pipeline/pipeline_create.go Outdated Show resolved Hide resolved
web/src/router.ts Outdated Show resolved Hide resolved
web/src/lib/api/index.ts Outdated Show resolved Hide resolved
web/src/lib/api/index.ts Outdated Show resolved Hide resolved
server/store/datastore/pipeline_test.go Outdated Show resolved Hide resolved
@qwerty287
Copy link
Contributor Author

@6543 I renamed them, but the old CI_BUILD vars are still available.

@anbraten this is not ready yet :) I have some more changes I didn't push yet, will just look into it now.

qwerty287 and others added 5 commits September 29, 2022 18:02
Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: Anbraten <anton@ju60.de>
@qwerty287
Copy link
Contributor Author

@anbraten I would keep the migrations how they are now, so only rename tables and not columns.

I also added some notes to the migration docs that show what really has been changed - maybe you could give them a special look.

@qwerty287
Copy link
Contributor Author

This should be 100% backwards compatible again, except the Prometheus Gauge which has been renamed. Should I do something to stay backwards compatible here too? (I don't really know anything about Prometheus)

@woodpecker-bot
Copy link
Collaborator

woodpecker-bot commented Sep 29, 2022

Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-1224.surge.sh

@qwerty287 qwerty287 marked this pull request as ready for review September 29, 2022 18:17
@qwerty287
Copy link
Contributor Author

I think that's it - as you can see tests etc passed, I it tested locally and didn't find any occurrences that can be replaced of build.

What has not been changed:

  • JSON field names (how should we proceed here?)
  • DB column names (followup PR)

Breaking changes:

  • Renamed Prometheus gauges woodpecker_builds_* to woodpecker_pipelines_*

@6543 Do you want to develop a linter that warns about deprecated envs first before merging?

@6543
Copy link
Member

6543 commented Sep 29, 2022

yes ...

@qwerty287
Copy link
Contributor Author

I think we shouldn't change JSON fields in this PR. Let's do this in a followup, I should be able to do this.

@6543
Copy link
Member

6543 commented Oct 15, 2022

I think we shouldn't change JSON fields in this PR. Let's do this in a followup, I should be able to do this.

In that case please fix the frontemd code

@qwerty287
Copy link
Contributor Author

I did already.

@qwerty287 qwerty287 removed the blocked It's ready but something external is blocking it label Oct 16, 2022
@qwerty287
Copy link
Contributor Author

Whoever will merge this: because it renames a translation key, weblate will remove the old translations and we have to translate them again. To prevent this, I recommend you to do the following:

  1. download all translations from this repo
  2. merge the PR
  3. rename the JSON object build to pipeline (this is the key change) in all translation files (not English only, because English has this already, but also the other languages)
  4. update the repo on weblate or wait until updated (I don't know how this works)
  5. Upload the translation files with the new keys https://docs.weblate.org/en/latest/user/files.html#uploading-translations

Then, weblate should contain the translations with the new keys and will update the files once the repo is synced again.

@anbraten
Copy link
Member

I have downloaded the current translation files so we could reuse them after merging.

@6543 6543 added the breaking will break existing installations if no manual action happens label Oct 17, 2022
@6543 6543 removed the breaking will break existing installations if no manual action happens label Oct 18, 2022
@6543 6543 enabled auto-merge (squash) October 18, 2022 00:01
@6543 6543 merged commit 849e05b into woodpecker-ci:master Oct 18, 2022
@6543 6543 mentioned this pull request Oct 18, 2022
@qwerty287 qwerty287 deleted the build-pipeline branch October 19, 2022 08:16
6543 pushed a commit that referenced this pull request Oct 22, 2022
Closes #1282 

Follow-up to #1224, addresses #745

- changes JSON fields
- adds migration to rename columns
- fixes some comments
6543 added a commit that referenced this pull request Oct 22, 2022
simmstein pushed a commit to simmstein/woodpecker that referenced this pull request Dec 27, 2022
Ref:  woodpecker-ci#745

Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: 6543 <6543@obermui.de>
simmstein pushed a commit to simmstein/woodpecker that referenced this pull request Dec 27, 2022
Closes woodpecker-ci#1282 

Follow-up to woodpecker-ci#1224, addresses woodpecker-ci#745

- changes JSON fields
- adds migration to rename columns
- fixes some comments
simmstein pushed a commit to simmstein/woodpecker that referenced this pull request Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor delete or replace old code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants